/* ==========================================================
   Coffee Club Arcade — Shared SDK styles
   ========================================================== */

.cca-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 6, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
}

.cca-popup {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    font-family: system-ui, sans-serif;
}

.cca-popup h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    color: #2b1a0f;
}

.cca-popup p {
    margin: 0 0 16px;
    color: #6b5c4f;
    font-size: .9rem;
}

.cca-popup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cca-popup-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d8ccbe;
    font-size: 1rem;
}

.cca-popup-form button {
    padding: 12px;
    border-radius: 10px;
    background: #d8a24c;
    color: #2b1a0f;
    font-weight: 600;
    font-size: 1rem;
}

.cca-popup-form button:disabled {
    opacity: .6;
}

.cca-popup-message {
    margin-top: 12px;
    color: #c0392b;
    font-size: .85rem;
}

.cca-popup-message.hidden {
    display: none;
}

.cca-popup-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 10px;
    background: #eaf6ec;
    color: #2f7a3e;
    font-weight: 600;
    animation: cca-pop-in .25s ease;
}

.cca-popup-success.hidden {
    display: none;
}

.cca-popup-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2f7a3e;
    color: #fff;
    font-size: .8rem;
    flex-shrink: 0;
}

.cca-popup-form.hidden {
    display: none;
}

@keyframes cca-pop-in {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ==========================================================
   Leaderboard shortcode — game-like card list, not a plain table
   ========================================================== */

.cca-leaderboard {
    font-family: system-ui, sans-serif;
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(43, 26, 15, .08);
    border: 1px solid #f0e4d4;
}

.cca-leaderboard-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #4a2e18, #2b1a0f);
    color: #fff;
}

.cca-leaderboard-trophy {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3));
}

.cca-leaderboard-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.cca-leaderboard-season {
    margin: 2px 0 0;
    font-size: .8rem;
    color: #d8a24c;
    font-weight: 600;
    letter-spacing: .02em;
}

.cca-leaderboard-rows {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 6px;
}

.cca-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #faf6f0;
    transition: transform .15s ease, background .15s ease;
}

.cca-leaderboard-row:hover {
    transform: translateX(2px);
    background: #f3ead9;
}

.cca-leaderboard-row.is-top {
    background: linear-gradient(90deg, #fff8ea, #faf6f0);
    border: 1px solid #f0dcb0;
}

.cca-rank-1 {
    border-left: 4px solid #e0ac2e;
}

.cca-rank-2 {
    border-left: 4px solid #b8b8c0;
}

.cca-rank-3 {
    border-left: 4px solid #c98a52;
}

.cca-leaderboard-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #8a7660;
}

.cca-leaderboard-row.is-top .cca-leaderboard-rank {
    font-size: 1.3rem;
}

.cca-leaderboard-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d8a24c, #b87a2e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.cca-leaderboard-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cca-leaderboard-nickname {
    font-weight: 700;
    color: #2b1a0f;
    font-size: .95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cca-leaderboard-sub {
    font-size: .75rem;
    color: #a08d7c;
}

.cca-leaderboard-points {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    border-radius: 10px;
    background: #2b1a0f;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.1;
}

.cca-leaderboard-row.is-top .cca-leaderboard-points {
    background: linear-gradient(135deg, #d8a24c, #b87a2e);
}

.cca-leaderboard-points-label {
    font-size: .6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    opacity: .85;
}

.cca-leaderboard-empty {
    padding: 40px 24px;
    text-align: center;
    color: #a08d7c;
}

.cca-leaderboard-empty-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}
