* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --accent: #ec4899;
    --success: #10b981;
    --bg: #fef3c7;
    --bg-light: #fffbeb;
    --text: #1f2937;
    --text-light: #6b7280;
    --card-bg: white;
    --card-border: #e5e7eb;
}

[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #fbbf24;
    --accent: #f472b6;
    --success: #34d399;
    --bg: #1e1b4b;
    --bg-light: #312e81;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --card-bg: #312e81;
    --card-border: #4338ca;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
}

/* Arka plan şekilleri */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -50px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    bottom: 20%;
    left: -50px;
    animation: float 6s ease-in-out infinite 1s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--secondary);
    top: 40%;
    right: 10%;
    animation: float 7s ease-in-out infinite 2s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: var(--success);
    bottom: -30px;
    left: 30%;
    animation: float 5s ease-in-out infinite 0.5s;
}

.shape-5 {
    width: 80px;
    height: 80px;
    background: var(--primary);
    top: 60%;
    left: 10%;
    animation: float 9s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes badgeToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes badgeToastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0.5rem auto 0;
    line-height: 1.5;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .main-nav {
    background: rgba(49, 46, 129, 0.9);
}

.nav-logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary);
}

.divider-section {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #eef2ff 0%, #fdf2f8 100%);
    border-radius: 20px;
    margin: 2rem 0;
}

.divider-section h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.divider-section p {
    color: var(--text-light);
}

.adult-preview {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.adult-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat span:last-child {
    font-size: 0.9rem;
    color: var(--text-light);
}

.btn-adult {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.2s;
}

.btn-adult:hover {
    background: var(--primary-dark);
}

.age-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.age-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    background: white;
    border: 2px solid var(--primary);
    transition: all 0.2s;
}

.age-btn:hover {
    background: #eef2ff;
}

.age-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}

/* Main */
.main {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* Progress Home */
.progress-home {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.progress-home h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.progress-home-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.progress-home-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    text-decoration: none;
    color: var(--text);
    min-width: 140px;
    transition: all 0.2s;
}

.progress-home-card:hover {
    border-color: var(--primary);
}

.progress-bar-mini {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-mini {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.3s;
}

/* Badges Home */
.badges-home {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .badges-home {
    background: rgba(49, 46, 129, 0.8);
}

.badges-home h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
}

.badges-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--card-border);
    min-width: 90px;
    transition: all 0.2s;
}

[data-theme="dark"] .badge-item {
    background: var(--card-bg);
}

.badge-item.earned {
    border-color: var(--secondary);
    background: linear-gradient(180deg, #fffbeb 0%, white 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .badge-item.earned {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, var(--card-bg) 100%);
}

.badge-item.locked {
    opacity: 0.6;
}

.badge-emoji {
    font-size: 1.75rem;
}

.badge-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

/* Hero */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.hero h2 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.6;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    display: block;
    text-decoration: none;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 3px solid transparent;
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-akinator {
    border-color: #8b5cf6;
    background: linear-gradient(180deg, #ede9fe 0%, white 100%);
}

.card-akinator:hover {
    border-color: #7c3aed;
}

.card-algoritma {
    border-color: var(--primary);
    background: linear-gradient(180deg, #eef2ff 0%, white 100%);
}

.card-algoritma:hover {
    border-color: var(--primary-dark);
}

.card-blok {
    border-color: var(--accent);
    background: linear-gradient(180deg, #fdf2f8 0%, white 100%);
}

.card-blok:hover {
    border-color: #db2777;
}

.card-havuc {
    border-color: #f59e0b;
    background: linear-gradient(180deg, #fef3c7 0%, white 100%);
}

.card-havuc:hover {
    border-color: #d97706;
}

.card-robot {
    border-color: #6366f1;
    background: linear-gradient(180deg, #e0e7ff 0%, white 100%);
}

.card-robot:hover {
    border-color: #4f46e5;
}

.card-hikaye {
    border-color: #d97706;
    background: linear-gradient(180deg, #fffbeb 0%, white 100%);
}

.card-hikaye:hover {
    border-color: #b45309;
}

.card-oyun {
    border-color: var(--success);
    background: linear-gradient(180deg, #ecfdf5 0%, white 100%);
}

.card-oyun:hover {
    border-color: #059669;
}

.card-kod-macerasi {
    border-color: #7c3aed;
    background: linear-gradient(180deg, #ede9fe 0%, white 100%);
}

.card-kod-macerasi:hover {
    border-color: #6d28d9;
}

.card-oyun-yapici {
    border-color: #059669;
    background: linear-gradient(180deg, #d1fae5 0%, white 100%);
}

.card-oyun-yapici:hover {
    border-color: #047857;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.35rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
}

.card-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.35rem 0.75rem;
    background: var(--secondary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Levels */
.levels {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.levels-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.level-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.level-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    min-width: 120px;
}

.level-emoji {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.level-name {
    font-weight: 700;
    color: var(--text);
}

.level-age {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* CTA Button */
.cta {
    text-align: center;
    padding: 1rem 0 2rem;
}

.btn-start {
    font-family: 'Nunito', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-start:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.btn-start:active {
    transform: scale(0.98);
}

a.btn-start {
    display: inline-block;
    text-decoration: none;
    color: white;
}

/* Ses Düğmesi */
.sound-toggle-wrap {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.sound-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sound-toggle:hover {
    background: var(--bg-light);
    transform: scale(1.05);
}

/* Tema (Karanlık mod) düğmesi */
.theme-toggle-wrap {
    position: absolute;
    top: 1rem;
    right: 3.5rem;
}

.nav-links .theme-toggle {
    position: static;
    margin-left: 0.5rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--card-bg);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-icon {
        font-size: 3rem;
    }
}
