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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 800; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

ul { list-style: none; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--red); border-color: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #e0f2fe; color: #0284c7; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

/* Flash messages */
.flash-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; max-width: 400px; }
.flash {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    animation: flashIn 0.3s ease;
    box-shadow: var(--shadow-md);
}
.flash-success { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.flash-error { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.flash-info { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.flash-icon { font-size: 1.1rem; }
.flash-text { flex: 1; }
.flash-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

@keyframes flashIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Section */
.section { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 0.5rem; font-size: 1.8rem; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; font-size: 1.05rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.section-link { color: var(--primary); font-weight: 700; }

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--pink), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: 0.35rem; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    background: var(--bg-white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.form-group small { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--text);
}
.logo:hover { color: var(--text); }
.logo-icon { font-size: 1.5rem; }
.logo-dot { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color var(--transition);
    position: relative;
}
.nav-link:hover { color: var(--primary); }
.nav-cart { position: relative; display: flex; align-items: center; }
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 1rem; opacity: 0.9; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col ul li a:hover { color: white; }
.footer-desc { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-top: 0.75rem; line-height: 1.5; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 900; font-size: 1.1rem; }
.footer-prices li { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-prices strong { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; padding: 1rem 0; }
.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--primary);
}
.pagination-btn:hover { border-color: var(--primary); background: var(--primary-bg); }
.pagination-info { color: var(--text-muted); font-weight: 600; }

/* Breadcrumb */
.breadcrumb { margin-bottom: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Difficulty stars */
.star { color: #ddd; font-size: 0.85rem; }
.star.filled { color: var(--accent); }

/* Legal */
.legal-section h2 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.2rem; }
.legal-section p, .legal-section li { margin-bottom: 0.5rem; font-size: 0.95rem; line-height: 1.7; }
.legal-section ul { list-style: disc; padding-left: 1.5rem; }

/* Table */
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 0.75rem; font-size: 0.85rem; color: var(--text-muted); border-bottom: 2px solid var(--border); }
tbody td { padding: 0.75rem; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
tbody tr:hover { background: var(--bg); }
