/* Wurst Case Scenario Game — Plugin Styles */
#wurst-game-container {
    position: relative;
    width: 100%;
    height: min(78vh, 720px);
    min-height: 520px;
    overflow: hidden;
    background: #1a1a1a;
    font-family: 'Segoe UI', sans-serif;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#wurst-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    z-index: 10;
}

.wurst-top-bar {
    padding: 16px;
    text-shadow: 2px 2px 4px rgba(0,0,0,.5);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.wurst-bottom-bar {
    padding: 12px 14px 110px;
    text-align: center;
    background: rgba(0,0,0,.28);
    font-size: .92rem;
}

#wurst-pun-overlay {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: clamp(1.4rem,3.5vw,2.5rem);
    color: #f1c40f;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0,0,0,.8), 2px 2px 0 #d35400;
    opacity: 0;
    transition: opacity .3s, transform .3s;
    pointer-events: none;
    white-space: nowrap;
    z-index: 20;
    text-transform: uppercase;
    font-style: italic;
}

.show-pun {
    opacity: 1 !important;
    transform: translate(-50%,-60%) scale(1.2) !important;
}

.wurst-message-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(0,0,0,.95);
    padding: 24px;
    border-radius: 20px;
    border: 5px solid #ff4757;
    text-align: center;
    pointer-events: auto;
    width: min(88vw,420px);
    max-height: 85%;
    overflow-y: auto;
    box-sizing: border-box;
    color: #fff;
}

.wurst-message-box h1 {
    margin: 0 0 10px;
    color: #ff4757;
    font-size: clamp(1.4rem,4vw,1.9rem);
    text-transform: uppercase;
}

.wurst-message-box p {
    font-size: clamp(.95rem,2.8vw,1rem);
    line-height: 1.4;
}

.wurst-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #444;
    font-size: 1rem;
    box-sizing: border-box;
    background: #222;
    color: #fff;
}

.wurst-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    font-size: .82rem;
    color: #ccc;
    margin: 10px 0 4px;
    cursor: pointer;
    line-height: 1.4;
}

.wurst-gdpr-label input[type=checkbox] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #ff4757;
    cursor: pointer;
}

.wurst-gdpr-label a { color: #ff4757; }

.wurst-gdpr-note {
    font-size: .78rem;
    color: #aaa;
    margin: 6px 0 2px;
    font-style: italic;
}

.wurst-btn {
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 15px;
    transition: transform .2s;
    font-weight: bold;
}

.wurst-btn:hover { transform: scale(1.05); }

.wurst-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: .7;
}

#wurst-status {
    font-weight: bold;
    font-size: .9rem;
    letter-spacing: 1px;
}

#wurst-timer {
    font-weight: bold;
    font-size: clamp(1.3rem,4vw,1.8rem);
    color: #ff4757;
    font-family: monospace;
}

.coupon-box {
    background: #27ae60;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px dashed #fff;
}

.coupon-code {
    font-weight: bold;
    font-family: monospace;
    font-size: clamp(1.2rem,4vw,1.6rem);
    display: block;
    margin-top: 5px;
}

.leaderboard-container {
    margin-top: 20px;
    text-align: left;
}

.leaderboard-container h3 {
    text-align: center;
    color: #ff4757;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    color: #eee;
}

.leaderboard-table th {
    border-bottom: 2px solid #ff4757;
    padding: 8px;
    text-align: left;
    color: #ff4757;
}

.leaderboard-table td {
    padding: 8px;
    border-bottom: 1px solid #333;
}

.loading-text {
    font-style: italic;
    color: #888;
    text-align: center;
    display: block;
    margin: 10px;
}

.error-hint {
    font-size: .78rem;
    color: #ff4757;
    margin-top: 10px;
    display: none;
    line-height: 1.4;
    word-break: break-word;
}

/* Mobile controls */
#wurst-mobile-controls {
    position: absolute;
    inset: auto 0 12px 0;
    z-index: 30;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 12px;
    box-sizing: border-box;
}

.wurst-joystick-wrap,
.wurst-mobile-actions { pointer-events: auto; }

.wurst-joystick-wrap {
    width: 132px;
    height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.joystick-base {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    touch-action: none;
}

.joystick-knob {
    position: absolute;
    width: 52px;
    height: 52px;
    left: 34px;
    top: 34px;
    border-radius: 50%;
    background: rgba(255,71,87,.82);
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
    border: 1px solid rgba(255,255,255,.2);
    transition: transform .02s linear;
    pointer-events: none;
}

.wurst-mobile-actions { display: flex; align-items: flex-end; }

.touch-btn {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: .95rem;
    font-weight: bold;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    touch-action: manipulation;
}

.touch-btn:active,
.touch-btn.active {
    background: rgba(255,71,87,.75);
    transform: scale(.96);
}

@media (min-width:1025px) {
    #wurst-mobile-controls { display: none; }
    .wurst-bottom-bar { padding-bottom: 15px; }
}

@media (max-width:768px) {
    #wurst-game-container { height: min(82vh,700px); min-height: 560px; }
    .wurst-top-bar { padding: 12px; }
    .wurst-bottom-bar { font-size: .82rem; }
    .leaderboard-table { font-size: .8rem; }
}

@media (max-width:480px) {
    #wurst-game-container { min-height: 580px; }
    .wurst-message-box { padding: 18px; width: min(92vw,420px); }
    .wurst-joystick-wrap { width: 116px; height: 116px; }
    .joystick-base { width: 106px; height: 106px; }
    .joystick-knob { width: 46px; height: 46px; left: 30px; top: 30px; }
    .touch-btn { width: 70px; height: 70px; }
}
