@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
    --primary: #1a2b5f;
    --primary-dark: #0f1a3d;
    --accent: #00c9a7;
    --accent-light: #e8faf7;
    --ks1: #ff6b6b;
    --ks2: #f59e0b;
    --ks3: #3b82f6;
    --text-primary: #1a2b5f;
    --text-secondary: #5a6a8a;
    --text-muted: #8a9ab0;
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(26, 43, 95, 0.08);
    --shadow-lg: 0 8px 40px rgba(26, 43, 95, 0.12);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 48px;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.logo-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Language Toggle */
.lang-toggle {
    display: inline-flex;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px;
    gap: 4px;
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 100px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-secondary);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

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

/* Quick Links */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quick-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-link-icon svg {
    width: 20px;
    height: 20px;
}

/* Filter Navigation */
.filter-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--bg-light);
    border-color: var(--border);
    color: var(--text-secondary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 600;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* Link Card */
.link-card {
    position: relative;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
}

.link-card:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.age-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.age-badge.KS1 {
    background: rgba(255, 107, 107, 0.1);
    color: var(--ks1);
}

.age-badge.KS2 {
    background: rgba(245, 158, 11, 0.1);
    color: var(--ks2);
}

.age-badge.KS3 {
    background: rgba(59, 130, 246, 0.1);
    color: var(--ks3);
}

.category {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    line-height: 1.4;
    max-width: 140px;
}

/* Card Content */
.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

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

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
}

.launch-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.link-card:hover .launch-btn {
    color: var(--primary);
}

.link-card:hover .launch-btn svg {
    transform: translateX(4px);
}

.card-number {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }

    header {
        margin-bottom: 32px;
    }

    .header-top {
        flex-direction: column;
        gap: 12px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .link-card {
        padding: 20px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .category {
        display: none;
    }

    .quick-links {
        gap: 8px;
    }

    .quick-link {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
