/* ===========================
   Pokémon & MTG Link Hub
   Mobile-First Design
   =========================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 100%);
    background-image: 
        url('https://d2xsxph8kpxj0f.cloudfront.net/310419663028733854/5k3J4ruZefp5HqFTxDr9Qh/pokemon-mtg-bg-6MiVTVZ4UJiNUqUgmMGjgs.webp'),
        linear-gradient(135deg, rgba(10, 14, 39, 0.9) 0%, rgba(26, 26, 62, 0.9) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */

.header {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ffd700;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #ff0000, #ffd700, #7b3ff2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ===========================
   MAIN CONTENT
   =========================== */

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

.section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.9);
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ffd700;
    letter-spacing: 1px;
}

/* ===========================
   LINKS GRID
   =========================== */

.links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}

@media (min-width: 1024px) {
    .links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.link-card {
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.7) 0%, rgba(20, 20, 50, 0.7) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1.2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.link-card:hover::before {
    left: 100%;
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: #ffd700;
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.9) 0%, rgba(20, 20, 50, 0.9) 100%);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2), 0 0 20px rgba(123, 63, 242, 0.1);
}

.link-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.link-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffd700;
}

.link-description {
    font-size: 0.9rem;
    color: #b0b0b0;
    line-height: 1.4;
    flex-grow: 1;
    margin-bottom: 0.8rem;
}

.link-arrow {
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.link-card:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background: rgba(10, 14, 39, 0.95);
    border-top: 2px solid #ffd700;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-top: auto;
}

/* ===========================
   EMPTY STATE
   =========================== */

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #b0b0b0;
    font-size: 0.95rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
        justify-content: center;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .main {
        padding: 1.5rem 1rem;
    }

    .section {
        margin-bottom: 2rem;
    }

    .link-card {
        padding: 1rem;
    }

    .link-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }

    .link-title {
        font-size: 1rem;
    }

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

/* ===========================
   SCROLLBAR
   =========================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ffed4e;
}

/* ===========================
   ANIMATIONS
   =========================== */

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

.link-card {
    animation: fadeIn 0.5s ease-out;
}

.link-card:nth-child(1) { animation-delay: 0.05s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.15s; }
.link-card:nth-child(4) { animation-delay: 0.2s; }
.link-card:nth-child(5) { animation-delay: 0.25s; }
.link-card:nth-child(6) { animation-delay: 0.3s; }
