/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #050911;
    --bg-secondary: #0a1120;
    --bg-card: #0f1829;
    --bg-card-hover: #162033;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-purple: #7c3aed;
    --border-color: #1e293b;
    --border-light: rgba(59, 130, 246, 0.1);
    --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --glow: 0 0 20px rgba(37, 99, 235, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(5, 9, 17, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    padding: 1.25rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.4));
    transition: all 0.3s;
}

.logo-img:hover {
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.6));
    transform: scale(1.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-icon {
    padding: 0.5rem;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

.nav-icon:hover {
    background: var(--accent-blue);
    border-color: var(--accent-cyan);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
    margin-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(6, 182, 212, 0.08) 40%, transparent 70%);
    pointer-events: none;
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-title br {
    display: block;
}

.hero-big {
    font-size: 5.5rem;
    display: inline-block;
    font-weight: 900;
}

.hero-medium {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-block;
}

.text-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(37, 99, 235, 0.5));
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2.5rem;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5), 0 0 40px rgba(6, 182, 212, 0.3);
}

/* Networks Section */
.networks {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3.25rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.title-small {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: all 0.4s;
}

.tab:hover {
    background: var(--bg-card-hover);
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.tab.active {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4), 0 0 40px rgba(6, 182, 212, 0.2);
}

.tab.active::before {
    left: 0;
    opacity: 0.2;
}

.tab-count {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 800;
    min-width: 32px;
    text-align: center;
}

.tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Network Grid */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Network Card */
.network-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(15, 24, 41, 0.8) 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
}

.network-card:hover::before {
    opacity: 1;
}

.network-card:hover {
    background: linear-gradient(135deg, var(--bg-card-hover) 0%, rgba(22, 32, 51, 0.95) 100%);
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.25), 0 0 60px rgba(6, 182, 212, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.card-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    transition: all 0.4s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.network-card:hover .card-logo {
    transform: scale(1.15) rotate(5deg);
    border-color: var(--accent-cyan);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.card-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-badge.mainnet {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.card-badge.testnet {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.card-badge.archive {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(100, 116, 139, 0.1) 100%);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 15px rgba(148, 163, 184, 0.15);
}

.card-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-card {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.btn-explorer {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.btn-explorer:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5), 0 0 30px rgba(6, 182, 212, 0.3);
}

.btn-service {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(37, 99, 235, 0.3);
    font-weight: 700;
}

.btn-service:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

/* Features Section */
.features {
    padding: 8rem 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(15, 24, 41, 0.6) 100%);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card:hover {
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.2);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    color: var(--accent-cyan);
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.4s;
    position: relative;
    z-index: 1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.4);
    border-color: var(--accent-cyan);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.3s;
}

.feature-link:hover {
    gap: 0.75rem;
}

/* Footer */
.footer {
    padding: 4rem 0 2.5rem;
    border-top: 1px solid var(--border-light);
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.4), transparent);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.3));
    transition: all 0.3s;
}

.footer-logo:hover {
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
    transform: scale(1.05);
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-name {
    font-size: 1.125rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-link svg {
    position: relative;
    z-index: 1;
    transition: all 0.4s;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover {
    border-color: transparent;
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.social-link:hover svg {
    transform: scale(1.15);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-big {
        font-size: 3.25rem;
    }
    
    .hero-medium {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .title-small {
        font-size: 1.5rem;
    }
    
    .network-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .nav {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
    
    .container {
        padding: 0 1.25rem;
    }
    
    .hero {
        padding: 8rem 0 5rem;
    }
    
    .tabs {
        gap: 0.75rem;
    }
    
    .tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .btn-primary {
        padding: 1rem 1.75rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-big {
        font-size: 2.5rem;
    }
    
    .hero-medium {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .title-small {
        font-size: 1.25rem;
    }
    
    .network-card {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 600;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Scroll Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.network-card {
    animation: slideUp 0.6s ease-out backwards;
}

.network-card:nth-child(1) { animation-delay: 0.1s; }
.network-card:nth-child(2) { animation-delay: 0.2s; }
.network-card:nth-child(3) { animation-delay: 0.3s; }
.network-card:nth-child(4) { animation-delay: 0.4s; }
.network-card:nth-child(5) { animation-delay: 0.5s; }
.network-card:nth-child(6) { animation-delay: 0.6s; }
.network-card:nth-child(7) { animation-delay: 0.7s; }
.network-card:nth-child(8) { animation-delay: 0.8s; }
