* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    /* display: flex; */
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    width: 100%;
    max-width: 100vw;
}

@media (max-width: 768px) {
    body {
        padding: 10px 0;
    }
}

/* Animated stars background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 5s infinite;
    opacity: 0.6;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 20px;
    position: relative;
    z-index: 1;
    margin: auto;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Screen */
.welcome-content {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.game-title {
    font-size: 3.5em;
    color: #667eea;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.5em;
    color: #666;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 30px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    transition: all 0.3s;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-large {
    padding: 20px 50px;
    font-size: 1.3em;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.9em;
}

.btn-quit {
    background: #ff6b6b;
    color: white;
}

/* Level Selection Screen */
.header {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 15px;
}

.player-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 1.2em;
    color: #666;
}

.score-badge {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.level-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.level-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.level-card h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
}

.level-card p {
    color: #666;
    margin-bottom: 15px;
}

.level-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
}

.high-score {
    color: #f5576c;
    font-weight: 600;
    font-size: 0.9em;
}

.header-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

/* Login/Register Styles */
.link-text {
    margin-top: 20px;
    color: #666;
    font-size: 0.9em;
}

.link-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.link-text a:hover {
    text-decoration: underline;
}

.form-group small {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
}

.error-message {
    color: #ff6b6b;
    background: #ffe0e0;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: none;
    font-size: 0.9em;
}

.error-message.show {
    display: block;
}

/* Profile Screen */
.profile-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.profile-header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin: 0;
}

.profile-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
}

.profile-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile-info h3 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

.profile-username {
    font-size: 1.2em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 15px;
}

.profile-detail {
    color: #666;
    margin: 5px 0;
    font-size: 1em;
}

.profile-stats {
    margin-bottom: 20px;
}

.profile-stats h4 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
}

.profile-achievements h4 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.high-scores-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.high-score-item {
    background: white;
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.high-score-item .operation {
    font-size: 2em;
    margin-bottom: 5px;
}

.high-score-item .operation-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.high-score-item .score {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
}

/* Garden Button */
.btn-garden {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: white;
}

/* Mixed Level Card */
.level-card-special {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    border: 3px solid #ffa500;
    transform: scale(1.05);
}

.level-card-special h3,
.level-card-special p {
    color: white;
}

.special-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.reward-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.85em;
    color: #fff;
    font-weight: 600;
}

/* Section Divider for Triple Games */
.section-divider {
    text-align: center;
    margin: 40px 0 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.9) 0%, rgba(255, 165, 0, 0.9) 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.section-divider h3 {
    color: white;
    font-size: 1.6em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
}

/* Triple (Three-Factor) Level Cards */
.levels-grid-triple {
    margin-top: 20px;
}

.level-card-triple {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
    border: 3px solid #ff4757;
    position: relative;
    overflow: hidden;
}

.level-card-triple::before {
    content: '🔥';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: flame 0.5s infinite alternate;
}

@keyframes flame {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.level-card-triple h3,
.level-card-triple p {
    color: white;
}

.level-card-triple .level-icon {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.triple-badge {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    font-size: 0.9em;
    padding: 6px 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px 5px rgba(46, 204, 113, 0.2); }
}

.level-card-triple .high-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}

.level-card-triple:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(255, 71, 87, 0.4);
}

/* Triple special mixed card */
.level-card-triple.level-card-special {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 50%, #6bcb77 100%);
    border: 3px solid gold;
}

.level-card-triple.level-card-special::before {
    content: '👑';
    animation: crown 1s infinite alternate;
}

@keyframes crown {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.2) rotate(5deg); }
}

/* Triple Cocktail Card - Mixed operations in same question */
.level-card-cocktail {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 50%, #00d2ff 100%);
    color: white;
    border: 3px solid #764ba2;
    position: relative;
    overflow: hidden;
    animation: cocktailShimmer 3s ease-in-out infinite;
}

@keyframes cocktailShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.level-card-cocktail {
    background-size: 200% 200%;
}

.level-card-cocktail::before {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: sparkle 0.8s infinite alternate;
}

@keyframes sparkle {
    from { transform: scale(1) rotate(0deg); opacity: 0.7; }
    to { transform: scale(1.3) rotate(15deg); opacity: 1; }
}

.level-card-cocktail h3,
.level-card-cocktail p {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.level-card-cocktail .level-icon {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cocktail-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    font-size: 0.9em;
    padding: 6px 16px;
    animation: cocktailPulse 2s infinite;
}

@keyframes cocktailPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(240, 147, 251, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 8px rgba(240, 147, 251, 0.3); }
}

.level-card-cocktail .high-score {
    background: rgba(255, 255, 255, 0.25);
    padding: 8px 15px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}

.level-card-cocktail:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5);
}

/* Cocktail leaderboard tab styling */
.leaderboard-tab-cocktail {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%) !important;
    color: white !important;
    border: 2px solid #764ba2 !important;
}

.leaderboard-tab-cocktail:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.leaderboard-tab-cocktail.active {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%) !important;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

/* Typing Challenge Card */
.level-card-typing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 3px solid #5a67d8;
    position: relative;
    overflow: hidden;
}

.level-card-typing::before {
    content: '⚡';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: pulse 1.5s infinite;
}

.level-card-typing h3,
.level-card-typing p {
    color: white;
}

.level-card-typing .level-icon {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.typing-badge {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    font-size: 0.9em;
    padding: 6px 16px;
    animation: pulse 2s infinite;
}

.level-card-typing .high-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}

.level-card-typing:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5);
}

.level-card-typing .reward-hint {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Word Typing Challenge Card */
.level-card-word-typing {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border: 3px solid #ff5252;
    position: relative;
    overflow: hidden;
}

.level-card-word-typing::before {
    content: '💨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    animation: slide 1s infinite;
}

@keyframes slide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.level-card-word-typing h3,
.level-card-word-typing p {
    color: white;
}

.level-card-word-typing .level-icon {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.word-typing-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-size: 0.9em;
    padding: 6px 16px;
    animation: pulse 2s infinite;
    font-weight: 700;
}

.level-card-word-typing .high-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}

.level-card-word-typing:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.5);
}

