/* =============================================
   UNLOCK EVENT MANAGER — Frontend Styles
   ============================================= */

/* Reset & Base */
.uem-registration-wrap,
.uem-leaderboard-wrap,
.uem-hostess-wrap,
.uem-profile-wrap {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
}

.uem-hostess-wrap {
    max-width: 700px;
}

.uem-notice {
    text-align: center;
    opacity: 0.7;
    font-size: 16px;
    padding: 40px 0;
}

/* ── Forms ─────────────────────────────────────── */
.uem-form {
    max-width: 500px;
    margin: 0 auto;
}

.uem-form-group {
    margin-bottom: 6px;
}

/* Registration form fields - glass style matching design */
.uem-registration-wrap .uem-form input[type="text"],
.uem-registration-wrap .uem-form input[type="email"],
.uem-registration-wrap .uem-form input[type="tel"] {
    width: 100%;
    padding: 16px 24px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.uem-registration-wrap .uem-form input:focus {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.18);
}

.uem-field-label {
    display: block;
    padding: 4px 24px 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

/* Hostess/general form fields */
.uem-hostess-wrap .uem-form input[type="text"],
.uem-hostess-wrap .uem-form input[type="password"],
.uem-hostess-wrap .uem-form input[type="number"] {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.uem-hostess-wrap .uem-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.uem-hostess-wrap .uem-form input:focus {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.15);
}

/* Primary button */
.uem-btn {
    display: inline-block;
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s, transform 0.1s;
}

.uem-btn:active {
    transform: scale(0.97);
}

.uem-btn-primary {
    width: 100%;
    background: #FF0101;
    color: #fff;
}

.uem-btn-primary:hover {
    opacity: 0.85;
}

.uem-btn-small {
    padding: 8px 20px;
    font-size: 13px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50px;
}

.uem-btn-save {
    padding: 12px 28px;
    background: #c8102e;
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
    white-space: nowrap;
}

/* Messages */
.uem-message {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.uem-message.uem-error {
    background: rgba(200,16,46,0.3);
    color: #ffaaaa;
}

.uem-message.uem-ok {
    background: rgba(46,200,80,0.3);
    color: #aaffaa;
}

/* Registration Success */
.uem-success-msg {
    text-align: center;
    padding: 60px 20px;
}

.uem-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(46,200,80,0.2);
    color: #4caf50;
    font-size: 40px;
    line-height: 80px;
    margin: 0 auto 20px;
}

.uem-success-msg p {
    font-size: 20px;
    font-weight: 600;
}


/* ── Leaderboard — Podium ──────────────────────── */
.uem-leaderboard-wrap {
    max-width: 1100px;
}

.uem-podium {
    text-align: center;
    margin-bottom: 40px;
}

.uem-podium-label {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    color: #fff;
}

.uem-podium-first {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #c8102e, #9b0020);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 16px 40px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.uem-podium-first:hover {
    opacity: 0.85;
    color: #fff;
}

/* Podium change animation */
@keyframes uem-podium-glow {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,204,0,0); }
    10%  { transform: scale(1.05); box-shadow: 0 0 30px 8px rgba(255,204,0,0.5); }
    20%  { transform: scale(1);    box-shadow: 0 0 8px 2px rgba(255,204,0,0.15); }
    30%  { transform: scale(1.05); box-shadow: 0 0 30px 8px rgba(255,204,0,0.5); }
    40%  { transform: scale(1);    box-shadow: 0 0 8px 2px rgba(255,204,0,0.15); }
    50%  { transform: scale(1.05); box-shadow: 0 0 30px 8px rgba(255,204,0,0.5); }
    60%  { transform: scale(1);    box-shadow: 0 0 8px 2px rgba(255,204,0,0.15); }
    70%  { transform: scale(1.03); box-shadow: 0 0 20px 5px rgba(255,204,0,0.35); }
    80%  { transform: scale(1);    box-shadow: 0 0 5px 1px rgba(255,204,0,0.1); }
    90%  { transform: scale(1.02); box-shadow: 0 0 12px 3px rgba(255,204,0,0.2); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,204,0,0); }
}

.uem-podium-changed {
    animation: uem-podium-glow 5s ease-in-out;
}

.uem-podium-first .uem-podium-points {
    font-size: 28px;
    min-width: 50px;
    text-align: center;
}

.uem-podium-divider {
    width: 2px;
    height: 30px;
    background: rgba(255,255,255,0.4);
}

.uem-podium-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.uem-podium-sublabel {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.8);
}

.uem-podium-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.uem-podium-card:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.uem-podium-card .uem-podium-points {
    min-width: 40px;
    text-align: center;
}

.uem-podium-card .uem-podium-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.3);
}


/* ── Leaderboard — Grid Cards ──────────────────── */
.uem-grid-wrap {
    columns: 4;
    column-gap: 24px;
    margin-top: 30px;
}

.uem-grid-card {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
    margin-bottom: 10px;
    break-inside: avoid;
}

.uem-grid-card:hover {
    opacity: 0.8;
}

.uem-grid-pos {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    min-width: 28px;
    text-align: right;
}

