/* Horse Racing Shooting Game Styles */

header {
    padding: 10px 0 !important;
    background: transparent url('../img/bg_info2.png') repeat-x center bottom !important;
}

.header-container {
    padding: 0 20px !important;
}

#game-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(15, 15, 15, 0.9);
    border: 2px solid var(--gold);
    border-radius: 20px;
    min-height: 600px;
    position: relative;
    color: #fff;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.game-title {
    text-align: center;
    color: var(--gold-bright);
    font-size: 2rem;
    margin-bottom: 10px;
}

.game-desc {
    text-align: center;
    color: var(--text-sub);
    margin-bottom: 40px;
}

/* Selection Screen */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.horse-card {
    background: #222;
    border: 2px solid #444;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.horse-card:hover {
    transform: translateY(-5px);
    border-color: #666;
}

.horse-card.selected {
    border-color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.horse-sprite-thumb {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.horse-sprite-thumb img {
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.horse-card h3 {
    color: #fff;
    margin-bottom: 10px;
}

.horse-card p {
    font-size: 0.85rem;
    color: var(--text-sub);
}

#start-game-btn {
    display: block;
    width: 250px;
    margin: 0 auto;
    padding: 15px;
    background: var(--gold);
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
}

#start-game-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Game Screen */
#shooting-gate {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

#gameCanvas {
    background: #000 url('../img/bg_body.png') repeat;
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #333;
    aspect-ratio: 2/3;
    border-radius: 10px;
    touch-action: none;
}

#hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #111;
    border-radius: 10px 10px 0 0;
    border: 1px solid #333;
    font-weight: bold;
    color: var(--gold-bright);
}

.hud-item {
    font-size: 1.1rem;
}

#life-val {
    letter-spacing: 2px;
}

#controls-hint {
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
}

/* Modal */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    text-align: center;
    padding: 30px;
}

.reward-box {
    background: #222;
    padding: 20px;
    border: 2px dashed var(--gold);
    border-radius: 10px;
    margin: 20px 0;
}

.reward-name {
    display: block;
    font-size: 1.2rem;
    color: var(--gold-bright);
    margin-bottom: 10px;
}

.coupon-txt {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 2px;
}

/* Responsive */
@media (max-width: 600px) {
    header {
        padding: 5px 0 !important;
    }

    .header-container {
        padding: 5px 10px !important;
    }

    #game-container {
        margin: 10px auto;
        padding: 10px;
    }

    .selection-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .horse-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 10px;
    }

    .horse-sprite-thumb {
        width: 60px;
        height: 60px;
        margin: 0 15px 0 0;
    }

    .horse-card h3 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .horse-card p {
        font-size: 0.75rem;
    }

    .hud-item {
        font-size: 0.9rem;
    }

    #start-game-btn {
        width: 100%;
        font-size: 1rem;
    }
}