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

:root {
    --bg-primary: #fafafa;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --border: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --radius: 16px;
}

[data-theme="dark"] {
    --bg-primary: #0f0f14;
    --bg-card: rgba(30, 30, 40, 0.8);
    --bg-card-hover: rgba(40, 40, 55, 0.9);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #818cf8;
    --accent-light: #a5b4fc;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=1920&q=80') center/cover no-repeat;
    opacity: 0.15;
    filter: blur(1px);
}

[data-theme="dark"] .bg-layer {
    background: 
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80') center/cover no-repeat;
    opacity: 0.2;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.1), transparent),
        radial-gradient(ellipse 50% 30% at 10% 80%, rgba(59, 130, 246, 0.08), transparent);
    pointer-events: none;
}

[data-theme="dark"] .bg-gradient {
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.2), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(168, 85, 247, 0.15), transparent),
        radial-gradient(ellipse 50% 30% at 10% 80%, rgba(59, 130, 246, 0.1), transparent);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 15, 20, 0.7);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-mark {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    transition: transform 0.3s ease;
}

.logo:hover .logo-mark {
    transform: scale(1.05);
}

.logo span {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-card);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
    transform: scale(1.05);
}

.icon-sun, .icon-moon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.icon-sun {
    display: block;
}

.icon-moon {
    display: none;
}

[data-theme="dark"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-moon {
    display: block;
}

.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 32px 60px;
    position: relative;
}

.hero-content {
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

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

.portals {
    padding: 20px 32px 80px;
    position: relative;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.portal-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.portal-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.portal-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.portal-card:hover .card-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    transform: scale(1.05);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.portal-card:hover .card-title {
    color: var(--accent);
}

.card-domain {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.card-arrow svg {
    width: 18px;
    height: 18px;
}

.portal-card:hover .card-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

.footer {
    padding: 32px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.footer-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.footer-links svg {
    width: 18px;
    height: 18px;
}

.footer-copyright {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }
    
    .hero {
        min-height: 60vh;
        padding: 100px 20px 40px;
    }
    
    .portals {
        padding: 20px;
    }
    
    .portals-grid {
        gap: 16px;
    }
    
    .portal-card {
        padding: 16px 20px;
    }
    
    .card-icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .portals-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        letter-spacing: -1px;
    }
    
    .hero-subtitle {
        letter-spacing: 1px;
    }
}
