/* ============================================================
   MINIGAME - TOWER DEFENSE STYLE
   Alle Klassen beginnen mit "gy-" zur Vermeidung von Konflikten
   ============================================================ */

/* Launch Button */
#gy-launch-btn {
    position: fixed;
    z-index: 99990;
    top: 18px;
    right: 18px;
    border: 2px solid #6b1414;
    border-radius: 8px;
    padding: 11px 15px;
    background: linear-gradient(180deg, #241010, #150808);
    color: #ffcf7a;
    font: 700 14px/1 Arial, sans-serif;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .6), inset 0 0 8px rgba(120,0,0,.35);
    text-shadow: 0 0 6px rgba(180,0,0,.6);
    transition: all 0.2s ease;
}

#gy-launch-btn:hover {
    background: linear-gradient(180deg, #3a1414, #200a0a);
    transform: translateY(-1px);
}

/* Overlay */
#gy-overlay {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, .92);
    padding: 18px;
}

#gy-overlay.gy-open {
    display: grid;
}

/* Game Shell */
#gy-game-shell {
    position: relative;
    width: min(1100px, 96vw);
    height: min(720px, 88vh);
    overflow: hidden;
    border: 3px solid #3a2418;
    border-radius: 10px;
    background: #0c0f0a;
    box-shadow: 0 0 55px rgba(90, 0, 0, .55), inset 0 0 60px rgba(0,0,0,.8);
}

/* Canvas */
#gy-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    image-rendering: pixelated;
}

/* Close Button */
#gy-close-btn {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid #7a2f2f;
    border-radius: 6px;
    background: rgba(20, 8, 8, .92);
    color: #ffd9a0;
    font: bold 22px Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
}

#gy-close-btn:hover {
    background: rgba(40, 16, 16, .95);
}

/* Hilfe-Text */
#gy-help {
    position: absolute;
    z-index: 2;
    left: 12px;
    bottom: 10px;
    color: #c8b89a;
    font: 12px Arial, sans-serif;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}

/* Shop Panel */
#gy-shop-panel {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: none;
    width: max-content;
    min-width: 300px;
    max-width: min(520px, 92%);
    max-height: 86%;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    border: 3px solid #6b1e1e;
    border-radius: 9px;
    padding: 18px;
    background: radial-gradient(ellipse at 50% 0%, rgba(60,10,10,.55), rgba(15,8,8,.97) 70%);
    color: #f2d9ae;
    font-family: Arial, sans-serif;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .5), inset 0 0 30px rgba(100,0,0,.25);
}

#gy-shop-panel.gy-show {
    display: block;
}

#gy-shop-panel h2 {
    margin: 0 0 7px;
    color: #ff8a4a;
    font-size: 26px;
    font-family: 'Creepster', cursive;
    font-weight: normal;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(200,40,0,.6);
    text-align: center;
}

#gy-shop-panel p {
    margin: 5px 0 14px;
    color: #cbb693;
    font-size: 13px;
    text-align: center;
}

/* Shop Items */
.gy-shop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0;
    border: 1px solid #5a3220;
    border-radius: 6px;
    padding: 9px;
    background: #180f0c;
    transition: background 0.2s ease;
}

.gy-shop-item:hover {
    background: #221410;
}

.gy-shop-item strong,
.gy-shop-item small {
    display: block;
}

.gy-shop-item small {
    margin-top: 3px;
    color: #a68f6d;
    font-size: 11px;
}

/* Buttons */
.gy-buy-btn,
#gy-shop-close {
    border: 1px solid #8a3a1c;
    border-radius: 5px;
    padding: 7px 9px;
    background: linear-gradient(180deg, #5c2410, #3a1408);
    color: #ffe0b0;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gy-buy-btn:hover,
#gy-shop-close:hover {
    background: linear-gradient(180deg, #7a341c, #4a1c0c);
}

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

#gy-shop-close {
    width: 100%;
    margin-top: 10px;
}

/* Pause Panel */
#gy-pause-panel {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: none;
    width: max-content;
    min-width: 240px;
    transform: translate(-50%, -50%);
    border: 3px solid #6b1e1e;
    border-radius: 9px;
    padding: 20px 32px;
    background: radial-gradient(ellipse at 50% 0%, rgba(60,10,10,.55), rgba(15,8,8,.97) 70%);
    color: #f2d9ae;
    font-family: Arial, sans-serif;
    text-align: center;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .55), inset 0 0 30px rgba(100,0,0,.25);
}

#gy-pause-panel.gy-show {
    display: block;
}

#gy-pause-panel h2 {
    margin: 0 0 6px;
    color: #ff8a4a;
    font-size: 30px;
    font-family: 'Creepster', cursive;
    font-weight: normal;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(200,40,0,.6);
}

#gy-pause-panel p {
    margin: 0 0 14px;
    color: #cbb693;
    font-size: 13px;
}

#gy-resume-btn {
    border: 1px solid #8a3a1c;
    border-radius: 5px;
    padding: 9px 20px;
    background: linear-gradient(180deg, #5c2410, #3a1408);
    color: #ffe0b0;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

#gy-resume-btn:hover {
    background: linear-gradient(180deg, #7a341c, #4a1c0c);
}