.level-card-word-typing .reward-hint {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Arabic Word Typing Challenge Card */
.level-card-arabic-typing {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: 3px solid #229954;
    position: relative;
    overflow: hidden;
}

.level-card-arabic-typing::before {
    content: '🌙';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5em;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.level-card-arabic-typing h3,
.level-card-arabic-typing p {
    color: white;
    direction: rtl;
    text-align: right;
}

.level-card-arabic-typing .level-icon {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.arabic-typing-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    font-size: 0.9em;
    padding: 6px 16px;
    animation: pulse 2s infinite;
    font-weight: 700;
    direction: rtl;
}

.level-card-arabic-typing .high-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    direction: rtl;
}

.level-card-arabic-typing:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(46, 204, 113, 0.5);
}

.level-card-arabic-typing .reward-hint {
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    direction: rtl;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Garden Styles */
.garden-content {
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    margin: 20px auto;
}

.garden-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.garden-header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin: 0;
}

.garden-actions {
    display: flex;
    gap: 10px;
}

.garden-info {
    margin-bottom: 20px;
}

.inventory-panel {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.inventory-panel h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.inventory-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.inventory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.inventory-item.selected {
    border: 3px solid #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

.inventory-item .plant-icon {
    font-size: 3em;
    margin-bottom: 5px;
}

.inventory-item .plant-name {
    font-size: 0.9em;
    color: #333;
    font-weight: 600;
}

.inventory-item .plant-quantity {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
}

.garden-area {
    background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    border-radius: 20px;
    padding: 20px;
    min-height: 400px;
    position: relative;
    overflow: auto;
}

.garden-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.garden-cell {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 3em;
    position: relative;
    min-height: 120px;
    height: 100%;
}

.garden-cell:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.garden-cell.occupied {
    background: rgba(255, 255, 255, 0.3);
    cursor: default;
}

.garden-cell.occupied:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1);
}

/* Plant Container */
.plant-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 8px;
    gap: 6px;
}

.plant-emoji {
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

/* Health Bar */
.plant-health-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.plant-health-fill {
    height: 100%;
    transition: width 0.5s ease, background 0.3s ease;
    border-radius: 10px;
}

/* Plant Actions */
.plant-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 8px 0;
}

.plant-container:hover .plant-actions,
.plant-container.active .plant-actions {
    opacity: 1;
}

.plant-action-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 12px;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.plant-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
}

.plant-action-btn:active {
    transform: translateY(-1px);
}