.uem-grid-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 8px 18px 8px 14px;
    flex: 1;
    min-width: 0;
}

.uem-grid-points {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    min-width: 30px;
    text-align: center;
}

.uem-grid-divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.25);
    flex-shrink: 0;
}

.uem-grid-name {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 900px) {
    .uem-grid-wrap {
        columns: 3;
    }
}

@media (max-width: 650px) {
    .uem-grid-wrap {
        columns: 1;
    }
}



/* ── Refresh Button ────────────────────────────── */
.uem-refresh-wrap {
    text-align: center;
    margin-top: 30px;
}

.uem-btn-refresh {
    display: inline-block;
    padding: 12px 32px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.uem-btn-refresh:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.uem-btn-refresh:disabled {
    opacity: 0.5;
    cursor: wait;
}


/* ── Hostess Panel ─────────────────────────────── */
.uem-hostess-login-box {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
}

.uem-hostess-login-box h2 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.uem-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

#uem-hostess-name {
    font-weight: 600;
    font-size: 16px;
}

/* Search */
.uem-search-box {
    margin-bottom: 20px;
}

.uem-search-box input {
    width: 100%;
    padding: 16px 24px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 18px;
    outline: none;
    box-sizing: border-box;
}

.uem-search-box input::placeholder {
    color: rgba(255,255,255,0.6);
}

.uem-search-box input:focus {
    border-color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.3);
}

/* Search Results */
.uem-search-results {
    margin-bottom: 20px;
}

.uem-search-results .uem-participant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.uem-search-results .uem-participant-row:hover,
.uem-search-results .uem-participant-row:active {
    background: rgba(255,255,255,0.25);
}

.uem-participant-row .uem-pr-name {
    font-weight: 600;
    font-size: 16px;
}

.uem-participant-row .uem-pr-email {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* Score Entry */
.uem-selected-participant {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.uem-selected-participant h3 {
    margin: 0;
    font-size: 22px;
}

.uem-game-card {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.uem-game-card h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
}

.uem-game-desc {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.uem-game-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uem-game-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    outline: none;
    min-width: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.uem-game-input:focus {
    border-color: rgba(255,255,255,0.5);
}

.uem-game-input::placeholder {
    color: rgba(255,255,255,0.3);
    font-weight: 400;
    font-size: 15px;
}

.uem-unit {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    min-width: 16px;
}

.uem-game-penalty-row {
    margin-top: 12px;
}

.uem-game-penalty-row label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
}

.uem-game-penalty-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.uem-game-status {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
}

.uem-game-status.saved {
    color: #4caf50;
}

.uem-game-status.error {
    color: #ff6b6b;
}

/* Points Summary */
.uem-points-summary {
    background: rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 20px;
    margin-top: 10px;
}

.uem-points-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.uem-points-row:last-child {
    border-bottom: none;
}

.uem-points-total {
    font-weight: 700;
    font-size: 20px;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid rgba(255,255,255,0.2) !important;
    border-bottom: none !important;
    color: #ffcc00;
}


/* ── Responsive / Tablet ───────────────────────── */
@media (max-width: 768px) {
    .uem-registration-wrap,
    .uem-leaderboard-wrap,
    .uem-hostess-wrap {
        padding: 16px;
    }

    .uem-podium-first {
        padding: 14px 24px;
        font-size: 20px;
    }

    .uem-podium-first .uem-podium-points {
        font-size: 24px;
    }

    .uem-podium-row {
        gap: 16px;
    }

    .uem-podium-card {
        padding: 10px 20px;
        font-size: 16px;
    }

    .uem-leaderboard-table {
        font-size: 13px;
    }

    .uem-leaderboard-table thead th,
    .uem-leaderboard-table tbody td {
        padding: 10px 8px;
    }

    .uem-game-input-row {
        flex-wrap: wrap;
    }

    .uem-game-input {
        font-size: 18px;
    }

    .uem-btn-save {
        width: 100%;
        text-align: center;
    }
}


/* ── Profile Page ──────────────────────────────── */
.uem-profile-wrap {
    max-width: 600px;
    text-align: center;
}

.uem-profile-name {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.uem-profile-rank {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 28px;
}

.uem-profile-rank strong {
    color: #ffcc00;
    font-size: 16px;
}

.uem-profile-games {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.uem-profile-game-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 18px 24px;
    text-align: left;
}

.uem-profile-game-card.has-score {
    border-color: rgba(255,255,255,0.25);
}

.uem-profile-game-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    text-align: left;
}

.uem-profile-game-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-align: left;
}

.uem-profile-game-raw {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-align: left;
}

.uem-profile-game-points {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    text-align: right;
    white-space: nowrap;
    padding-left: 16px;
}

.uem-profile-game-points span {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
}

.uem-profile-game-card.no-score .uem-profile-game-points {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
}

.uem-profile-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,204,0,0.4);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.uem-profile-total-pts {
    font-size: 32px;
    color: #ffcc00;
}

.uem-profile-leaderboard-link {
    display: inline-block;
    padding: 14px 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.3s;
}

.uem-profile-leaderboard-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
