:root {
    --primary-orange: #FF6B35;
    --secondary-orange: #FF8C42;
    --accent-orange: #FFB88C;
    --dark-text: #1A202C;
    --medium-text: #2D3748;
    --light-text: #718096;
    --bg-white: #FFFFFF;
    --bg-light: #F7FAFC;
    --bg-lighter: #EDF2F7;
    --border-color: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark-text);
    background: var(--bg-white);
    line-height: 1.6;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-text);
    text-decoration: none;
    flex-shrink: 0;
    order: 2;
}

.logo img {
    height: 50px;
}

.logo-text {
    display: inline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
    order: 1;
    margin-right: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.header-right {
    margin-left: auto;
    display: flex;
    gap: 1rem;
    align-items: center;
    order: 3;
}

.search-container {
    position: relative;
    margin-right: 1rem;
}

.search-input {
    width: 250px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-icon {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-light);
}

.search-result-title {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.3rem;
}

.search-result-snippet {
    font-size: 0.85rem;
    color: var(--light-text);
}

.search-highlight {
    background: var(--accent-orange);
    color: var(--primary-orange);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

.header-link {
    color: var(--medium-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-link:hover {
    color: var(--primary-orange);
}

/* Layout */
.container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 2rem 0;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 1.5rem;
    margin-bottom: 0.8rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1.5rem;
    color: var(--medium-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-lighter);
    color: var(--primary-orange);
}

.nav-item.active {
    background: var(--bg-white);
    color: var(--primary-orange);
    border-left-color: var(--primary-orange);
    font-weight: 600;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 3rem 4rem;
    max-width: 900px;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--light-text);
    line-height: 1.7;
}

h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-text);
    margin: 2rem 0 1rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--medium-text);
    margin: 1.5rem 0 0.8rem;
}

p {
    font-size: 1rem;
    color: var(--medium-text);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--medium-text);
}

li {
    margin-bottom: 0.7rem;
    line-height: 1.7;
}

.info-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-orange);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.info-box h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box svg {
    width: 20px;
    height: 20px;
    color: var(--primary-orange);
}

.code-block {
    background: var(--dark-text);
    color: #A5D6FF;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-orange);
    line-height: 1;
}

.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg-light);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-text);
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--medium-text);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: var(--bg-light);
}

/* Next Section Button */
.next-section-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.next-section-btn:hover {
    background: var(--secondary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.next-section-btn:active {
    transform: translateY(0);
}

.next-section-btn i {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
}

/* Responsive */
@media (max-width: 968px) {
    .header {
        flex-wrap: nowrap;
        padding: 0 1rem;
        justify-content: flex-start;
    }

    .header-right {
        flex-grow: 1;
    }
    
    /* Show hamburger menu button */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide logo text on mobile */
    .logo-text {
        display: none;
    }
    
    .logo {
        margin-right: 2rem;
    }
    
    .logo img {
        height: 40px;
    }
    
    /* Keep header links visible but hide on small screens */
    .header-link {
        display: none;
    }
    
    /* Keep search bar visible */
    .search-container {
        margin-right: 0;
        width: 100%;
    }
    
    .search-input {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.5rem 2rem 0.5rem 0.8rem;
    }
    
    .search-icon {
        right: 0.6rem;
    }
    
    /* Sidebar - toggle with hamburger */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 998;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    .section-header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        font-size: 0.85rem;
    }
}

/* Etherscan Link Styles */
.etherscan-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #627EEA 0%, #4C5FD5 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(98, 126, 234, 0.3);
    white-space: nowrap;
}

.etherscan-link:hover {
    background: linear-gradient(135deg, #4C5FD5 0%, #627EEA 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 126, 234, 0.3);
}

.etherscan-link i {
    width: 14px;
    height: 14px;
}

/* Code addresses in tables */
.table-container code {
    background: var(--bg-lighter);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--medium-text);
    font-family: 'Courier New', monospace;
    word-break: break-all;
    display: inline-block;
}

/* Responsive Etherscan links */
@media (max-width: 768px) {
    .etherscan-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .table-container code {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}