/* ═══════════════════════════════════════════════════════════
   COSMIC COURT — Game-Specific Styles (v3, modal-based)
   Shared: buttons, modal system, arena card, animations → game-shared-style.css
   ═══════════════════════════════════════════════════════════ */

/* ===== HERO ===== */
.cc-hero { padding-top: 44px; padding-bottom: 8px; text-align: center; }
.cc-title { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem, 5.5vw, 3.6rem); margin-bottom: 10px; line-height: 1.1; }
.cc-subtitle { max-width: 540px; margin: 0 auto; color: var(--text-secondary); font-size: 1rem; line-height: 1.55; }
@media (max-width: 520px) {
    .cc-hero { padding-top: 24px; padding-bottom: 4px; }
    .cc-title { margin-bottom: 6px; }
    .cc-subtitle { font-size: 0.88rem; }
}

.cc-game-section { padding-top: 18px; padding-bottom: 56px; }

/* ===== GAME APP CARD (lives inside the modal) ===== */
.cc-app {
    background: var(--bg-card);
    background-image: linear-gradient(160deg, rgba(139, 92, 246, 0.06), transparent 60%);
    border: 1px solid var(--border-card);
    border-radius: 22px;
    padding: 30px 26px;
    position: relative;
    min-height: 260px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ===== VIEW SWITCHING ===== */
.cc-view { display: none; }
.cc-view-active { display: block; animation: cc-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes cc-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.cc-view-title { font-family: 'Playfair Display', serif; color: var(--text-primary); font-size: 1.45rem; margin-bottom: 20px; text-align: center; }

/* ===== CHOICE CARDS (Host / Join — live in the arena card) ===== */
.cc-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .cc-choice-grid { grid-template-columns: 1fr; } }

.cc-choice-card {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.cc-choice-card::before {
    content: ''; position: absolute; inset: 0;
    background: var(--gradient-primary); opacity: 0; transition: opacity 0.3s ease; z-index: 0;
}
.cc-choice-card:hover { border-color: var(--brand-primary-light); transform: translateY(-5px); box-shadow: 0 16px 40px rgba(139, 92, 246, 0.25); }
.cc-choice-card:hover::before { opacity: 0.06; }
.cc-choice-icon, .cc-choice-card h3, .cc-choice-card p { position: relative; z-index: 1; }
.cc-choice-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3)); }
.cc-choice-card h3 { color: var(--text-primary); font-size: 1.08rem; margin-bottom: 6px; font-weight: 600; }
.cc-choice-card p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; line-height: 1.4; }

/* ===== FORM ELEMENTS ===== */
.cc-form { display: flex; flex-direction: column; gap: 6px; }
.cc-label { color: var(--text-secondary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 16px; margin-bottom: 6px; font-weight: 600; }
.cc-input {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-card); border-radius: 12px;
    padding: 13px 15px; color: var(--text-primary); font-size: 1rem; font-family: inherit;
    outline: none; transition: all 0.25s ease;
}
.cc-input:focus { border-color: var(--brand-primary-light); background: rgba(139, 92, 246, 0.05); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }
.cc-input-code { letter-spacing: 0.35em; text-align: center; font-size: 1.4rem; font-weight: 700; }

.cc-pill-group { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-pill {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-card); border-radius: 50px;
    padding: 9px 18px; color: var(--text-secondary); font-size: 0.85rem; cursor: pointer;
    transition: all 0.25s ease; font-family: inherit; font-weight: 500;
}
.cc-pill:hover { border-color: var(--brand-primary-light); color: var(--text-primary); }
.cc-pill-active { background: var(--gradient-primary); border-color: transparent; color: white; box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35); }

.cc-btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
    padding: 15px 24px;
    border: none;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cc-btn-block:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.55), 0 0 34px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}
