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

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    font-family: 'Inter', 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98D8C8 50%, #F7DC6F 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 1800px;
    margin: 0 auto;
    position: relative;
}

.back-home-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #4a9eff;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 10px;
    font-size: 0.9em;
    transition: background 0.3s ease, transform 0.2s ease;
}

.back-home-link:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateX(-3px);
}

.header {
    text-align: center;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 15px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.game-notice {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 12px 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

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

.notice-icon {
    font-size: 1.5rem;
}

.notice-text {
    color: #0f172a;
    font-size: 0.9rem;
}

/* Character Creation */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.creation-content {
    max-width: 500px;
    width: 90%;
}

.creation-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-weight: 700;
    color: #2d5016;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group input {
    padding: 14px 16px;
    border: 3px solid #4a8c3a;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(45, 80, 22, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: #2d5016;
    box-shadow: 0 4px 10px rgba(45, 80, 22, 0.2);
    transform: translateY(-2px);
}

.gender-selection {
    display: flex;
    gap: 15px;
}

.gender-btn {
    flex: 1;
    padding: 18px;
    border: 3px solid #4a8c3a;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #2d5016;
    box-shadow: 0 3px 8px rgba(45, 80, 22, 0.15);
    position: relative;
    overflow: hidden;
}

.gender-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 140, 58, 0.2), transparent);
    transition: left 0.5s ease;
}

.gender-btn:hover::before {
    left: 100%;
}

.gender-btn:hover {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(45, 80, 22, 0.25);
    border-color: #2d5016;
}

