/* ============================================
   FARGE PALETT BASERT PÅ BILDER I IMAGES-MAPPEN
   ============================================ */
/* Browser compatibility - CSS Grid fallback */
@supports not (display: grid) {
    .container {
        display: block;
    }
    
    .game-area {
        display: block;
    }
    
    .action-buttons,
    .routine-buttons {
        display: flex;
        flex-wrap: wrap;
    }
}

:root {
    /* Primærfarger - Varme pastellfarger (rosa, lilla) */
    --primary-1: #ffb3d9; /* Myk rosa */
    --primary-2: #c8a2c8; /* Lavendel */
    --primary-3: #ff99cc; /* Lys rosa */
    
    /* Sekundærfarger - Blå og grønne toner */
    --secondary-1: #b3d9ff; /* Himmelblå */
    --secondary-2: #a8e6cf; /* Myntgrønn */
    --secondary-3: #d4e6f1; /* Lys blå */
    
    /* Aksentfarger - Varme toner */
    --accent-1: #ffd9b3; /* Peach */
    --accent-2: #ffe6cc; /* Krem */
    --accent-3: #fff0e6; /* Beige */
    
    /* Nøytrale farger - Bakgrunn og tekst */
    --neutral-1: #ffffff; /* Hvit */
    --neutral-2: #f5f5f5; /* Lys grå */
    --neutral-3: #333333; /* Mørk tekst */
    --neutral-4: #666666; /* Medium tekst */
    
    /* Spesialfarger */
    --success: #4caf50; /* Grønn for suksess */
    --warning: #ff9800; /* Oransje for advarsel */
    --error: #f44336; /* Rød for feil */
    --info: #2196f3; /* Blå for info */
    
    /* Gradient-kombinasjoner */
    --gradient-primary: linear-gradient(135deg, var(--primary-1) 0%, var(--primary-2) 50%, var(--secondary-1) 100%);
    --gradient-warm: linear-gradient(135deg, var(--accent-1) 0%, var(--primary-1) 50%, var(--accent-2) 100%);
    --gradient-cool: linear-gradient(135deg, var(--secondary-1) 0%, var(--secondary-3) 50%, var(--primary-2) 100%);
}

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

/* Achievement animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes statPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.stat-updating {
    -webkit-animation: statPulse 0.5s ease;
    animation: statPulse 0.5s ease;
    color: var(--primary-1);
    font-weight: bold;
}

body {
    font-family: 'Comic Sans MS', Arial, sans-serif;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-animation: gradientShift 8s ease infinite;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: var(--neutral-3);
    position: relative;
}

/* Glitter sparkle effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.3) 2px, transparent 2px),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.3) 2px, transparent 2px),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.3) 2px, transparent 2px);
    background-size: 200px 200px, 150px 150px, 180px 180px;
    background-position: 0 0, 100px 100px, 50px 200px;
    -webkit-animation: sparkle 3s linear infinite;
    animation: sparkle 3s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.6; transform: translateY(-10px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--neutral-1) 0%, var(--accent-3) 50%, var(--secondary-3) 100%);
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(255, 179, 217, 0.4), 0 0 30px rgba(200, 162, 200, 0.3);
    overflow: hidden;
    border: 5px solid;
    border-image: linear-gradient(45deg, var(--primary-1), var(--secondary-1), var(--accent-1), var(--primary-2)) 1;
    position: relative;
    z-index: 1;
}

header {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-animation: gradientShift 5s ease infinite;
    animation: gradientShift 5s ease infinite;
    color: var(--neutral-1);
    padding: 20px;
    padding-top: 50px;
    padding-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: visible;
}

header::before {
    content: '✨';
    position: absolute;
    font-size: 2em;
    opacity: 0.5;
    -webkit-animation: float 3s ease-in-out infinite;
    animation: float 3s ease-in-out infinite;
}

header::after {
    content: '⭐';
    position: absolute;
    font-size: 1.5em;
    opacity: 0.5;
    right: 10%;
    -webkit-animation: float 2s ease-in-out infinite reverse;
    animation: float 2s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(10deg); }
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 
        3px 3px 0px var(--secondary-1),
        -3px -3px 0px var(--primary-2),
        0 0 20px rgba(255,255,255,0.8);
    animation: titlePulse 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-width: 100%;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.header-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .header-controls {
        gap: 8px;
    }
    
    .music-btn {
        padding: 6px 12px;
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    .header-controls {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .music-btn {
        padding: 5px 10px;
        font-size: 1.2em;
        margin-left: 5px !important;
    }
    
    .year-display {
        font-size: 1em;
        padding: 5px 10px;
    }
    
    #moneyDisplay {
        font-size: 0.9em;
        padding: 3px 8px;
        margin: 0 5px !important;
    }
}

@media (max-width: 480px) {
    .header-controls {
        gap: 3px;
        justify-content: space-around;
    }
    
    .music-btn {
        padding: 4px 8px;
        font-size: 1.1em;
        margin-left: 3px !important;
    }
    
    .year-display {
        font-size: 0.9em;
        padding: 4px 8px;
        display: none; /* Hide on very small screens */
    }
    
    #moneyDisplay {
        font-size: 0.8em;
        padding: 2px 6px;
    }
}

