/* Mafia Legend - Survey System (نظر سنجی) */
.mafia-survey-overlay {
    position: fixed;
    inset: 0;
    z-index: 95000;
    background: radial-gradient(ellipse at 30% 20%, rgba(30, 35, 70, 0.98) 0%, rgba(5, 8, 18, 0.99) 55%, #020408 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
    font-family: 'iran', Tahoma, sans-serif;
}

.mafia-survey-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(241, 196, 15, 0.25);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.mafia-survey-topbar h1 {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: #f1c40f;
    font-weight: 800;
}

.mafia-survey-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.35);
    border-radius: 999px;
    padding: 8px 18px;
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mafia-survey-timer.urgent {
    animation: surveyUrgentPulse 1s ease-in-out infinite;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.25);
}

@keyframes surveyUrgentPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(231, 76, 60, 0.2); }
    50% { box-shadow: 0 0 24px rgba(231, 76, 60, 0.55); }
}

.mafia-survey-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px 100px;
    -webkit-overflow-scrolling: touch;
}

.mafia-survey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.mafia-survey-card {
    background: linear-gradient(145deg, rgba(22, 28, 50, 0.95), rgba(10, 12, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: border-color 0.25s, transform 0.25s;
}

.mafia-survey-card.rated {
    border-color: rgba(46, 204, 113, 0.45);
}

.mafia-survey-card img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(241, 196, 15, 0.45);
    flex-shrink: 0;
}

.mafia-survey-card-info {
    flex: 1;
    min-width: 0;
}

.mafia-survey-card-info .name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.mafia-survey-card-info .meta {
    font-size: 0.82rem;
    color: #aaa;
    margin-bottom: 10px;
}

.mafia-survey-score-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mafia-survey-score-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #ccc;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.mafia-survey-score-btn:hover {
    border-color: #f1c40f;
    color: #f1c40f;
}

.mafia-survey-score-btn.selected {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 16px rgba(241, 196, 15, 0.45);
}

.mafia-survey-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.75);
    border-top: 1px solid rgba(241, 196, 15, 0.2);
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 95001;
}

.mafia-survey-btn {
    border: none;
    border-radius: 16px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mafia-survey-btn-primary {
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #000;
    box-shadow: 0 8px 24px rgba(241, 196, 15, 0.35);
}

.mafia-survey-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.mafia-survey-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mafia-survey-wait-screen {
    text-align: center;
    padding: 60px 24px;
    max-width: 520px;
    margin: 40px auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 28px;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.mafia-survey-wait-screen .icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.mafia-survey-wait-screen h2 {
    color: #f1c40f;
    margin: 0 0 12px;
}

.mafia-survey-wait-screen p {
    color: #bbb;
    line-height: 1.7;
}

.mafia-survey-review-list {
    max-width: 700px;
    margin: 0 auto;
}

.mafia-survey-review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mafia-survey-review-item.voted {
    border-color: rgba(46, 204, 113, 0.35);
}

.mafia-survey-review-item.missed {
    border-color: rgba(231, 76, 60, 0.35);
    opacity: 0.75;
}

.mafia-survey-table-wrap {
    overflow-x: auto;
    max-width: 1100px;
    margin: 0 auto;
}

.mafia-survey-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.mafia-survey-table th,
.mafia-survey-table td {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #eee;
}

.mafia-survey-table th {
    background: rgba(241, 196, 15, 0.12);
    color: #f1c40f;
    position: sticky;
    top: 0;
}

.mafia-survey-table tr.total-row td {
    background: rgba(46, 204, 113, 0.1);
    font-weight: 800;
    color: #2ecc71;
}

/* Countdown overlay (player + shared) */
.mafia-countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 94000;
    background: radial-gradient(circle at center, #0a0c1a 0%, #020408 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    direction: rtl;
    padding: 24px;
}

.mafia-countdown-overlay .cd-icon {
    font-size: clamp(48px, 10vw, 80px);
    margin-bottom: 16px;
}

.mafia-countdown-overlay .cd-title {
    color: #f1c40f;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 12px;
}

.mafia-countdown-overlay .cd-time {
    font-family: monospace;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 30px rgba(241, 196, 15, 0.5);
    font-variant-numeric: tabular-nums;
}

.mafia-countdown-overlay .cd-sub {
    color: #888;
    margin-top: 20px;
    font-size: 0.95rem;
}