.cc-btn-block:active:not(:disabled) {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
}
.cc-btn-block:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.cc-error { color: #f87171; font-size: 0.85rem; margin-top: 10px; min-height: 1.2em; text-align: center; }

/* ===== LOBBY ===== */
.cc-lobby-header { text-align: center; margin-bottom: 24px; position: relative; z-index: 1; }
.cc-lobby-label { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; font-weight: 600; }
.cc-room-code {
    font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700; letter-spacing: 0.15em;
    color: var(--text-primary); background: rgba(139, 92, 246, 0.1); border: 1px solid var(--brand-primary-light);
    border-radius: 16px; padding: 14px 24px; display: inline-block; box-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
}
.cc-room-code-small { font-size: 2.1rem; padding: 10px 18px; }
.cc-lobby-hint { color: var(--text-secondary); font-size: 0.85rem; margin-top: 12px; }
.cc-qr { display: block; margin: 18px auto 0; border-radius: 12px; border: 1px solid var(--border-card); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }

.cc-players-panel { background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.04); border-radius: 14px; padding: 18px 20px; margin-bottom: 10px; position: relative; z-index: 1; }
.cc-players-heading { color: var(--text-primary); font-size: 0.95rem; margin-bottom: 12px; font-weight: 600; }
.cc-players-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-players-list li {
    display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.9rem;
    padding: 8px 12px; background: rgba(255, 255, 255, 0.025); border-radius: 10px;
    animation: cc-fade-in 0.3s ease; transition: background 0.2s ease;
}
.cc-players-list li:hover { background: rgba(255, 255, 255, 0.05); }
.cc-players-list li .cc-host-badge { font-size: 0.68rem; background: var(--gradient-primary); color: white; padding: 3px 10px; border-radius: 50px; margin-left: auto; font-weight: 600; }

/* ===== ROUND HEADER ===== */
.cc-round-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; position: relative; z-index: 1; }
.cc-round-badge { color: var(--text-secondary); font-size: 0.83rem; background: rgba(255, 255, 255, 0.03); padding: 7px 16px; border-radius: 50px; border: 1px solid var(--border-card); font-weight: 500; }
.cc-timer {
    font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; color: var(--brand-primary-light);
    background: rgba(139, 92, 246, 0.1); border: 1px solid var(--brand-primary-light); border-radius: 50%;
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease;
}
.cc-timer.cc-timer-urgent { color: #f87171; border-color: #f87171; background: rgba(248, 113, 113, 0.1); animation: cc-pulse 1s ease infinite; }
@keyframes cc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ===== WRITING / GUESSING ROLE VIEWS ===== */
.cc-writing-role-view { display: none; text-align: center; position: relative; z-index: 1; padding: 4px; border-radius: 16px; }
.cc-writing-role-view.cc-role-active { display: block; animation: cc-fade-in 0.3s ease; }

.cc-prompt-label { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; font-weight: 600; }
.cc-prompt-text { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--text-primary); line-height: 1.5; margin-bottom: 22px; }

.cc-textarea {
    width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-card); border-radius: 12px;
    padding: 14px; color: var(--text-primary); font-size: 1rem; font-family: inherit; min-height: 90px;
    resize: vertical; outline: none; box-sizing: border-box; transition: all 0.25s ease; text-align: left;
}
.cc-textarea:focus { border-color: var(--brand-primary-light); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); }

.cc-progress-text { color: var(--text-muted); font-size: 0.8rem; margin-top: 18px; }

/* ===== GUESSING SLOTS ===== */
.cc-guess-slot { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border-card); border-radius: 14px; padding: 16px; margin-bottom: 12px; text-align: left; transition: border-color 0.2s ease; }
.cc-guess-slot:hover { border-color: rgba(139, 92, 246, 0.3); }
.cc-guess-slot-text { color: var(--text-primary); font-size: 0.95rem; margin-bottom: 10px; line-height: 1.5; }
.cc-guess-select { width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-card); border-radius: 10px; padding: 11px 12px; color: var(--text-primary); font-size: 0.9rem; font-family: inherit; outline: none; }
.cc-guess-select:focus { border-color: var(--brand-primary-light); }

/* ===== REVEAL RESULTS ===== */
.cc-reveal-item { background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border-card); border-radius: 14px; padding: 16px; margin-bottom: 12px; text-align: left; transition: transform 0.2s ease; }
.cc-reveal-item.cc-reveal-correct { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.06); }
.cc-reveal-item.cc-reveal-wrong { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.05); }
.cc-reveal-text { color: var(--text-primary); font-size: 0.95rem; margin-bottom: 10px; line-height: 1.5; }
.cc-reveal-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-secondary); flex-wrap: wrap; gap: 6px; }
.cc-reveal-badge { font-size: 0.75rem; font-weight: 600; padding: 4px 12px; border-radius: 50px; white-space: nowrap; }
.cc-reveal-badge.cc-badge-correct { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.cc-reveal-badge.cc-badge-wrong { background: rgba(248, 113, 113, 0.2); color: #f87171; }
