/* Player Styles - buzz.pinkmilk.eu (TeamX Theme with buzzerbutton.webp) */

.player-body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    padding: calc(env(safe-area-inset-top, 14px) + 30px) env(safe-area-inset-right, 14px) env(safe-area-inset-bottom, 14px) env(safe-area-inset-left, 14px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    box-sizing: border-box;
}

.player-screen {
    width: 100%;
    max-width: 440px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    padding: 0 0 20px 0;
}

/* TOP HEADER */
.p-top-header {
    width: 100%;
    text-align: center;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Quizmaster Klaas Presenteert IN SOLID BLACK & WEIGHT 400 */
.p-presenter-badge {
    color: #000000 !important;
    font-size: clamp(1.15rem, 4vw, 1.5rem);
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
    text-shadow: none;
    line-height: 1.2;
}

/* Game Title (1 LINE ALWAYS, CLAMP, WEIGHT 400) */
.p-game-title {
    font-size: clamp(1.8rem, 6vw, 2.7rem) !important;
    font-weight: 400 !important;
    color: #ffffff;
    line-height: 1.15;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin: 4px 0 0 0;
}

/* Name Player in a Pill Shape (30px margin from game title) */
.p-player-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-pill);
    padding: 6px 22px;
    font-size: clamp(1.2rem, 4.4vw, 1.65rem);
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 30px !important;
}

.p-player-pill .edit-icon {
    font-size: 0.9rem;
    opacity: 0.75;
}

/* 1. NAME REGISTRATION (Shown only before entering name) */
.join-section {
    width: 100%;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.input-group {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

#playerName {
    width: 100%;
    padding: 1.15rem 6.8rem 1.15rem 1.4rem;
    font-size: 1.55rem;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-pill);
    outline: none;
    color: #333;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 600;
    box-sizing: border-box;
}

#playerName:focus {
    border-color: rgba(255, 255, 255, 0.9);
    background: #ffffff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
}

#playerName::placeholder {
    color: #999;
    font-size: 1.35rem;
    font-weight: 400;
}

.enter-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
}

.enter-btn:active {
    transform: translateY(-50%) scale(0.96);
}

/* 2. MAIN CENTER SECTION */
.center-section {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* BUZZER BUTTON - SLIGHTLY BIGGER (min 86vw, 350px) */
.buzzer-img-btn {
    position: relative;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: min(86vw, 350px);
    height: min(86vw, 350px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease, filter 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.buzzer-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.4));
    transition: transform 0.08s ease, filter 0.2s ease;
    animation: buzzerBreathe 1.2s infinite ease-in-out;
}

@keyframes buzzerBreathe {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.65)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4)); }
    50% { transform: scale(1.05); filter: drop-shadow(0 0 32px rgba(255, 255, 255, 0.9)) drop-shadow(0 16px 30px rgba(0, 0, 0, 0.5)); }
}

.buzzer-img-btn:active {
    transform: scale(0.92);
}

/* WAITING STATE (When NOT activated) */
.wait-hint {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.35);
    text-align: center;
}

/* ======================================================== */
/* WHEN CORRECT / WINNER:                                   */
/* Buzzer disappears -> Rounded rectangle says YES!         */
/* Time slightly bigger!                                    */
/* ======================================================== */
body.winner-active {
    background: linear-gradient(135deg, #0052cc 0%, #0066ff 100%) !important;
}

.yes-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 2.5rem 2rem;
    width: 86%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.yes-title {
    font-size: clamp(4.2rem, 14vw, 6rem);
    font-weight: 900;
    color: #0052cc;
    line-height: 1;
    letter-spacing: -1px;
}

/* TIME SLIGHTLY BIGGER */
.yes-time {
    font-size: clamp(2rem, 6.8vw, 2.7rem);
    font-weight: 800;
    color: #1d4ed8;
    margin-top: 14px;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

/* OTHER PLAYER WON CARD */
.other-won-card {
    background: rgba(0, 0, 0, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 2rem 1.8rem;
    width: 86%;
    max-width: 340px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.other-won-name {
    font-size: clamp(2.2rem, 7.5vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
}

.other-won-sub {
    font-size: clamp(1.3rem, 4.4vw, 1.7rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
}