.year-display {
    font-size: 1.2em;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.music-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.music-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.music-btn.muted {
    opacity: 0.6;
}

.game-area {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 20px;
}

.child-status {
    background: var(--gradient-warm);
    border-radius: 20px;
    padding: 20px;
    padding-top: 40px;
    padding-bottom: 40px;
    text-align: center;
    border: 3px solid var(--primary-1);
    box-shadow: 0 0 20px rgba(255, 179, 217, 0.3);
    position: relative;
    overflow: visible;
}

.child-status::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, var(--primary-1), var(--secondary-1), var(--accent-1), var(--primary-2));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.5;
    -webkit-animation: borderGlow 3s ease infinite;
    animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.child-avatar {
    font-size: 80px;
    margin-bottom: 15px;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--neutral-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--secondary-1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.child-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.child-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    /* Subtle filters for visual enhancement */
    filter: brightness(1.05) saturate(1.1) contrast(1.05);
}

.child-avatar svg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

/* Animation for character avatar when happy */
.child-avatar.animated {
    -webkit-animation: characterPulse 2s ease-in-out infinite;
    animation: characterPulse 2s ease-in-out infinite;
}

@keyframes characterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Subtle animation for emotions */
.child-avatar[data-emotion="happy"] {
    -webkit-animation: gentlePulse 2s ease-in-out infinite;
    animation: gentlePulse 2s ease-in-out infinite;
    filter: brightness(1.1) saturate(1.15);
}

.child-avatar[data-emotion="sad"] {
    opacity: 0.85;
    filter: brightness(0.9) saturate(0.85) contrast(0.95);
}

.child-avatar[data-emotion="angry"] {
    -webkit-animation: slightShake 0.5s ease-in-out infinite;
    animation: slightShake 0.5s ease-in-out infinite;
    filter: brightness(1.05) saturate(1.2) hue-rotate(5deg);
}

.child-avatar[data-emotion="excited"] {
    animation: gentleBounce 1s ease-in-out infinite;
    filter: brightness(1.15) saturate(1.2);
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes slightShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Emotion display animations */
@keyframes emotionGlow {
    0%, 100% { 
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
        transform: scale(1.02);
    }
}

@keyframes emotionPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(0.98);
    }
}

@keyframes emotionShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

@keyframes emotionFade {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.7;
    }
}

.child-status h2 {
    background: linear-gradient(45deg, var(--primary-1), var(--secondary-1), var(--primary-2));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(255, 179, 217, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-width: 100%;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat {
    text-align: left;
}

.stat-label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: break-word;
}

.stat-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.stat-fill {
    height: 100%;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: gradientShift 2s ease infinite;
    transition: width 0.3s ease, filter 0.3s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.5);
    /* Subtle glow effect */
    filter: brightness(1.05);
}

