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

body {
    background-color: #1a1a2e;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-canvas {
    display: block;
    background-color: #16213e;
    max-width: 100%;
    max-height: 100%;
}

#ui-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

#lives-display, #score-display, #highscore-display {
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

#lives-count {
    color: #ff6b6b;
}

#score-count {
    color: #4ecdc4;
}

#highscore-count {
    color: #ffd93d;
}

#treat-progress {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 10px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.treat-fish {
    transition: transform 0.3s ease;
}

.treat-fish.collected {
    transform: scale(1.2);
}

#speed-boost {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #ffd93d;
    text-shadow: 0 0 20px #ffd93d, 0 0 40px #ffd93d;
    animation: pulse 0.5s ease-in-out infinite;
    pointer-events: none;
}

#life-gained {
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 20px #ff6b6b, 0 0 40px #ff0000;
    animation: pulse 0.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 50;
}

#fish-upgrade {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: bold;
    color: #44ffff;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 0 20px #44ffff, 0 0 40px #0088ff;
    animation: pulse 0.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 55;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    border-radius: 15px;
    border: 3px solid #44ffff;
}

#boss-warning {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff6600, 0 0 60px #ff0000;
    animation: bossFlash 0.3s ease-in-out infinite;
    pointer-events: none;
    z-index: 50;
}

@keyframes bossFlash {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

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

.hidden {
    display: none !important;
}

#start-screen, #game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 33, 62, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    color: #fff;
    text-align: center;
}

#start-screen h1, #game-over-screen h1 {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ffd93d;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

#start-screen p, #game-over-screen p {
    font-size: 24px;
    margin-bottom: 15px;
    color: #e0e0e0;
}

#new-highscore {
    color: #ffd93d;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 0 0 20px #ffd93d;
    animation: pulse 0.5s ease-in-out infinite;
}

#start-highscore {
    color: #ffd93d;
    font-size: 28px;
    font-weight: bold;
}

.controls-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    border-radius: 15px;
    margin: 20px 0;
}

.controls-info p {
    margin-bottom: 10px;
}

#start-button, #restart-button {
    margin-top: 30px;
    padding: 20px 60px;
    font-size: 28px;
    font-weight: bold;
    color: #1a1a2e;
    background: linear-gradient(145deg, #ffd93d, #ff9f1c);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(255, 217, 61, 0.4);
}

#start-button:hover, #restart-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 217, 61, 0.6);
}

#start-button:active, #restart-button:active {
    transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #ui-overlay {
        font-size: 18px;
        top: 10px;
        left: 10px;
    }

    #lives-display, #score-display {
        padding: 8px 15px;
    }

    #start-screen h1, #game-over-screen h1 {
        font-size: 36px;
    }

    #start-screen p, #game-over-screen p {
        font-size: 18px;
    }

    #start-button, #restart-button {
        padding: 15px 40px;
        font-size: 22px;
    }

    #speed-boost {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    #start-screen h1, #game-over-screen h1 {
        font-size: 28px;
    }

    #start-screen p, #game-over-screen p {
        font-size: 14px;
    }

    .controls-info {
        padding: 15px 25px;
    }
}

/* Toy display */
#toy-display {
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

#toy-count {
    color: #ff69b4;
}

/* Boss Toy display */
#boss-toy-display {
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
}

#boss-toy-count {
    color: #ff4444;
}

/* Version display */
#version-display {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    z-index: 10;
    pointer-events: none;
}

/* Tome cooldown */
#tome-cooldown {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 16px;
}

#minnie-boss-toys {
    text-align: center;
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #b0b0b0;
}

#minnie-boss-toy-count {
    color: #ff4444;
    font-weight: bold;
}

/* Shop Screen */
#shop-screen {
    position: absolute;
    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: 200;
}

#shop-stall {
    position: relative;
    width: 500px;
    max-width: 90%;
}

#shop-awning {
    height: 60px;
    background: repeating-linear-gradient(
        90deg,
        #e74c3c 0px,
        #e74c3c 40px,
        #f5f5f5 40px,
        #f5f5f5 80px
    );
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

#shop-awning::before,
#shop-awning::after {
    content: '';
    position: absolute;
    bottom: -20px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid #e74c3c;
}

#shop-awning::before {
    left: 30px;
}

#shop-awning::after {
    right: 30px;
}

#shop-counter {
    background: linear-gradient(180deg, #8b5a2b 0%, #6b4423 100%);
    padding: 30px;
    border-radius: 0 0 10px 10px;
    border: 4px solid #5a3d1a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#shopkeeper-cat {
    display: block;
    margin: 0 auto 10px auto;
}

#shop-counter h2 {
    text-align: center;
    color: #ffd93d;
    font-size: 32px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#shop-toys {
    text-align: center;
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
}

#shop-toy-count {
    color: #ff69b4;
    font-weight: bold;
}

#shop-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 5px 15px;
    align-items: center;
}

.item-name {
    color: #ffd93d;
    font-size: 18px;
    font-weight: bold;
}

.item-desc {
    color: #ccc;
    font-size: 14px;
    grid-column: 1;
}

.item-level {
    color: #4ecdc4;
    font-size: 14px;
    grid-column: 1;
}

.buy-btn {
    grid-column: 2;
    grid-row: 1 / 4;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #1a1a2e;
    background: linear-gradient(145deg, #4ecdc4, #26a69a);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(78, 205, 196, 0.3);
}

.buy-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.5);
}

.buy-btn:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

#shop-hint {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    margin-top: 20px;
}

/* Minnie's Market */
#minnie-shop-screen {
    position: absolute;
    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: 200;
}

#minnie-stall {
    position: relative;
    width: 520px;
    max-width: 90%;
}

#minnie-counter {
    background: linear-gradient(180deg, #c0c0c0 0%, #a8a8a8 50%, #909090 100%);
    padding: 30px;
    border-radius: 10px;
    border: 4px solid #d4d4d4;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

#minnie-cat {
    display: block;
    margin: 0 auto 10px auto;
}

#minnie-counter h2 {
    text-align: center;
    color: #333;
    font-size: 32px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

#minnie-toys {
    text-align: center;
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #b0b0b0;
}

#minnie-toy-count {
    color: #c71585;
    font-weight: bold;
}

#minnie-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.minnie-item {
    background: linear-gradient(180deg, #b8b8b8 0%, #989898 100%);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 2px solid #ccc;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4);
    min-width: 140px;
}

.item-podium {
    width: 60px;
    height: 40px;
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 40%, #888 100%);
    border-radius: 5px 5px 0 0;
    border: 2px solid #aaa;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    position: relative;
}

.item-podium::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 8px;
    background: linear-gradient(180deg, #888 0%, #666 100%);
    border-radius: 0 0 3px 3px;
}

.podium-icon {
    font-size: 24px;
    text-align: center;
    line-height: 40px;
}

.item-info {
    text-align: center;
}

.minnie-item .item-name {
    color: #222;
    font-size: 16px;
    font-weight: bold;
}

.minnie-item .item-desc {
    color: #444;
    font-size: 12px;
}

.minnie-buy-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(145deg, #c71585, #a01060);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(199, 21, 133, 0.3);
}

.minnie-buy-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(199, 21, 133, 0.5);
}

.minnie-buy-btn:disabled {
    background: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.minnie-buy-btn.purchased {
    background: linear-gradient(145deg, #4a4a4a, #333);
    cursor: default;
}

#minnie-hint {
    text-align: center;
    color: #555;
    font-size: 14px;
    margin-top: 20px;
}
