/* =====================================================
   CAB89 TOMBOLA – Mobile Dark Theme
   ===================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d0d0d;
    color: #f0f0f0;
    overflow: hidden;
}

/* ── Full-screen layout ── */
.tombola-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    width: 100%;
    position: relative;
    background: radial-gradient(ellipse at 50% 60%, #1a1000 0%, #0d0d0d 70%);
}

/* ── Content wrapper ── */
.tombola-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    z-index: 1;
}

/* ── Logo ── */
.tombola-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tombola-logo-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.6));
}

.tombola-logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff6b00;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Draw Button ── */
.draw-btn {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 4px solid #ff6b00;
    background: radial-gradient(circle at 40% 35%, #ff8c00, #cc4400);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 0 30px rgba(255, 107, 0, 0.5),
        0 0 80px rgba(255, 107, 0, 0.2),
        inset 0 -4px 10px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    touch-action: manipulation;
    user-select: none;
    outline: none;
    position: relative;
}

.draw-btn:not(:disabled):active {
    transform: scale(0.93);
    box-shadow:
        0 0 15px rgba(255, 107, 0, 0.4),
        0 0 40px rgba(255, 107, 0, 0.15),
        inset 0 -2px 6px rgba(0,0,0,0.4);
}

.draw-btn:disabled {
    cursor: default;
}

.draw-btn-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.draw-btn-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Pulsing animation during draw */
.draw-btn.spin {
    animation: btnPulse 0.4s ease-in-out infinite alternate;
    border-color: #ffcc00;
    box-shadow:
        0 0 40px rgba(255, 200, 0, 0.7),
        0 0 100px rgba(255, 200, 0, 0.3),
        inset 0 -4px 10px rgba(0,0,0,0.4);
}

@keyframes btnPulse {
    from { transform: scale(0.97); }
    to   { transform: scale(1.03); }
}

.slot-reel {
    font-size: 3rem;
    line-height: 1;
    animation: reelFlash 0.12s steps(1) infinite;
}

@keyframes reelFlash {
    0%   { opacity: 1; }
    50%  { opacity: 0.3; }
    100% { opacity: 1; }
}

/* ── No prizes state ── */
.no-prizes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.no-prizes-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.6));
}

.no-prizes-text {
    font-size: 1.2rem;
    color: #888;
    text-align: center;
    padding: 0 2rem;
}

/* ── Error message ── */
.error-msg {
    color: #e57373;
    font-size: 0.9rem;
    text-align: center;
    padding: 0 2rem;
    max-width: 300px;
}

/* ── Win Overlay ── */
.win-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: overlayIn 0.35s ease;
    padding: 2rem;
    cursor: pointer;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.win-card {
    background: linear-gradient(160deg, #1a1200, #0d0d0d);
    border: 2px solid #ff6b00;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-shadow:
        0 0 60px rgba(255, 107, 0, 0.4),
        0 20px 60px rgba(0,0,0,0.8);
    animation: cardBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardBounce {
    from { transform: scale(0.5) translateY(40px); opacity: 0; }
    to   { transform: scale(1) translateY(0);      opacity: 1; }
}

.win-emoji {
    font-size: 4rem;
    margin-bottom: 0.75rem;
    animation: emojiPop 0.6s ease 0.2s both;
}

@keyframes emojiPop {
    0%   { transform: scale(0) rotate(-20deg); }
    70%  { transform: scale(1.3) rotate(5deg);  }
    100% { transform: scale(1) rotate(0deg);    }
}

.win-label {
    font-size: 0.95rem;
    color: #ff6b00;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.win-prize {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    word-break: break-word;
}

.win-remaining {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.win-hint {
    font-size: 0.8rem;
    color: #555;
}

/* ── Blazor loading progress ── */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem;
}

.loading-progress circle {
    fill: none;
    stroke: #ff6b00;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #2a2a2a;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, 'Laden...');
    color: #888;
    font-size: 0.9rem;
    display: block;
    text-align: center;
}

#blazor-error-ui {
    background: #1a0a0a;
    border-top: 2px solid #c0392b;
    bottom: 0;
    box-shadow: 0 -1px 10px rgba(0,0,0,0.5);
    color: #f0f0f0;
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.9rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