.stat-fill.hunger-fill {
    background: linear-gradient(90deg, var(--warning), #f57c00);
}

.stat-fill.hunger-fill.low {
    background: linear-gradient(90deg, var(--error), #c62828);
}

.stat-bar span {
    font-size: 0.9em;
    color: #666;
}

/* Progress stats (hidden stats) */
.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.stat-label-mini {
    font-weight: 500;
    color: #666;
    min-width: 100px;
    font-size: 0.85em;
}

.stat-bar-mini {
    flex: 1;
    height: 15px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.stat-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #45a049);
    transition: width 0.3s ease;
    border-radius: 8px;
}

.toggle-stats-btn {
    width: 100%;
    margin-top: 10px;
}

.game-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scene-area {
    background: var(--gradient-cool);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    border: 3px solid var(--primary-1);
    box-shadow: 0 0 15px rgba(255, 179, 217, 0.3);
}

.scene-image {
    width: 100%;
    height: 250px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 4px solid var(--neutral-1);
    box-shadow: 0 0 20px rgba(255, 179, 217, 0.5), inset 0 0 20px rgba(179, 217, 255, 0.3);
    overflow: hidden;
    position: relative;
}

.scene-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: filter 0.5s ease, transform 0.5s ease, opacity 0.5s ease;
    /* Subtle enhancement for scene images */
    filter: brightness(1.02) contrast(1.05) saturate(1.08);
    /* Add subtle shadow for depth */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.scene-image:hover img {
    filter: brightness(1.05) contrast(1.08) saturate(1.12);
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.scene-image svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
}

.scene-name {
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-1), var(--secondary-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(255, 179, 217, 0.3);
}

.narrative-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.child-dialogue {
    background: var(--gradient-cool);
    border-left: 5px solid;
    border-image: linear-gradient(180deg, var(--primary-1), var(--secondary-1)) 1;
    padding: 15px;
    border-radius: 15px;
    min-height: 60px;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.2);
}

.child-dialogue p {
    font-size: 1.1em;
    color: #2e7d32;
    font-style: italic;
    overflow: hidden;
    word-wrap: break-word;
    text-overflow: ellipsis;
}

.story-message {
    background: linear-gradient(135deg, var(--accent-3) 0%, var(--accent-2) 100%);
    border-left: 5px solid;
    border-image: linear-gradient(180deg, var(--accent-1), var(--primary-1)) 1;
    padding: 15px;
    border-radius: 15px;
    min-height: 60px;
    box-shadow: 0 0 10px rgba(255, 217, 179, 0.3);
}

.story-message p {
    font-size: 1.1em;
    color: #856404;
    overflow: hidden;
    word-wrap: break-word;
    text-overflow: ellipsis;
}

.choices-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-btn {
    background: var(--neutral-1);
    border: 2px solid var(--secondary-1);
    color: var(--primary-2);
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-weight: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.choice-btn:hover {
    background: var(--secondary-1);
    color: var(--neutral-1);
    transform: translateX(5px);
}

.choice-btn:active {
    transform: translateX(2px);
}

.actions-area {
    background: var(--gradient-cool);
    border-radius: 20px;
    padding: 20px;
    border: 3px solid var(--primary-1);
    box-shadow: 0 0 15px rgba(255, 179, 217, 0.3);
}

.daily-routines {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.daily-routines h4 {
    background: linear-gradient(45deg, var(--primary-1), var(--secondary-1), var(--accent-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(255, 179, 217, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-width: 100%;
}

.routine-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.routine-btn {
    background: linear-gradient(135deg, var(--neutral-1) 0%, var(--accent-3) 100%);
    border: 3px solid;
    border-image: linear-gradient(45deg, var(--secondary-1), var(--primary-1)) 1;
    color: var(--primary-2);
    padding: 10px;
    border-radius: 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: break-word;
}

.routine-btn:hover {
    background: var(--gradient-primary);
    color: var(--neutral-1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 179, 217, 0.6);
}

.routine-btn:active {
    transform: translateY(0);
}

.actions-area h3 {
    background: linear-gradient(45deg, var(--primary-1), var(--secondary-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-shadow: 2px 2px 4px rgba(255, 179, 217, 0.3);
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    max-width: 100%;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-btn {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: var(--neutral-1);
    border: 2px solid var(--neutral-1);
    padding: 15px;
    border-radius: 15px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 0 15px rgba(255, 179, 217, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: break-word;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(179, 217, 255, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.action-btn small {
    display: block;
    font-size: 0.8em;
    margin-top: 5px;
    opacity: 0.9;
}

.time-control {
    background: var(--gradient-cool);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 3px solid var(--secondary-1);
    box-shadow: 0 0 15px rgba(179, 217, 255, 0.3);
}

.time-btn {
    background: linear-gradient(135deg, var(--secondary-1) 0%, var(--primary-1) 100%);
    color: var(--neutral-1);
    border: 2px solid var(--neutral-1);
    padding: 12px 24px;
    border-radius: 15px;
    font-size: 1.1em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(255, 179, 217, 0.5);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.time-btn:hover {
    background: var(--gradient-primary);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 179, 217, 0.8);
}

.time-info {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #495057;
    flex-wrap: wrap;
    align-items: center;
}

.time-info span {
    padding: 5px 10px;
    background: linear-gradient(135deg, rgba(255, 179, 217, 0.3), rgba(179, 217, 255, 0.3));
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 0 10px rgba(255, 179, 217, 0.3);
}

/* Sticker decorations */
.sticker-decoration {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    animation: stickerFloat 4s ease-in-out infinite;
}

.sticker-top-left {
    top: 10px;
    left: 10px;
    transform: rotate(-15deg);
}

.sticker-avatar {
    top: 5px;
    right: 5px;
    transform: rotate(20deg);
}

.sticker-avatar-bottom {
    bottom: 5px;
    left: 5px;
    transform: rotate(-20deg);
}

.header-title-wrapper {
    position: relative;
    z-index: 1;
    padding-left: 100px;
    padding-right: 100px;
}

@media (max-width: 768px) {
    .header-title-wrapper {
        padding-left: 80px;
        padding-right: 20px;
    }
    
    .sticker-top-left {
        top: 5px;
        left: 5px;
    }
    
    .sticker-img {
        width: 60px;
        height: 60px;
    }
}

.sticker-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 15px rgba(255,0,255,0.5);
    filter: drop-shadow(0 0 10px rgba(0,255,255,0.5));
}

.sticker-img-small {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(255,0,255,0.4);
    filter: drop-shadow(0 0 8px rgba(0,255,255,0.4));
}

@keyframes stickerFloat {
    0%, 100% { transform: translateY(0) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-10px) rotate(calc(var(--rotation, 0deg) + 5deg)); }
}

.sticker-top-left {
    --rotation: -15deg;
}

.sticker-avatar {
    --rotation: 20deg;
}

.sticker-avatar-bottom {
    --rotation: -20deg;
}

/* Action icons */
/* Image optimization */
img {
    /* Edge support - must come first */
    image-rendering: -webkit-optimize-contrast;
    /* Standard support */
    image-rendering: crisp-edges;
    /* Fallback */
    image-rendering: optimize-quality;
    will-change: auto; /* Only when needed */
}

.action-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
    filter: drop-shadow(0 0 5px rgba(255,0,255,0.5));
    object-fit: contain; /* Preserve aspect ratio */
}

.routine-btn .action-icon {
    width: 20px;
    height: 20px;
}

.feed-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%) !important;
    border: 3px solid #ff6600 !important;
    position: relative;
}

.feed-btn:hover {
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%) !important;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.8) !important;
}

.feed-icon {
    width: 24px !important;
    height: 24px !important;
    filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.8)) !important;
    animation: pulse 2s infinite;
}

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

.btn-text {
    font-weight: bold;
    margin-left: 5px;
}

.child-avatar {
    transition: transform 0.2s, box-shadow 0.2s;
}

.child-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--gradient-cool);
    margin: 5% auto;
    padding: 0;
    border: 4px solid var(--primary-1);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 0 30px rgba(255, 179, 217, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: var(--gradient-primary);
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.close-modal {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 20px;
}

.profile-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 2px solid var(--primary-1);
}

.universe-modal {
    max-width: 900px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.universe-btn {
    transition: transform 0.2s, box-shadow 0.2s;
}

.universe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.universe-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .universe-modal {
        width: 95% !important;
        margin: 2% auto !important;
    }
}

.profile-section h3 {
    margin-top: 0;
    color: var(--primary-2);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.avatar-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.current-avatar {
    text-align: center;
}

.child-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border: 4px solid var(--neutral-1);
    box-shadow: 0 0 20px rgba(255, 179, 217, 0.5);
    margin: 0 auto 10px;
}

.avatar-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--neutral-1) 0%, var(--accent-3) 100%);
    border: 2px solid var(--primary-1);
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-2);
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: var(--neutral-1);
}

