/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #020817;
    --secondary-bg: #0f172a;
    --card-bg: #1e293b;
    --neon-blue: #38bdf8;
    --neon-cyan: #22d3ee;
    --neon-sky: #0ea5e9;
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --transition-speed: 0.3s;
}

html {
    background: var(--primary-bg);
    overscroll-behavior: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

header h1 {
    font-family: 'Orbitron', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-sky) 0%, var(--neon-blue) 50%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    letter-spacing: 2px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Card Styles */
.card {
    position: relative;
    aspect-ratio: 1;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.75rem;
    cursor: pointer;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border: 2px solid transparent;
    background-clip: padding-box;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--neon-sky), var(--neon-blue), var(--neon-cyan));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity var(--transition-speed) ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4), 0 0 60px rgba(34, 211, 238, 0.3);
}

.card:hover::before {
    opacity: 1;
    animation: neon-glow 1.5s ease-in-out infinite;
}

@keyframes neon-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(30, 41, 59, 0.6);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.footer-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link:hover {
    color: var(--neon-blue);
}

.footer-link:hover .footer-icon {
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}

.footer-icon {
    transition: filter var(--transition-speed) ease;
}

/* Loading Spinner */
.loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .card-icon {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
