/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a3a7a;
    --primary-light: #1e4d9e;
    --primary-dark: #0f2a5e;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Page Wrapper ===== */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Header ===== */
header {
    background: linear-gradient(to right, #0f2a5e 0%, #1a3a7a 40%, #3b7dd8 100%);
    padding: 2.5rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.85;
}

/* ===== Main Content ===== */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    width: 100%;
}

/* ===== Link Grid ===== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

/* ===== Card ===== */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card:hover::before {
    opacity: 1;
}

.card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Card Icon ===== */
.card-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 10px;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}

.card:hover .card-icon {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.card-icon img {
    width: 100%;
    height: 100%;
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
}

/* ===== Card Label ===== */
.card-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    color: var(--text);
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 1.5rem 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    header {
        padding: 2rem 1.5rem;
    }

    .header-content {
        gap: 1rem;
    }

    .header-logo {
        width: 48px;
        height: 48px;
    }

    .header-text h1 {
        font-size: 1.35rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    .link-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .link-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .card {
        padding: 1.25rem 0.75rem;
        gap: 0.75rem;
    }

    .card-label {
        font-size: 0.8rem;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.4s ease-out both;
}

.card:nth-child(1) { animation-delay: 0.03s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.09s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.15s; }
.card:nth-child(6) { animation-delay: 0.18s; }
.card:nth-child(7) { animation-delay: 0.21s; }
.card:nth-child(8) { animation-delay: 0.24s; }
.card:nth-child(9) { animation-delay: 0.27s; }
.card:nth-child(10) { animation-delay: 0.30s; }
.card:nth-child(11) { animation-delay: 0.33s; }
.card:nth-child(12) { animation-delay: 0.36s; }