.gender-btn.selected {
    background: linear-gradient(135deg, #4a8c3a 0%, #2d5016 100%);
    color: #f0f8e8;
    border-color: #2d5016;
    box-shadow: 
        0 5px 15px rgba(45, 80, 22, 0.3),
        inset 0 2px 5px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.game-button {
    padding: 14px 40px;
    background: linear-gradient(135deg, #4a8c3a 0%, #2d5016 100%);
    color: #f0f8e8;
    border: 3px solid #2d5016;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(45, 80, 22, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.game-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.game-button:hover::before {
    width: 300px;
    height: 300px;
}

.game-button:hover {
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(45, 80, 22, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
    border-color: #4a8c3a;
}

.game-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 10px rgba(45, 80, 22, 0.3),
        inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Game Interface */
.game-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 20px;
    align-items: start;
}

/* Left Panel */
.left-panel {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.player-info {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(45, 80, 22, 0.2);
}

.player-avatar {
    font-size: 4rem;
    margin-bottom: 10px;
}

.player-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d5016;
}

.stats-section, .money-section, .time-section, .inventory-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(45, 80, 22, 0.2);
}

.stats-section h3, .money-section h3, .time-section h3, .inventory-section h3 {
    font-size: 1.1rem;
    color: #2d5016;
    margin-bottom: 15px;
}

.stat-bar {
    margin-bottom: 12px;
}

.stat-bar label {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 5px;
}

.bar-container {
    position: relative;
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
}

.hunger-bar {
    background: linear-gradient(90deg, #ff6b6b, #ee5a6f);
}

.stamina-bar {
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
}

.thirst-bar {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.sleep-bar {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.bar-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.money-section h3 {
    color: #f39c12;
    font-size: 1.3rem;
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
}

.time-info div {
    display: flex;
    justify-content: space-between;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.inventory-item {
    aspect-ratio: 1;
    background: rgba(45, 80, 22, 0.05);
    border: 2px solid rgba(45, 80, 22, 0.2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.inventory-item:hover {
    background: rgba(45, 80, 22, 0.1);
    border-color: #4a8c3a;
}

.inventory-item .item-icon {
    font-size: 1.5rem;
}

.inventory-item .item-count {
    font-size: 0.7rem;
    color: #2d5016;
    font-weight: 600;
    margin-top: 4px;
}

/* Center Panel */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-area {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

#gameCanvas {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    border-radius: 15px;
    background: #90EE90;
    cursor: pointer;
}

.location-label {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.4);
}

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

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

/* Right Panel */
.right-panel {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.action-menu h3 {
    font-size: 1.2rem;
    color: #2d5016;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(45, 80, 22, 0.2);
}

.menu-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    padding: 12px;
    background: rgba(45, 80, 22, 0.05);
    border: 2px solid rgba(45, 80, 22, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item:hover {
    background: rgba(45, 80, 22, 0.1);
    border-color: #4a8c3a;
    transform: translateX(5px);
}

.menu-item-icon {
    font-size: 1.5rem;
}

.menu-item-text {
    flex: 1;
}

.menu-item-name {
    font-weight: 600;
    color: #0f172a;
}

.menu-item-desc {
    font-size: 0.85rem;
    color: #666;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: linear-gradient(135deg, #f0f8e8 0%, #e8f5e9 50%, #c8e6c9 100%);
    border-radius: 25px;
    padding: 0;
    max-width: 750px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(45, 80, 22, 0.4),
        0 0 0 4px #4a8c3a,
        0 0 0 8px rgba(74, 140, 58, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.5);
    border: 3px solid #2d5016;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #2d5016 0%, #4a8c3a 50%, #6bcc5a 100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, #4a8c3a 0%, #2d5016 100%);
    border-bottom: 3px solid #2d5016;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    color: #f0f8e8;
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 1.8rem;
    color: #f0f8e8;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.shop-tabs {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 20px 30px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-bottom: 3px solid #4a8c3a;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid #4a8c3a;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2d5016;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(45, 80, 22, 0.3);
    border-color: #2d5016;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4a8c3a 0%, #2d5016 100%);
    color: #f0f8e8;
    border-color: #2d5016;
    box-shadow: 
        0 4px 15px rgba(45, 80, 22, 0.4),
        inset 0 2px 5px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.shop-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
}

.shop-item-icon {
    font-size: 2rem;
}

.shop-item-info {
    flex: 1;
}

.shop-item-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 5px;
}

.shop-item-desc {
    font-size: 0.85rem;
    color: #666;
}

.shop-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f39c12;
    margin-right: 10px;
}

.buy-btn {
    padding: 10px 20px;
    background: #4a8c3a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.buy-btn:hover {
    background: #2d5016;
    transform: translateY(-2px);
}

.buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.building-content {
    padding: 25px 30px;
    background: #f0f8e8;
    max-height: calc(85vh - 200px);
    overflow-y: auto;
}

.building-option {
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 2px solid #c8e6c9;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(45, 80, 22, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.building-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #4a8c3a 0%, #2d5016 100%);
}

.building-option:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(45, 80, 22, 0.2);
    border-color: #4a8c3a;
}

.building-option-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.building-option-icon {
    font-size: 3rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.building-option-info h3 {
    color: #2d5016;
    margin-bottom: 5px;
    font-size: 1.3rem;
    font-weight: 700;
}

.building-option-desc {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-style: italic;
    padding-left: 60px;
}

.building-option-cost {
    color: #f39c12;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
    padding-left: 60px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.building-option-cost::before {
    content: '💰';
    font-size: 1.1rem;
}

.build-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4a8c3a 0%, #2d5016 100%);
    color: #f0f8e8;
    border: 2px solid #2d5016;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(45, 80, 22, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-left: 60px;
}

.build-btn:hover {
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(45, 80, 22, 0.4);
}

.build-btn:active {
    transform: translateY(-1px);
}

.build-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #999;
    border-color: #666;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .game-wrapper {
        grid-template-columns: 250px 1fr 280px;
    }
}

@media (max-width: 1200px) {
    .game-wrapper {
        grid-template-columns: 1fr;
    }

    .left-panel, .right-panel {
        max-height: none;
    }

    #gameCanvas {
        height: 500px;
    }
}

.tools-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(45, 80, 22, 0.2);
}

.tools-section h3 {
    font-size: 1.1rem;
    color: #2d5016;
    margin-bottom: 15px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.tool-btn {
    aspect-ratio: 1;
    background: rgba(45, 80, 22, 0.1);
    border: 2px solid rgba(45, 80, 22, 0.2);
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background: rgba(45, 80, 22, 0.2);
    border-color: #4a8c3a;
    transform: scale(1.1);
}

.tool-btn.active {
    background: #4a8c3a;
    border-color: #2d5016;
    color: white;
}

.save-load-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.save-btn, .load-btn {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #2d5016 0%, #4a8c3a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-btn:hover, .load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(45, 80, 22, 0.3);
}

.statistics-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(45, 80, 22, 0.2);
}

.statistics-section h3 {
    font-size: 1.1rem;
    color: #2d5016;
    margin-bottom: 15px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.stats-list div {
    display: flex;
    justify-content: space-between;
    color: #0f172a;
}

.stats-list span {
    font-weight: 600;
    color: #4a8c3a;
}

.animals-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(45, 80, 22, 0.2);
}

.animals-section h3 {
    font-size: 1.1rem;
    color: #2d5016;
    margin-bottom: 15px;
}

.animals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.animal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(45, 80, 22, 0.2);
}

.animal-icon {
    font-size: 1.5rem;
}

.animal-info {
    flex: 1;
    font-size: 0.85rem;
}

.animal-name {
    font-weight: 600;
    color: #0f172a;
}

.animal-happiness {
    font-size: 0.75rem;
    color: #666;
}

.produce-ready {
    font-size: 0.7rem;
    color: #f39c12;
    font-weight: 600;
    margin-top: 2px;
}

.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.notification {
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

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

.notification-success {
    background: #2ecc71;
}

.notification-warning {
    background: #f39c12;
}

.notification-error {
    background: #e74c3c;
}

.notification-info {
    background: #3498db;
}

@media (max-width: 768px) {
    #gameCanvas {
        height: 400px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .notifications-container {
        top: 10px;
        right: 10px;
        max-width: 250px;
    }
}

/* Crop Timers Modal */
.crop-timers-content {
    padding: 25px 30px;
    background: #f0f8e8;
    max-height: calc(85vh - 200px);
    overflow-y: auto;
}

.crop-timer-item {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 2px solid #c8e6c9;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 8px rgba(45, 80, 22, 0.1);
}

.crop-timer-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e9;
}

.crop-timer-icon {
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.crop-timer-info {
    flex: 1;
}

.crop-timer-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d5016;
    margin-bottom: 5px;
}

.crop-timer-base-time {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.crop-timer-plots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timer-plot {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
}

.timer-plot.growing {
    border-color: #3498db;
    background: linear-gradient(135deg, #ebf5fb 0%, #d6eaf8 100%);
}

.timer-plot.almost-ready {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    animation: pulse 2s infinite;
}

.timer-plot.ready {
    border-color: #2ecc71;
    background: linear-gradient(135deg, #eafaf1 0%, #d5f4e6 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
    }
}

.timer-plot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d5016;
}

.timer-status {
    font-size: 0.95rem;
    font-weight: 700;
}

.timer-plot.growing .timer-status {
    color: #3498db;
}

.timer-plot.almost-ready .timer-status {
    color: #f39c12;
}

.timer-plot.ready .timer-status {
    color: #2ecc71;
}

.timer-ready {
    color: #2ecc71;
    font-weight: 700;
    font-size: 1.1rem;
}

.timer-progress-bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 2px solid #c0c0c0;
}

.timer-progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
}

.timer-plot.growing .timer-progress-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.timer-plot.almost-ready .timer-progress-fill {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.timer-plot.ready .timer-progress-fill {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
    width: 100% !important;
}

.timer-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.timer-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timer-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.timer-badge.water {
    background: #3498db;
    color: white;
}

.timer-badge.fertilizer {
    background: #9b59b6;
    color: white;
}

/* Touch Controls */
.touch-controls {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.touch-dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.touch-middle-row {
    display: flex;
    gap: 6px;
}

.touch-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(74, 140, 58, 0.85);
    border: 3px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
    transition: transform 0.1s ease;
}

.touch-btn:active,
.touch-btn.active {
    transform: scale(0.9);
    background: rgba(74, 140, 58, 1);
}

@media (max-width: 768px) {
    .touch-controls {
        display: block;
    }
}