.avatar-tab-content {
    display: none;
}

.avatar-tab-content.active {
    display: block;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.badge-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neutral-1) 0%, var(--accent-3) 100%);
    border: 3px solid var(--primary-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 179, 217, 0.6);
}

.badge-option.selected {
    border-color: var(--secondary-1);
    box-shadow: 0 0 20px rgba(179, 217, 255, 0.8);
}

.money-display-profile {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.shop-item {
    background: linear-gradient(135deg, var(--neutral-1) 0%, var(--accent-3) 100%);
    border: 2px solid var(--primary-1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 179, 217, 0.4);
}

.shop-item.owned {
    opacity: 0.6;
    cursor: not-allowed;
}

.shop-item-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.shop-item-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary-2);
}

.shop-item-price {
    color: #ff6600;
    font-weight: bold;
}

.language-selector {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.language-selector label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--neutral-1) 0%, var(--accent-3) 100%);
    border: 2px solid var(--primary-1);
    border-radius: 10px;
    transition: all 0.2s;
}

.language-selector label:hover {
    background: var(--gradient-primary);
    color: var(--neutral-1);
}

.language-selector input[type="radio"] {
    cursor: pointer;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Mobile/touch devices */
    button, .action-btn, .routine-btn, .choice-btn {
        min-height: 44px; /* Minimum touch target size */
        min-width: 44px;
        padding: 12px 16px;
    }
    
    .child-avatar {
        min-height: 60px;
        min-width: 60px;
    }
    
    /* Prevent double-tap zoom on buttons */
    button, .action-btn, .routine-btn {
        touch-action: manipulation;
    }
}

