/**
 * PlayZone - «مين قال كده؟» (Who Said That?)
 * Party Game Styling: Neon Glassmorphic Dark UI & Dramatic Animations
 */

:root {
    --said-primary: #8b5cf6;
    --said-primary-glow: rgba(139, 92, 246, 0.45);
    --said-secondary: #ec4899;
    --said-secondary-glow: rgba(236, 72, 153, 0.45);
    --said-accent: #06b6d4;
    --said-bg-dark: #0a0a14;
    --said-card-bg: rgba(26, 26, 46, 0.75);
    --said-card-border: rgba(139, 92, 246, 0.25);
    --said-gold: #f59e0b;
    --said-green: #10b981;
    --said-red: #ef4444;
}

/* Page Layout */
.whosaid-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 20px 15px 80px;
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glassmorphic Panel */
.said-glass {
    background: var(--said-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--said-card-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

/* Header Bar */
.said-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}

.said-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.said-title-badge h1 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.said-room-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-family: monospace;
    font-weight: bold;
    color: #a78bfa;
    border: 1px dashed rgba(167, 139, 250, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.said-room-pill:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #a78bfa;
}

/* Question Banner */
.said-question-banner {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.12));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 18px;
    position: relative;
}

.said-cat-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(236, 72, 153, 0.25);
    color: #f472b6;
    margin-bottom: 12px;
}

.said-question-text {
    font-size: 1.55rem;
    line-height: 1.5;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.said-tts-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.said-tts-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--said-primary);
}

/* Timer Ring */
.said-timer-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #f8fafc;
    margin: 10px 0;
}

.said-timer-pill {
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--said-gold);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-size: 1.25rem;
}

.said-timer-pill.urgent {
    color: #ef4444;
    border-color: #ef4444;
    animation: pulse 1s infinite;
}

/* -------------------------------------------------------------
   PHASE 1: WRITING BOX
   ------------------------------------------------------------- */
.said-writing-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

.said-textarea {
    width: 100%;
    background: rgba(15, 15, 26, 0.85);
    border: 2px solid rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    padding: 16px;
    color: #fff;
    font-size: 1.15rem;
    line-height: 1.6;
    resize: none;
    min-height: 110px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
    font-family: inherit;
}

.said-textarea:focus {
    outline: none;
    border-color: var(--said-primary);
    box-shadow: 0 0 20px var(--said-primary-glow);
}

.said-char-counter {
    text-align: left;
    font-size: 0.85rem;
    color: #94a3b8;
}

.said-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.said-sug-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.said-sug-chip:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--said-primary);
    color: #fff;
}

/* Waiting submission checkmarks list */
.said-submit-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.said-status-player {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.said-status-player.done {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}

/* -------------------------------------------------------------
   PHASE 2: GUESSING DISPLAY
   ------------------------------------------------------------- */
.said-answer-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(49, 46, 129, 0.4));
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
    margin-bottom: 20px;
}

.said-quote-icon {
    font-size: 2.2rem;
    color: var(--said-secondary);
    opacity: 0.6;
    margin-bottom: 8px;
}

.said-answer-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.6;
    margin: 10px 0 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Guessing Player Grid */
.said-guess-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.said-guess-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.said-guess-btn {
    background: rgba(20, 20, 35, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    width: 100%;
}

.said-guess-btn:hover:not(:disabled) {
    border-color: var(--said-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.1);
}

.said-guess-btn.selected {
    border-color: var(--said-primary);
    background: rgba(139, 92, 246, 0.25);
    box-shadow: 0 0 20px var(--said-primary-glow);
}

.said-guess-avatar {
    font-size: 2.4rem;
    line-height: 1;
}

.said-guess-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* -------------------------------------------------------------
   PHASE 3: REVEAL SCREEN
   ------------------------------------------------------------- */
.said-reveal-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(76, 29, 149, 0.3));
    border: 2px solid var(--said-primary);
    box-shadow: 0 10px 40px var(--said-primary-glow);
}

.said-author-spotlight {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.said-author-avatar-big {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--said-primary), var(--said-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 0 30px var(--said-secondary-glow);
    animation: bounce 0.8s ease;
}

.said-author-name-big {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.said-bluff-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-weight: 900;
    font-size: 0.9rem;
    padding: 6px 18px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    animation: pulse 1.5s infinite;
}

/* Guesses breakdown */
.said-guesses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin: 20px 0;
    text-align: right;
}

.said-guess-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.said-guess-item.correct {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.1);
}

.said-guess-item.wrong {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.05);
}

/* -------------------------------------------------------------
   PHASE 4: PODIUM & GAME OVER
   ------------------------------------------------------------- */
.said-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin: 30px 0 20px;
}

.said-podium-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 110px;
}

.said-podium-block {
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.said-rank-1 .said-podium-block {
    height: 120px;
    background: linear-gradient(180deg, #f59e0b, #b45309);
}

.said-rank-2 .said-podium-block {
    height: 90px;
    background: linear-gradient(180deg, #94a3b8, #475569);
}

.said-rank-3 .said-podium-block {
    height: 70px;
    background: linear-gradient(180deg, #b45309, #78350f);
}

/* -------------------------------------------------------------
   REACTION BAR & FLOATING EMOJIS
   ------------------------------------------------------------- */
.said-reactions-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 8px 16px;
    border-radius: 40px;
    display: flex;
    gap: 10px;
    z-index: 100;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.said-reaction-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.15s;
}

.said-reaction-btn:hover {
    transform: scale(1.3);
}

.said-floating-emoji {
    position: fixed;
    bottom: 80px;
    font-size: 2.2rem;
    pointer-events: none;
    animation: floatUp 2.5s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
    z-index: 999;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.6);
    }
    100% {
        opacity: 0;
        transform: translateY(-350px) scale(1.5);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .said-question-text {
        font-size: 1.25rem;
    }
    .said-answer-text {
        font-size: 1.3rem;
    }
    .said-guess-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .said-podium {
        gap: 8px;
    }
    .said-podium-slot {
        width: 85px;
    }
}
