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

body {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 600px;
}

canvas {
    display: block;
    border: 3px solid #e94560;
    border-radius: 8px;
    background: #16213e;
}

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

#start-screen h1 {
    font-size: 48px;
    color: #f5a623;
    margin-bottom: 15px;
}

.mode-cards {
    display: flex;
    gap: 18px;
    margin-bottom: 15px;
}

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 150px;
    font-size: 14px;
    color: #fff;
}

.mode-card:hover {
    background: rgba(245, 166, 35, 0.15);
    border-color: #f5a623;
    transform: translateY(-3px);
}

.mode-card canvas {
    margin-bottom: 8px;
    border-radius: 8px;
}

.mode-title {
    font-size: 16px;
    font-weight: bold;
    color: #f5a623;
    margin-bottom: 4px;
}

.mode-desc {
    font-size: 11px;
    color: #aaa;
}

#duckPreview {
    position: absolute;
    bottom: 15px;
    right: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#tag-result-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(22, 33, 62, 0.95);
    border-radius: 8px;
    color: #fff;
}

#tag-result-screen h2 {
    font-size: 42px;
    color: #f5a623;
    margin-bottom: 10px;
}

#tag-result-screen p {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 8px;
}

#suika-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(22, 33, 62, 0.95);
    border-radius: 8px;
    color: #fff;
}

#suika-over-screen h2 {
    font-size: 42px;
    color: #e94560;
    margin-bottom: 10px;
}

#suika-over-screen p {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 8px;
}

#invader-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(22, 33, 62, 0.95);
    border-radius: 8px;
    color: #fff;
}

#invader-over-screen h2 {
    font-size: 42px;
    color: #f5a623;
    margin-bottom: 10px;
}

#invader-over-screen p {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 8px;
}

#start-screen p,
#game-over-screen p,
#win-screen p {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 8px;
}

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

.controls-info p {
    margin: 4px 0;
}

#game-over-screen h2,
#win-screen h2 {
    font-size: 42px;
    color: #e94560;
    margin-bottom: 10px;
}

#win-screen h2 {
    color: #f5a623;
}

button {
    padding: 12px 40px;
    font-size: 20px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.2s;
}

button:hover {
    background: #c73652;
}

#level-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(22, 33, 62, 0.85);
    border-radius: 8px;
    pointer-events: none;
}

#level-screen h2 {
    font-size: 56px;
    color: #f5a623;
    text-shadow: 0 0 20px rgba(245, 166, 35, 0.5);
}

#shop-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(22, 33, 62, 0.97);
    border-radius: 8px;
    color: #fff;
    padding: 20px;
    overflow-y: auto;
}

#shop-screen h2 {
    font-size: 36px;
    color: #f5a623;
    margin-bottom: 5px;
}

#shop-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
    width: 100%;
    padding: 0 20px;
}

.shop-item {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #f5a623;
}

.shop-item.owned {
    border-color: #4caf50;
}

.shop-item.equipped {
    border-color: #f5a623;
    background: rgba(245, 166, 35, 0.15);
}

.shop-item .item-preview {
    font-size: 36px;
    margin-bottom: 6px;
}

.shop-item .item-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.shop-item .item-price {
    font-size: 12px;
    color: #ffd700;
    margin-top: 4px;
}

.shop-item .item-desc {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

.shop-item .item-status {
    font-size: 11px;
    color: #4caf50;
    margin-top: 4px;
}

#shopBtn {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 6px 16px;
    font-size: 14px;
    background: #f5a623;
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10;
}

#shopBtn:hover {
    background: #e69500;
}

#pauseBtn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 6px 16px;
    font-size: 14px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 10;
}

#pauseBtn:hover {
    background: #777;
}

#pause-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(22, 33, 62, 0.9);
    border-radius: 8px;
    color: #fff;
    z-index: 20;
}

#pause-screen h2 {
    font-size: 48px;
    color: #f5a623;
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}