/* Responsive Design - Mobile & Tablet */
@media (max-width: 768px) {
    body {
        padding: 10px;
        -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
    }
    
    .container {
        border-radius: 20px;
        border-width: 3px;
    }
    
    .game-area {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    header {
        padding: 15px 10px;
        padding-top: 40px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .header-title-wrapper {
        padding-left: 60px !important;
        padding-right: 10px !important;
    }
    
    .header-controls {
        flex-direction: row;
        gap: 5px;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .child-status {
        padding: 15px;
    }
    
    .child-avatar {
        font-size: 3em;
        min-height: 80px;
        min-width: 80px;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat {
        font-size: 0.9em;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .action-btn {
        padding: 12px;
        font-size: 0.9em;
        min-height: 48px;
    }
    
    .routine-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .routine-btn {
        padding: 12px;
        font-size: 0.85em;
        min-height: 44px;
    }
    
    .scene-area {
        min-height: 150px;
    }
    
    .narrative-area {
        padding: 10px;
    }
    
    .child-dialogue, .story-message {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .time-control {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .time-info span {
        font-size: 0.85em;
        padding: 4px 8px;
    }
    
    .sticker-img {
        width: 50px;
        height: 50px;
    }
    
    .sticker-img-small {
        width: 35px;
        height: 35px;
    }
    
    .sticker-top-left {
        top: 5px;
        left: 5px;
    }
    
    .sticker-avatar {
        top: 3px;
        right: 3px;
    }
    
    .sticker-avatar-bottom {
        bottom: 3px;
        left: 3px;
    }
    
    /* Improve modal on mobile */
    .modal-content {
        width: 95% !important;
        margin: 2% auto !important;
        max-height: 95vh;
    }
    
    /* Better button spacing */
    .routine-buttons {
        gap: 10px;
    }
}

/* Tablet specific */
@media (min-width: 769px) and (max-width: 1024px) {
    .game-area {
        grid-template-columns: 300px 1fr;
    }
    
    .routine-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPhone specific (smaller screens) */
@media (max-width: 480px) {
    body {
        padding: 5px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .container {
        border-radius: 15px;
    }
    
    header {
        padding: 10px 5px;
        padding-top: 35px;
    }
    
    header h1 {
        font-size: 1.2em;
    }
    
    .header-title-wrapper {
        padding-left: 50px !important;
        padding-right: 5px !important;
    }
    
    .header-controls {
        gap: 3px;
    }
    
    .music-btn {
        padding: 8px 12px;
        font-size: 1.1em;
        min-height: 40px;
    }
    
    .child-status {
        padding: 10px;
    }
    
    .child-avatar {
        font-size: 2.5em;
        min-height: 70px;
        min-width: 70px;
    }
    
    .stat-label {
        font-size: 0.8em;
    }
    
    .routine-buttons {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .routine-btn {
        width: 100%;
        padding: 14px;
        min-height: 48px;
        font-size: 0.9em;
    }
    
    .action-btn {
        width: 100%;
        padding: 14px;
        min-height: 48px;
    }
    
    .sticker-img {
        width: 40px;
        height: 40px;
    }
    
    .sticker-img-small {
        width: 30px;
        height: 30px;
    }
    
    .daily-routines h4 {
        font-size: 1em;
        margin-top: 15px;
        margin-bottom: 8px;
    }
    
    /* Better modal on small screens */
    .modal-content {
        width: 98% !important;
        margin: 1% auto !important;
    }
    
    .modal-body {
        padding: 15px;
    }
}

/* Save Indicator Styles */
.save-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-indicator.save-success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
    animation: savePulse 0.5s ease;
}

.save-indicator.save-error {
    background: rgba(244, 67, 54, 0.2);
    color: var(--error);
    animation: saveShake 0.5s ease;
}

@keyframes savePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes saveShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Accessibility improvements */
button:focus,
.routine-btn:focus,
.action-btn:focus,
.choice-btn:focus {
    outline: 3px solid var(--secondary-1);
    outline-offset: 2px;
}

button:focus-visible,
.routine-btn:focus-visible,
.action-btn:focus-visible,
.choice-btn:focus-visible {
    outline: 3px solid var(--secondary-1);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-1);
    color: var(--neutral-1);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Help Modal Styles */
.help-modal {
    max-width: 800px !important;
    max-height: 90vh;
    overflow-y: auto;
}

.help-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.help-section {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--primary-1);
}

.help-section h3 {
    color: var(--primary-2);
    margin-bottom: 15px;
    font-size: 1.3em;
    text-align: center;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(200, 162, 200, 0.3);
}

.help-list li:last-child {
    border-bottom: none;
}

.help-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.help-text {
    flex: 1;
    color: var(--neutral-3);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .help-sections {
        grid-template-columns: 1fr;
    }
    
    .help-section {
        padding: 15px;
    }
}

/* Mobile UX improvements */
@media (hover: none) and (pointer: coarse) {
    /* Better scrolling on mobile */
    .modal-content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* Visual feedback for swipe gestures */
    .scene-area {
        position: relative;
    }
    
    .scene-area::after {
        content: '← Swipe for å navigere →';
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7em;
        color: rgba(255, 255, 255, 0.7);
        background: rgba(0, 0, 0, 0.3);
        padding: 4px 8px;
        border-radius: 10px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .scene-area:hover::after {
        opacity: 1;
    }
    
    /* Swipe indicator for modals */
    .modal-header::before {
        content: '⬇ Swipe ned for å lukke';
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7em;
        color: rgba(255, 255, 255, 0.6);
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .modal:not([style*="display: none"]) .modal-header::before {
        opacity: 1;
        animation: fadeInOut 3s ease-in-out;
    }
    
    @keyframes fadeInOut {
        0%, 100% { opacity: 0; }
        20%, 80% { opacity: 1; }
    }
    
    /* Better button feedback on touch */
    button:active, .action-btn:active, .routine-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
    
    /* Prevent text selection on buttons during touch */
    button, .action-btn, .routine-btn {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* ============================================
   NAVIGATION MENU SYSTEM
   ============================================ */

.main-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--primary-1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.menu-tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 5px;
    gap: 5px;
    max-width: 100%;
    overflow-x: auto;
}

.menu-tab {
    flex: 1;
    min-width: 80px;
    padding: 12px 8px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    color: var(--neutral-4);
    font-weight: 500;
}

.menu-tab:hover {
    background: rgba(255, 179, 217, 0.2);
    transform: translateY(-2px);
}

.menu-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-1);
    box-shadow: 0 4px 10px rgba(255, 179, 217, 0.4);
    font-weight: bold;
}

.menu-icon {
    font-size: 1.5em;
    line-height: 1;
}

.menu-text {
    font-size: 0.9em;
    white-space: nowrap;
}

/* Menu Tab Content */
.menu-tab-content {
    display: none;
    min-height: calc(100vh - 200px);
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.menu-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.tab-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.tab-section {
    padding: 20px 0;
}

.tab-section h2 {
    color: var(--primary-1);
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.tab-section h3 {
    color: var(--primary-2);
    margin: 25px 0 15px 0;
    font-size: 1.5em;
}

.tab-section h4 {
    color: var(--neutral-3);
    margin: 15px 0 10px 0;
    font-size: 1.2em;
}

/* About Content Styles */
.about-content {
    line-height: 1.8;
    color: var(--neutral-3);
}

.intro-text {
    font-size: 1.1em;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 179, 217, 0.1);
    border-radius: 15px;
    border-left: 4px solid var(--primary-1);
}

.feature-list, .tips-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li, .tips-list li {
    padding: 12px 15px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 4px solid var(--secondary-1);
    transition: transform 0.2s;
}

.feature-list li:hover, .tips-list li:hover {
    transform: translateX(5px);
    background: rgba(255, 179, 217, 0.2);
}

/* How to Play Steps */
.how-to-play {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
}

.step {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.5em;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(255, 179, 217, 0.4);
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin-top: 0;
    color: var(--primary-1);
}

.step-content p {
    margin: 8px 0 0 0;
    color: var(--neutral-4);
}

/* Project Info */
.project-info {
    background: rgba(200, 162, 200, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.project-info p {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(200, 162, 200, 0.2);
}

.project-info p:last-child {
    border-bottom: none;
}

/* Contact Info */
.contact-info {
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-details {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 179, 217, 0.1);
    border-radius: 10px;
    border: 2px solid var(--primary-1);
}

.email-link a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white !important;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(255, 179, 217, 0.4);
}

.email-link a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 179, 217, 0.6);
}

/* Profile Tab Styles */
.profile-tab-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-info-card {
    text-align: center;
    padding: 30px;
    background: var(--gradient-primary);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(255, 179, 217, 0.3);
    color: white;
}

.profile-avatar-large {
    margin: 0 auto 20px;
    width: 120px;
    height: 120px;
}

.child-avatar-large {
    width: 100%;
    height: 100%;
    font-size: 5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 4px solid white;
}

.profile-info-card h3 {
    margin: 10px 0 5px 0;
    font-size: 1.8em;
    color: white;
}

.profile-username {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.profile-action-btn {
    width: 100%;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    font-size: 1.1em;
    border-radius: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: 2px solid #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
}

.btn-icon {
    font-size: 1.3em;
}

.btn-text {
    font-weight: 600;
}

.profile-stats-summary {
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.profile-stats-summary h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: var(--gradient-primary);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 179, 217, 0.3);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 179, 217, 0.4);
}

.stat-card .stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
}

/* Hide game area when menu tabs are active */
.game-area.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-tabs {
        padding: 8px 3px;
        gap: 3px;
    }
    
    .menu-tab {
        min-width: 70px;
        padding: 10px 5px;
        font-size: 0.75em;
    }
    
    .menu-icon {
        font-size: 1.3em;
    }
    
    .menu-text {
        font-size: 0.8em;
    }
    
    .menu-tab-content {
        margin: 10px;
        padding: 15px;
    }
    
    .tab-section h2 {
        font-size: 1.5em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
}

/* Install Section Styles */
.install-section {
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-top: 25px;
}

.install-section h3 {
    color: var(--primary-1);
    margin-bottom: 15px;
}

.install-info {
    padding: 15px;
    background: rgba(255, 179, 217, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.install-info p {
    margin: 0;
    font-size: 1em;
    color: var(--neutral-3);
}

.install-instructions {
    margin-top: 20px;
}

.install-instructions h4 {
    color: var(--primary-2);
    margin-bottom: 15px;
}

.install-platform {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-1);
}

.install-platform h5 {
    color: var(--primary-1);
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.install-steps-list {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.install-steps-list li {
    margin: 8px 0;
    color: var(--neutral-4);
    line-height: 1.6;
}

/* Accessibility and form improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.upload-hint {
    font-size: 0.9em;
    margin-top: 10px;
    color: #666;
}

.profile-bio-textarea {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--primary-1);
    font-family: inherit;
}

.save-bio-btn {
    margin-top: 10px;
}

/* Child Avatar Cursor */
#childAvatar {
    cursor: pointer;
}