.water-btn {
    background: linear-gradient(135deg, #56CCF2 0%, #2F80ED 100%);
}

.water-btn:hover {
    background: linear-gradient(135deg, #7dd3fc 0%, #3b82f6 100%);
    box-shadow: 0 6px 15px rgba(47, 128, 237, 0.5);
}

.remove-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
}

.remove-btn:hover {
    background: linear-gradient(135deg, #ff8787 0%, #f06595 100%);
    box-shadow: 0 6px 15px rgba(238, 90, 111, 0.5);
}

.garden-instructions {
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.garden-instructions p {
    margin: 5px 0;
    font-size: 0.9em;
}

/* Shop Styles */
.shop-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1200px;
    margin: 20px auto;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.shop-description {
    width: 100%;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.shop-header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin: 0;
}

.points-display {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.shop-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.shop-item .plant-icon {
    font-size: 4em;
    margin-bottom: 10px;
}

.shop-item .plant-name {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.shop-item .plant-description {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 15px;
    min-height: 40px;
}

.shop-item .plant-cost {
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.shop-item .plant-cost.free {
    background: #84fab0;
}

.shop-item .btn-buy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.shop-item .btn-buy:hover {
    transform: scale(1.05);
}

.shop-item .btn-buy:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.shop-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Wallpaper Shop */
.wallpaper-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.wallpaper-item {
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.wallpaper-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.wallpaper-item.owned {
    border-color: #4CAF50;
}

.wallpaper-item.active {
    border-color: #FFD700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.wallpaper-preview {
    width: 100%;
    height: 150px;
    border-radius: 15px;
    margin-bottom: 10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.wallpaper-name {
    font-size: 1.1em;
    font-weight: 700;
    color: white;
    margin: 10px 0 5px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.wallpaper-description {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.wallpaper-cost {
    font-size: 1.1em;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.wallpaper-cost.free {
    color: #4CAF50;
}

.wallpaper-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wallpaper-badge.active-badge {
    background: #FFD700;
    color: #000;
}

.btn-wallpaper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-wallpaper:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.btn-wallpaper:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-wallpaper.apply {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-wallpaper.apply:hover {
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.5);
}

/* Character Shop */
.character-shop-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea33 0%, #764ba233 100%);
    border-radius: 15px;
}

.character-shop-intro p {
    font-size: 1.1em;
    color: #333;
    margin: 0;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.character-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid transparent;
    position: relative;
}

.character-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.character-item.owned {
    border-color: #4CAF50;
}

.character-item.active {
    border-color: #FFD700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.character-emoji-large {
    font-size: 5em;
    margin-bottom: 10px;
    display: block;
}

.character-item-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin: 10px 0 5px 0;
}

.character-item-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.character-item-personality {
    font-size: 0.85em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.character-item-cost {
    font-size: 1.1em;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 12px;
}

.character-item-cost.free {
    color: #4CAF50;
}

.character-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.character-badge.active-badge {
    background: #FFD700;
    color: #000;
}

.btn-character {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-character:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.btn-character:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-character.select {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-character.select:hover {
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.5);
}

/* Character Companion (in-game) */
.character-companion {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6f0 100%);
    border-radius: 20px;
    padding: 15px 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInCharacter 0.5s ease-out;
}

@keyframes slideInCharacter {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.character-avatar {
    flex-shrink: 0;
}

.character-emoji {
    font-size: 3em;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.character-message {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 12px 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Celebration style for quick answers */
.character-message.character-celebration {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    animation: celebrationPulse 0.5s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

@keyframes celebrationPulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.character-text {
    margin: 0;
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
}

.character-hint {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

/* Sticker Shop & Layer */
.sticker-shop-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb33 0%, #f5576c33 100%);
    border-radius: 15px;
}

.sticker-shop-intro p {
    font-size: 1.1em;
    color: #333;
    margin: 0 0 10px 0;
}

.sticker-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 5px 0;
}

.sticker-tab {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 600;
    color: #666;
}

.sticker-tab:hover {
    background: #f8f9fa;
    border-color: #f093fb;
}

.sticker-tab.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: #f093fb;
}

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.sticker-item {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.sticker-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}

.sticker-item.owned {
    border: 3px solid #4caf50;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
}

.sticker-emoji {
    font-size: 3em;
    margin-bottom: 8px;
    display: block;
}

.sticker-info {
    margin-top: 10px;
}

.sticker-name {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.sticker-cost {
    font-size: 0.85em;
    color: #666;
    font-weight: 600;
}

.btn-sticker {
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.85em;
}

.btn-sticker:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.5);
}

.btn-sticker:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Sticker Layer for Placements */
.sticker-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.placed-sticker {
    position: absolute;
    font-size: 4em;
    cursor: grab;
    pointer-events: all;
    transition: filter 0.2s;
    user-select: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.placed-sticker:hover {
    filter: brightness(1.2);
}

.placed-sticker:active {
    cursor: grabbing;
}

/* Sticker Controls */
.sticker-controls {
    display: flex;
    gap: 12px;
    background: white;
    padding: 12px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    pointer-events: all;
    z-index: 1000;
    animation: fadeIn 0.2s;
    touch-action: manipulation;
}

.sticker-control-btn {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.sticker-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.sticker-control-btn:active {
    transform: scale(0.95);
}

.sticker-control-btn.remove {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
}

.sticker-control-btn.remove:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Sticker Manager */
.sticker-manager-intro {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
}

.sticker-manager-intro .hint-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.owned-stickers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    max-height: 450px;
    overflow-y: auto;
    padding: 10px;
}

.owned-sticker-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
}

.owned-sticker-item:hover {
    transform: scale(1.05);
    border-color: #f093fb;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
}

.owned-sticker-item .sticker-emoji {
    font-size: 3.5em;
}

.owned-sticker-item .sticker-name {
    font-size: 0.85em;
    margin-top: 8px;
    color: #666;
}

/* Placed Stickers Management */
.placed-stickers-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.placed-stickers-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3em;
}

.placed-stickers-controls {
    margin-bottom: 15px;
    text-align: right;
}

.placed-stickers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 10px;
}

.placed-sticker-card {
    background: white;
    border: 2px solid #f093fb;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
}

.placed-sticker-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.placed-sticker-card .sticker-emoji {
    font-size: 3em;
    display: block;
    margin-bottom: 8px;
}

.placed-sticker-card .sticker-name {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.btn-remove-sticker {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f55 0%, #f33 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.8em;
}

.btn-remove-sticker:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.4);
}

.placed-stickers-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

.sticker-manager-intro h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3em;
}

/* Toggle UI Button */
.toggle-ui-btn {
    position: absolute;
    right: 20px;
    top: 20px;
}

.shop-header {
    position: relative;
}

/* Hidden panel state */
#stickerManagerContent.hidden {
    display: none;
}

/* Floating toggle button when panel is hidden */
.floating-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.floating-toggle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

/* Sticker counter badge */
.sticker-counter {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Music Player & Shop */
.music-player {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea22 0%, #764ba222 100%);
    border-radius: 15px;
}

.music-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: pulse-music 2s infinite;
}

@keyframes pulse-music {
    0%, 100% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6); }
}

.music-toggle.playing {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.current-track {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.music-shop-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea33 0%, #764ba233 100%);
    border-radius: 15px;
}

.music-shop-intro p {
    font-size: 1.1em;
    color: #333;
    margin: 5px 0;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-height: 450px;
    overflow-y: auto;
    padding: 10px;
}

.music-item {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.music-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.music-item.owned {
    border: 3px solid #4caf50;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
}

.music-emoji {
    font-size: 3.5em;
    margin-bottom: 10px;
    display: block;
}

.music-info {
    margin-top: 10px;
}

.music-name {
    font-size: 1.1em;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.music-description {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.music-cost {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.btn-music {
    margin-top: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-music:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.5);
}

.btn-music.play {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.btn-music.play.playing {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    animation: pulse-playing 1.5s infinite;
}

@keyframes pulse-playing {
    0%, 100% { box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 4px 15px rgba(255, 152, 0, 0.8); }
}

.btn-music:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Reward Notification */
.reward-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transition: all 0.5s;
    text-align: center;
}

.reward-notification.show {
    transform: translate(-50%, -50%) scale(1);
}

.reward-notification::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

.reward-content h2 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.reward-plant {
    font-size: 8em;
    margin: 20px 0;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reward-content p {
    font-size: 1.5em;
    color: #333;
    margin: 10px 0;
}

/* Modern Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    border-radius: 25px;
    padding: 35px 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 3em;
    margin-right: 15px;
}

.modal-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
    margin: 0;
}

.modal-message {
    font-size: 1.2em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.modal-btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.modal-btn-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: white;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s;
    max-width: 400px;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 2em;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.toast-message {
    font-size: 0.95em;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

.toast-success {
    border-left: 4px solid #84fab0;
}

.toast-error {
    border-left: 4px solid #ff6b6b;
}

.toast-info {
    border-left: 4px solid #667eea;
}

.toast-warning {
    border-left: 4px solid #ffa500;
}

/* Game Screen */
.game-header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-item .label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.info-item span:last-child {
    font-size: 1.5em;
    font-weight: 700;
    color: #667eea;
}

/* Speed Bonus Indicator */
.speed-bonus-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
    }
}


.question-container {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.question-display {
    font-size: 4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-input {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.answer-input input {
    flex: 1;
    max-width: 300px;
    padding: 20px;
    font-size: 2em;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
}

.answer-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-answer {
    padding: 20px 40px;
    font-size: 1.5em;
}

/* Virtual Keyboard */
.virtual-keyboard {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.keyboard-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.key-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 2em;
    font-weight: 700;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.key-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.key-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.key-btn-wide {
    width: 172px;
    font-size: 1.5em;
}

.key-btn-negative {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.key-btn-negative:hover {
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
    border-radius: 10px;
}

/* Results Screen */
.results-content {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
}

.results-content h2 {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 30px;
}

.results-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 1.3em;
}

.result-item:last-of-type {
    border-bottom: none;
}

.result-label {
    color: #666;
    font-weight: 600;
}

.result-value {
    color: #667eea;
    font-weight: 700;
    font-size: 1.5em;
}

.new-high-score {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    border-radius: 15px;
    font-size: 1.5em;
    font-weight: 700;
    animation: pulse 1s infinite;
}

.new-high-score.show {
    display: block;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.results-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Leaderboard Screen */
.leaderboard-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: 20px auto;
}

.leaderboard-content h2 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

/* Leaderboard Tabs */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.leaderboard-tab {
    padding: 12px 20px;
    background: #f5f7fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.leaderboard-tab:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.leaderboard-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Triple Games Leaderboard Tabs */
.leaderboard-tabs-triple {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px dashed rgba(255, 107, 107, 0.3);
}

.tab-section-label {
    font-weight: 700;
    color: #ff6b6b;
    padding: 12px 15px;
    font-size: 0.95em;
}

.leaderboard-tab-triple {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border-color: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.leaderboard-tab-triple:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border-color: rgba(255, 107, 107, 0.5);
}

.leaderboard-tab-triple.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-color: #ff6b6b;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.leaderboard-tab-panel {
    display: none;
}

.leaderboard-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard-table {
    margin-bottom: 30px;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 80px 1fr 80px 120px;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-weight: 700;
    margin-bottom: 15px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 80px 60px 1fr 80px 120px;
    gap: 15px;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.leaderboard-row:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.leaderboard-row span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-medal {
    font-size: 1.5em;
}

.leaderboard-avatar-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.leaderboard-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.leaderboard-name {
    justify-content: flex-start !important;
    padding-left: 10px;
    font-weight: 500;
}

.leaderboard-age {
    color: #666;
}

.leaderboard-score {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5em;
    }
    
    .subtitle {
        font-size: 1.2em;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
    
    .question-display {
        font-size: 2.5em;
    }
    
    .answer-input {
        flex-direction: column;
    }
    
    .answer-input input {
        max-width: 100%;
    }
    
    .key-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }
    
    .key-btn-wide {
        width: 132px;
        font-size: 1.2em;
    }
    
    .keyboard-row {
        gap: 8px;
    }
    
    .virtual-keyboard {
        gap: 8px;
    }
    
    .game-info {
        gap: 15px;
    }
    
    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 50px 40px 1fr 60px 80px;
        gap: 8px;
        font-size: 0.9em;
        padding: 10px;
    }
    
    .leaderboard-avatar-container {
        width: 35px;
        height: 35px;
    }
    
    .rank-medal {
        font-size: 1.2em;
    }
    
    .leaderboard-tabs {
        gap: 5px;
    }
    
    .leaderboard-tab {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* ===== GARDENER SHOP ===== */
#gardenerShopScreen .container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

#gardenerShopScreen .shop-content {
    background: white;
    width: 100%;
    max-width: 1300px;
}

.gardener-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 25px;
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    padding: 20px 10px;
}

.gardener-item {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 3px solid transparent;
    position: relative;
}

.gardener-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.gardener-item.hired {
    border: 3px solid #4caf50;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
}

.gardener-item.hired::before {
    content: '✓ HIRED';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4caf50;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
}

.gardener-image {
    font-size: 4.5em;
    margin-bottom: 15px;
    display: block;
}

.gardener-info {
    margin-top: 15px;
}

.gardener-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.gardener-specialty {
    font-size: 0.9em;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.gardener-description {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.gardener-skill-level {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.skill-star {
    color: #ffd700;
    font-size: 1.2em;
}

.skill-star.empty {
    color: #ddd;
}

.gardener-salary {
    font-size: 1.1em;
    color: #333;
    font-weight: 700;
    margin-bottom: 5px;
}

.salary-note {
    font-size: 0.75em;
    color: #999;
    margin-bottom: 15px;
}

.btn-gardener {
    padding: 12px 25px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
    font-size: 1em;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-gardener:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(76, 175, 80, 0.4);
}

.btn-gardener:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-fire {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.btn-fire:hover {
    box-shadow: 0 6px 15px rgba(238, 90, 111, 0.4);
}

.current-gardener-status {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #4caf50;
    width: 100%;
}

.current-gardener-status.empty {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    text-align: center;
}

/* Duration Selector */
.duration-selector {
    margin-top: 20px;
}

.duration-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.duration-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-duration {
    flex: 1;
    min-width: 80px;
    padding: 12px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.85em;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
    position: relative;
    text-align: center;
    line-height: 1.4;
}

.btn-duration:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.btn-duration small {
    display: block;
    font-size: 0.9em;
    margin-top: 5px;
    font-weight: 700;
}

.btn-duration-best {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3);
    border: 2px solid #ffd700;
}

.btn-duration-best:hover {
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

.best-value {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffd700;
    color: #333;
    font-size: 0.65em;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.current-gardener-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-gardener-image {
    font-size: 3em;
}

.current-gardener-details h3 {
    margin: 0 0 10px 0;
    color: #2e7d32;
    font-size: 1.3em;
}

.current-gardener-details p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.badge-hired {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    margin-left: 10px;
}

/* Success/Error animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.shake {
    animation: shake 0.5s;
}

.bounce {
    animation: bounce 0.5s;
}

/* Garden Gardener Info */
.garden-gardener-info {
    margin: 20px 0;
    animation: fadeIn 0.5s;
}

.active-gardener-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 3px solid #4caf50;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.2);
    transition: all 0.3s;
}

.active-gardener-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.gardener-avatar {
    font-size: 4em;
    animation: bounce 2s infinite ease-in-out;
}

.gardener-details {
    flex: 1;
}

.gardener-name-badge {
    font-size: 1.5em;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gardener-name-badge .badge-hired {
    font-size: 0.6em;
    padding: 4px 12px;
    margin: 0;
}

.gardener-specialty {
    color: #558b2f;
    font-size: 1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.gardener-contract {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.contract-time {
    background: white;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.95em;
    color: #666;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gardener-status {
    margin-top: 10px;
}

.status-working {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
    animation: pulse 2s infinite;
}

.btn-manage-gardener {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.btn-manage-gardener:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.no-gardener-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 3px dashed #bdbdbd;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.no-gardener-icon {
    font-size: 4em;
    opacity: 0.5;
}

.no-gardener-text {
    flex: 1;
    text-align: left;
}

.no-gardener-text p {
    margin: 5px 0;
    color: #666;
}

.no-gardener-text strong {
    color: #333;
    font-size: 1.2em;
}

.btn-hire-gardener {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    white-space: nowrap;
}

.btn-hire-gardener:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== CARD STORE STYLES ===== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
}

.card-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px;
    text-align: center;
    color: white;
    position: relative;
}

.card-emoji {
    font-size: 4em;
    display: block;
    margin-bottom: 10px;
}

.card-rarity {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.card-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.card-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

.card-effect {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #555;
}

.card-owned {
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.card-cost {
    font-size: 1.2em;
    font-weight: bold;
    color: #FF9800;
    margin-bottom: 15px;
}

.btn-card {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.btn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

.card-shop-intro {
    background: linear-gradient(135deg, #E1BEE7, #CE93D8);
    padding: 20px;
    border-radius: 15px;
    margin: 20px;
    text-align: center;
}

.card-shop-intro p {
    margin: 10px 0;
    color: #4A148C;
    font-size: 1.1em;
}

/* Card Inventory UI in Game */

.card-inventory-ui {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 250px;
    z-index: 100;
}

.card-inventory-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E1BEE7;
}

.card-inventory-title {
    font-weight: bold;
    color: #9C27B0;
    font-size: 1.1em;
}

.card-inventory {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-inventory-btn {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.card-inventory-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.card-used-message {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9em;
    text-align: center;
}

.no-cards-message {
    background: #FFF3E0;
    color: #E65100;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9em;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .card-inventory-ui {
        position: static;
        margin: 10px;
        max-width: 100%;
    }
}

/* ===== WALLET STATEMENT STYLES ===== */

.wallet-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease-out;
}

.wallet-header {
    margin-bottom: 30px;
}

.wallet-header .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wallet-header h2 {
    color: #333;
    font-size: 2em;
    margin: 0;
}

.wallet-subtitle {
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
}

/* Wallet Summary Cards */
.wallet-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.summary-card.summary-earned {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.summary-card.summary-earned:hover {
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
}

.summary-card.summary-spent {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    box-shadow: 0 4px 15px rgba(238, 9, 121, 0.3);
}

.summary-card.summary-spent:hover {
    box-shadow: 0 8px 25px rgba(238, 9, 121, 0.4);
}

.summary-icon {
    font-size: 2.5em;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.summary-details {
    flex: 1;
}

.summary-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.summary-value {
    color: white;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Transaction Filters */
.transaction-filters {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Transactions Container */
.transactions-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Transaction Item */
.transaction-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.transaction-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.transaction-item.transaction-earned {
    border-left-color: #38ef7d;
}

.transaction-item.transaction-spent {
    border-left-color: #ff6a00;
}

.transaction-icon {
    font-size: 2em;
    text-align: center;
}

.transaction-details {
    flex: 1;
}

.transaction-description {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.transaction-date {
    font-size: 0.85em;
    color: #666;
}

.transaction-amount {
    font-size: 1.3em;
    font-weight: bold;
    text-align: right;
}

.amount-positive {
    color: #11998e;
}

.amount-negative {
    color: #ee0979;
}

.transaction-balance {
    font-size: 0.9em;
    color: #666;
    text-align: right;
    min-width: 120px;
}

/* No Transactions Message */
.no-transactions {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-transactions-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-transactions p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.no-transactions-hint {
    font-size: 0.9em;
    color: #999;
}

/* Accent Button Style */
.btn-accent {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wallet-content {
        padding: 20px;
    }
    
    .wallet-header h2 {
        font-size: 1.5em;
    }
    
    .wallet-summary {
        grid-template-columns: 1fr;
    }
    
    .transaction-item {
        grid-template-columns: 40px 1fr;
        gap: 10px;
    }
    
    .transaction-amount {
        grid-column: 2;
        text-align: left;
        margin-top: 5px;
    }
    
    .transaction-balance {
        grid-column: 2;
        text-align: left;
        font-size: 0.8em;
        min-width: auto;
    }
    
    .summary-value {
        font-size: 1.5em;
    }
    
    .transaction-filters {
        justify-content: center;
    }
    
    .filter-btn {
        font-size: 0.9em;
        padding: 8px 16px;
    }
}


/* ===== AVATAR BUILDER STYLES ===== */

.avatar-builder-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 1400px;
    margin: 20px auto;
}

.avatar-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.avatar-builder-header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin: 0;
}

.avatar-builder-header .header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-builder-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
}

/* Avatar Preview Section */
.avatar-preview-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.avatar-preview-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.avatar-preview {
    width: 250px;
    height: 250px;
    margin: 0 auto 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.avatar-preview svg {
    width: 100%;
    height: 100%;
}

/* Customization Sections */
.avatar-customization {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 10px;
}

.customization-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.customization-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.option-btn {
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.option-btn span {
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
}

/* Shape Previews */
.shape-preview, .hair-preview, .eyes-preview, .nose-preview, .mouth-preview, .accessory-preview {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Face Shapes */
.circle-shape {
    width: 45px;
    height: 45px;
    background: #FFD7A8;
    border-radius: 50%;
}

.oval-shape {
    width: 35px;
    height: 48px;
    background: #FFD7A8;
    border-radius: 50%;
}

.square-shape {
    width: 45px;
    height: 45px;
    background: #FFD7A8;
    border-radius: 5px;
}

.rounded-shape {
    width: 45px;
    height: 45px;
    background: #FFD7A8;
    border-radius: 15px;
}

/* Hair Styles */
.hair-short {
    width: 50px;
    height: 20px;
    background: #2C1810;
    border-radius: 50% 50% 0 0;
}

.hair-long {
    width: 50px;
    height: 40px;
    background: #2C1810;
    border-radius: 50% 50% 40% 40%;
}

.hair-curly {
    width: 50px;
    height: 30px;
    background: #2C1810;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.hair-bun {
    width: 50px;
    height: 25px;
    background: #2C1810;
    border-radius: 50% 50% 0 0;
    position: relative;
}

.hair-bun::after {
    content: '';
    position: absolute;
    top: -10px;
    right: 5px;
    width: 15px;
    height: 15px;
    background: #2C1810;
    border-radius: 50%;
}

.hair-spiky {
    width: 50px;
    height: 25px;
    background: linear-gradient(to top, #2C1810 50%, transparent 50%);
    background-size: 10px 100%;
}

.hair-bald {
    width: 50px;
    height: 15px;
    border-bottom: 3px solid #2C1810;
    border-radius: 50% 50% 0 0;
}

/* Eye Styles */
.eyes-round, .eyes-oval, .eyes-happy, .eyes-surprised, .eyes-glasses, .eyes-sunglasses {
    width: 50px;
    height: 20px;
    position: relative;
}

.eyes-round::before, .eyes-round::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #4A90E2;
    border-radius: 50%;
    top: 4px;
}

.eyes-round::before {
    left: 10px;
}

.eyes-round::after {
    right: 10px;
}

.eyes-oval::before, .eyes-oval::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 10px;
    background: #4A90E2;
    border-radius: 50%;
    top: 5px;
}

.eyes-oval::before {
    left: 8px;
}

.eyes-oval::after {
    right: 8px;
}

.eyes-happy::before, .eyes-happy::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 6px;
    border-bottom: 3px solid #333;
    border-radius: 0 0 50% 50%;
    top: 7px;
}

.eyes-happy::before {
    left: 10px;
}

.eyes-happy::after {
    right: 10px;
}

.eyes-surprised::before, .eyes-surprised::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #4A90E2;
    border-radius: 50%;
    border: 2px solid #333;
    top: 3px;
}

.eyes-surprised::before {
    left: 8px;
}

.eyes-surprised::after {
    right: 8px;
}

.eyes-glasses::before, .eyes-glasses::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #333;
    border-radius: 50%;
    top: 3px;
}

.eyes-glasses::before {
    left: 8px;
}

.eyes-glasses::after {
    right: 8px;
}

.eyes-sunglasses::before, .eyes-sunglasses::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 10px;
    background: #333;
    border-radius: 3px;
    top: 5px;
}

.eyes-sunglasses::before {
    left: 6px;
}

.eyes-sunglasses::after {
    right: 6px;
}

/* Nose Styles */
.nose-small {
    width: 8px;
    height: 12px;
    background: linear-gradient(to bottom, transparent 40%, #D4A574 40%);
    border-radius: 50%;
    margin: 0 auto;
}

.nose-medium {
    width: 12px;
    height: 16px;
    background: linear-gradient(to bottom, transparent 40%, #D4A574 40%);
    border-radius: 50%;
    margin: 0 auto;
}

.nose-large {
    width: 16px;
    height: 20px;
    background: linear-gradient(to bottom, transparent 40%, #D4A574 40%);
    border-radius: 50%;
    margin: 0 auto;
}

.nose-button {
    width: 10px;
    height: 10px;
    background: #D4A574;
    border-radius: 50%;
    margin: 0 auto;
}

/* Mouth Styles */
.mouth-smile {
    width: 30px;
    height: 15px;
    border-bottom: 3px solid #E74C3C;
    border-radius: 0 0 50% 50%;
    margin: 0 auto;
}

.mouth-happy {
    width: 35px;
    height: 18px;
    border-bottom: 4px solid #E74C3C;
    border-radius: 0 0 60% 60%;
    margin: 0 auto;
}

.mouth-grin {
    width: 35px;
    height: 20px;
    border: 3px solid #E74C3C;
    border-radius: 50%;
    border-top: none;
    margin: 0 auto;
    background: white;
}

.mouth-neutral {
    width: 25px;
    height: 3px;
    background: #E74C3C;
    border-radius: 2px;
    margin: 0 auto;
}

.mouth-surprised {
    width: 15px;
    height: 20px;
    border: 3px solid #E74C3C;
    border-radius: 50%;
    margin: 0 auto;
    background: white;
}

.mouth-playful {
    width: 25px;
    height: 15px;
    border-bottom: 3px solid #E74C3C;
    border-radius: 0 50% 50% 0;
    margin: 0 auto;
    transform: rotate(-5deg);
}

/* Accessory Styles */
.accessory-hat {
    width: 40px;
    height: 25px;
    background: #2C3E50;
    border-radius: 10px 10px 0 0;
    position: relative;
    margin: 0 auto;
}

.accessory-hat::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: -5px;
    right: -5px;
    height: 5px;
    background: #34495E;
    border-radius: 50%;
}

.accessory-crown {
    width: 40px;
    height: 20px;
    background: #F39C12;
    clip-path: polygon(0% 100%, 20% 50%, 25% 100%, 45% 50%, 50% 100%, 70% 50%, 75% 100%, 95% 50%, 100% 100%);
    margin: 0 auto;
}

.accessory-bow {
    width: 40px;
    height: 20px;
    position: relative;
    margin: 0 auto;
}

.accessory-bow::before, .accessory-bow::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 20px;
    background: #E91E63;
    border-radius: 50%;
}

.accessory-bow::before {
    left: 0;
}

.accessory-bow::after {
    right: 0;
}

.accessory-cap {
    width: 35px;
    height: 20px;
    background: #2196F3;
    border-radius: 50% 50% 0 0;
    position: relative;
    margin: 0 auto;
}

.accessory-cap::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 4px;
    background: #1976D2;
}

.accessory-graduate {
    width: 40px;
    height: 18px;
    background: #212121;
    position: relative;
    margin: 0 auto;
}

.accessory-graduate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 12px solid #212121;
}

.accessory-none {
    width: 50px;
    height: 50px;
    position: relative;
}

.accessory-none::before, .accessory-none::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 40px;
    background: #E74C3C;
    top: 5px;
    left: 24px;
}

.accessory-none::before {
    transform: rotate(45deg);
}

.accessory-none::after {
    transform: rotate(-45deg);
}

.option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.option-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.option-btn.locked {
    opacity: 0.6;
    cursor: pointer;
    position: relative;
}

.option-btn.locked:hover {
    opacity: 0.8;
    border-color: #ffa500;
}

.option-btn.unlocked {
    border-color: #4caf50;
}

/* Cost Badge */
.cost-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.cost-badge.free {
    background: #4caf50;
    color: white;
}

.cost-badge.owned {
    background: #2196f3;
    color: white;
}

.cost-badge.locked {
    background: #ff9800;
    color: white;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.color-picker-section {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.color-picker-section label {
    font-weight: 600;
    color: #333;
}

.color-picker-section input[type="color"] {
    width: 80px;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

/* Profile Avatar Display */
.profile-avatar-section {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 20px;
    margin-bottom: 20px;
}

.profile-avatar-display {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.profile-avatar-display svg {
    width: 100%;
    height: 100%;
}

/* Level Screen Avatar Display */
.header .player-avatar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 8px 15px;
    border-radius: 20px;
}

.header .player-avatar-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.player-avatar-icon svg {
    width: 100%;
    height: 100%;
}

/* Responsive Design for Avatar Builder */
@media (max-width: 768px) {
    .avatar-builder-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .avatar-preview-section {
        position: static;
    }
    
    .option-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .option-btn {
        padding: 10px;
        font-size: 1.5em;
    }
}

/* ===== MULTIPLAYER STYLES ===== */
.btn-multiplayer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

.btn-multiplayer:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.6);
}

.multiplayer-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
}

.multiplayer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f5576c;
}

.multiplayer-header h2 {
    color: #f5576c;
    font-size: 2em;
}

.multiplayer-section {
    padding: 20px;
}

.lobby-info {
    text-align: center;
}

.lobby-info h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.lobby-info p {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.match-rules {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 25px auto;
    max-width: 500px;
    list-style: none;
    text-align: left;
}

.match-rules li {
    padding: 10px 0;
    font-size: 1.1em;
    color: #333;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.match-rules li:last-child {
    border-bottom: none;
}

.waiting-animation {
    text-align: center;
    padding: 50px 20px;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #f5576c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.waiting-animation h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.waiting-animation p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.match-found-content {
    text-align: center;
    padding: 30px;
}

.match-found-content h3 {
    color: #f5576c;
    font-size: 2em;
    margin-bottom: 30px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.players-vs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 40px 0;
    flex-wrap: wrap;
    gap: 20px;
}

.player-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.player-card:hover {
    transform: translateY(-5px);
}

.you-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.opponent-card {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.match-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.match-avatar svg {
    width: 100%;
    height: 100%;
}

.player-card h4 {
    color: white;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.player-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
    font-weight: bold;
}

.vs-text {
    font-size: 3em;
    font-weight: bold;
    color: #f5576c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.countdown-text {
    font-size: 1.5em;
    color: #333;
    font-weight: bold;
    margin-top: 30px;
}

.countdown-text span {
    color: #f5576c;
    font-size: 2em;
}

/* Multiplayer Game Screen */
.multiplayer-game-header {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex: 1;
    gap: 20px;
    flex-wrap: wrap;
}

.player-score-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 15px 25px;
    border-radius: 15px;
    min-width: 180px;
}

.avatar-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.avatar-small svg {
    width: 100%;
    height: 100%;
}

.score-info {
    display: flex;
    flex-direction: column;
}

.player-name-small {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

.player-score {
    font-size: 2em;
    font-weight: bold;
    color: #f5576c;
}

.question-counter {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.3);
}

.mp-question-container {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

.mp-question-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.mp-question-display span {
    font-size: 2.5em;
    font-weight: bold;
}

.mp-answer-status {
    min-height: 50px;
    margin-bottom: 20px;
    text-align: center;
}

.mp-status-correct {
    color: #4caf50;
    font-size: 1.5em;
    font-weight: bold;
    animation: bounceIn 0.5s;
}

.mp-status-wrong {
    color: #f44336;
    font-size: 1.5em;
    font-weight: bold;
    animation: shake 0.5s;
}

.mp-status-late {
    color: #ff9800;
    font-size: 1.3em;
    font-weight: bold;
}

.mp-status-opponent {
    color: #2196f3;
    font-size: 1.3em;
    font-weight: bold;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.mp-answer-input {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.mp-answer-input input {
    flex: 1;
    padding: 20px;
    font-size: 1.5em;
    border: 3px solid #ddd;
    border-radius: 15px;
    text-align: center;
}

.mp-answer-input input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Multiplayer Results Screen */
.mp-results-content {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.mp-results-header h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mp-results-players {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.mp-result-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    padding: 30px;
    min-width: 250px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.winner-card {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    transform: scale(1.05);
}

.winner-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
    animation: pulse 1.5s infinite;
}

.result-avatar {
    width: 150px;
    height: 150px;
    margin: 20px auto;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.result-avatar svg {
    width: 100%;
    height: 100%;
}

.mp-result-card h3 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.result-score {
    color: #f5576c;
    font-size: 1.5em;
    font-weight: bold;
}

.result-score span {
    font-size: 2em;
}

.mp-draw-message {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.mp-draw-message h3 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.mp-draw-message p {
    color: #666;
    font-size: 1.3em;
}

.mp-results-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive multiplayer styles */
@media (max-width: 768px) {
    .multiplayer-content {
        padding: 20px;
    }
    
    .multiplayer-header h2 {
        font-size: 1.5em;
    }
    
    .players-vs {
        flex-direction: column;
    }
    
    .vs-text {
        font-size: 2em;
    }
    
    .match-info {
        flex-direction: column;
    }
    
    .player-score-card {
        width: 100%;
    }
    
    .mp-question-display span {
        font-size: 1.8em;
    }
    
    .mp-results-players {
        flex-direction: column;
    }
    
    .winner-card {
        transform: scale(1);
    }
}

/* ===== RACING MODE STYLES ===== */
.btn-racing {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.4);
}

.btn-racing:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(238, 90, 36, 0.6);
}

/* ===== STICKMAN WAR BUTTON ===== */
.btn-stickman-war {
    background: linear-gradient(135deg, #8e44ad 0%, #c0392b 100%);
    color: white;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(192, 57, 43, 0.4);
}

.btn-stickman-war:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.6);
}

.racing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.racing-header {
    background: white;
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.racing-header h2 {
    color: #ff6b6b;
    font-size: 2em;
    margin: 0;
}

.racing-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 15px 25px;
    text-align: center;
    min-width: 120px;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.racing-score {
    color: #ff6b6b;
}

.racing-rank {
    color: #ee5a24;
}

.racing-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    width: 100%;
    align-items: start;
}

/* Leaderboard Panel */
.racing-leaderboard {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    min-width: 280px;
    position: sticky;
    top: 20px;
}

.racing-leaderboard h3 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.racing-players-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.racing-player-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 100%);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.racing-player-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.racing-player-you {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border: 3px solid #ff6b6b;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    }
}

.racing-rank-badge {
    font-weight: bold;
    font-size: 1.2em;
    min-width: 45px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.racing-rank-badge.rank-1 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    font-size: 1.3em;
    animation: rank-shine 2s infinite;
}

@keyframes rank-shine {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.racing-player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.racing-player-avatar svg {
    width: 100%;
    height: 100%;
}

.racing-player-info {
    flex: 1;
}

.racing-player-name {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.racing-player-score {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.2em;
}

/* Game Area */
.racing-game-area {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.racing-question-container {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.racing-question-header {
    text-align: center;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.racing-question-display {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.racing-question-display span {
    font-size: 2.8em;
    font-weight: bold;
    color: #333;
    word-break: break-word;
}

.racing-timer-bar {
    width: 100%;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.racing-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc66);
    transition: width 0.1s linear;
    border-radius: 10px;
}

.racing-answer-feedback {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.racing-feedback-correct {
    color: #00cc66;
    font-size: 1.8em;
    font-weight: bold;
    animation: bounceIn 0.5s;
}

.racing-feedback-wrong {
    color: #ff4444;
    font-size: 1.5em;
    font-weight: bold;
    animation: shake 0.5s;
}

.racing-answer-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch;
}

.racing-input {
    flex: 1;
    padding: 20px;
    font-size: 1.8em;
    border: 3px solid #ddd;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 0;
}

.racing-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.racing-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.racing-info {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.racing-info p {
    margin: 8px 0;
    font-size: 1.1em;
    color: #333;
    font-weight: 500;
}

/* Racing Notifications */
.racing-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    font-size: 1.1em;
    z-index: 10000;
    animation: slideInRight 0.5s ease;
}

.racing-notification.fade-out {
    animation: fadeOut 0.5s ease;
    opacity: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.no-players,
.loading-text {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* Responsive Racing Mode */
@media (min-width: 1400px) {
    .racing-game-area {
        max-width: 900px;
    }
}

@media (max-width: 1200px) {
    .racing-content {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
    
    .racing-leaderboard {
        min-width: 250px;
    }
}

@media (max-width: 992px) {
    .racing-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .racing-leaderboard {
        max-height: 300px;
        position: static;
        min-width: auto;
        width: 100%;
    }
    
    .racing-game-area {
        max-width: 100%;
    }
    
    .racing-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .racing-container {
        padding: 10px;
        max-width: 100%;
    }
    
    .racing-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }
    
    .racing-game-area {
        padding: 15px;
        max-width: 100%;
    }
    
    .racing-header h2 {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    .racing-stats {
        width: 100%;
        justify-content: space-around;
        gap: 10px;
    }
    
    .stat-box {
        padding: 10px 15px;
        min-width: 90px;
    }
    
    .stat-label {
        font-size: 0.75em;
    }
    
    .stat-value {
        font-size: 1.3em;
    }
    
    /* Leaderboard - Compact for mobile */
    .racing-leaderboard {
        padding: 10px;
        max-height: 200px;
        margin-bottom: 15px;
    }
    
    .racing-leaderboard h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    .racing-player-card {
        padding: 8px;
        gap: 8px;
        font-size: 0.9em;
    }
    
    .racing-rank-badge {
        font-size: 0.9em;
        min-width: 35px;
        padding: 5px 8px;
    }
    
    .racing-player-avatar {
        width: 35px;
        height: 35px;
    }
    
    .racing-player-name {
        font-size: 0.95em;
    }
    
    .racing-player-score {
        font-size: 1em;
    }
    
    /* Game Area - Optimized for mobile */
    .racing-game-area {
        padding: 15px;
    }
    
    .racing-question-container {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    .racing-question-header {
        font-size: 0.9em;
        margin-bottom: 10px;
        letter-spacing: 1px;
    }
    
    .racing-question-display {
        padding: 20px 15px;
        margin-bottom: 10px;
    }
    
    .racing-question-display span {
        font-size: 1.8em;
    }
    
    .racing-timer-bar {
        height: 12px;
    }
    
    .racing-answer-feedback {
        min-height: 50px;
        margin-bottom: 15px;
    }
    
    .racing-feedback-correct,
    .racing-feedback-wrong {
        font-size: 1.3em;
    }
    
    .racing-answer-section {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .racing-input {
        font-size: 1.5em;
        padding: 15px;
        width: 100%;
    }
    
    .btn-answer {
        width: 100%;
        padding: 15px;
        font-size: 1.2em;
    }
    
    /* Virtual Keyboard - Touch Friendly */
    .virtual-keyboard {
        margin-bottom: 10px;
    }
    
    .keyboard-row {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .key-btn {
        min-height: 55px;
        font-size: 1.3em;
    }
    
    .key-btn-wide {
        padding: 0 20px;
    }
    
    .racing-info {
        padding: 15px;
        margin-top: 15px;
    }
    
    .racing-info p {
        font-size: 0.9em;
        margin: 5px 0;
    }
    
    .racing-notification {
        right: 10px;
        left: 10px;
        top: 80px;
        font-size: 0.95em;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .racing-header h2 {
        font-size: 1.1em;
    }
    
    .stat-box {
        padding: 8px 12px;
        min-width: 80px;
    }
    
    .stat-label {
        font-size: 0.7em;
    }
    
    .stat-value {
        font-size: 1.2em;
    }
    
    .racing-leaderboard {
        max-height: 180px;
        padding: 8px;
    }
    
    .racing-leaderboard h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .racing-player-card {
        padding: 6px;
        gap: 6px;
    }
    
    .racing-rank-badge {
        font-size: 0.8em;
        min-width: 30px;
        padding: 4px 6px;
    }
    
    .racing-player-avatar {
        width: 30px;
        height: 30px;
    }
    
    .racing-player-name {
        font-size: 0.85em;
    }
    
    .racing-player-score {
        font-size: 0.9em;
    }
    
    .racing-question-display span {
        font-size: 1.5em;
    }
    
    .racing-input {
        font-size: 1.3em;
        padding: 12px;
    }
    
    .btn-answer {
        padding: 12px;
        font-size: 1.1em;
    }
    
    .key-btn {
        min-height: 50px;
        font-size: 1.2em;
    }
    
    .racing-info p {
        font-size: 0.85em;
    }
}

