* {
    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;
}

/* 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;
}

.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;
}

.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);
}

.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 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;
}

/* 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: 60px 1fr 60px 100px;
        gap: 10px;
        font-size: 0.9em;
    }
    
    .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; }
}


