/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
    padding: 2rem;
}

.page.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Landing page */
.landing {
    max-width: 720px;
    margin: 80px auto 40px;
    padding: 32px;
    text-align: center;
}
.landing h1 {
    font-size: 42px;
    margin: 0 0 12px;
    letter-spacing: 0.5px;
}
.landing .subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 36px;
}

.lang-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lang-btn {
    border: 1px solid transparent;
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--card-bg);
    text-align: center;
    margin-bottom: 0.5rem;
}



h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.subtitle {
    text-align: center;
    color: var(--card-bg);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Buttons */
button {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    color: white;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 900;
    font-size: 13px;
    transition: transform 0.05s ease, border-color 0.2s ease, background 0.2s ease;
    user-select: none;
    white-space: nowrap;
}
button:hover {
    border-color: rgba(255, 255, 255, 0.22);
}
button:active {
    transform: translateY(1px) scale(0.99);
}
button.primary {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.28), rgba(37, 99, 235, 0.10));
}
button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Input Fields */
.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: white;
    padding: 12px 14px;
    font-weight: 800;
    font-size: 14px;
    outline: none;
    margin-bottom: 12px;
    font-family: inherit;
}
.input-field:focus {
    border-color: rgba(37, 99, 235, 0.35);
}
.input-field::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

textarea.input-field {
    resize: vertical;
    font-family: inherit;
}

/* Landing Page */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.action-card {
    text-align: left;
    padding: 24px;
}
.action-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: 0.3px;
    color: white;
}
.action-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 20px;
}
.action-card button {
    width: 100%;
}

.panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 60%), rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Setup Sections */
/* Organizer Setup Page Styling */
#organizer-setup h1,
#organizer-control h1 {
    color: white;
}

#organizer-setup .container,
#organizer-control .container {
    color: var(--text-primary);
}

#organizer-setup label,
#organizer-control label {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Fix input fields in setup sections to have proper contrast */
#organizer-setup .input-field,
#organizer-control .input-field {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

#organizer-setup .input-field::placeholder,
#organizer-control .input-field::placeholder {
    color: var(--text-secondary);
}

#organizer-setup .input-field:focus,
#organizer-control .input-field:focus {
    border-color: var(--primary-color);
    background: white;
}

/* Fix button visibility in setup sections */
#organizer-setup .btn,
#organizer-control .btn {
    background: var(--primary-color);
    color: white;
}

#organizer-setup .btn-primary,
#organizer-control .btn-primary {
    background: var(--primary-color);
    color: white;
}

#organizer-setup .btn-success,
#organizer-control .btn-success {
    background: var(--secondary-color);
    color: white;
}

.setup-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;

    .checkbox-label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0.75rem;
        cursor: pointer;
        user-select: none;
    }

    .checkbox-label input[type="checkbox"] {
        width: 1.25rem;
        height: 1.25rem;
        cursor: pointer;
    }

    .checkbox-label span {
        font-size: 0.95rem;
        color: var(--text-primary);
    }
    box-shadow: var(--shadow);
}

.card-preset-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.card-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-input-group .input-field {
    flex: 1;
    margin-bottom: 0;
}

.cards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 2rem;
    font-weight: 600;
}

.card-chip button {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-chip button:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Items List */
.item-form {
    margin-bottom: 1.5rem;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.item-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.item-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.item-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.item-card a:hover {
    text-decoration: underline;
}

.item-card .delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.item-card .delete-btn:hover {
    background: #dc2626;
}

/* Session Header */
.session-header {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.session-header h1 {
    color: var(--text-primary);
    text-align: left;
    margin-bottom: 1rem;
}

.session-header-compact {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.session-header-compact h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.session-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.session-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.player-info-compact {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.session-status {
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 0.6rem;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-weight: 600;
}

.session-code-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.session-code-display label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.code {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--bg-color);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 968px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Panels */
.current-item-panel,
.votes-panel,
.participants-panel,
.items-queue-panel,
.voting-panel,
.results-panel {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.votes-panel-focus {
    border: 2px solid var(--primary-color);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.item-display {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.item-display h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.item-display p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.item-display a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 0.5rem;
}

.item-display a:hover {
    text-decoration: underline;
}

.item-display.empty {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Parking Lot */
.parking-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.parking-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Timer */
.timer-control {
    margin-bottom: 1.5rem;
}

.timer-control-organizer {
    margin-bottom: 1.5rem;
}

.timer-display {
    background: var(--text-primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.timer-display span {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.timer-display-compact {
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
}

.timer-display-compact span {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    display: inline-block;
}

.timer-display-player {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.timer-display-player span {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    display: inline-block;
}

/* Timer Warning State */
.timer-warning {
    animation: timer-warning-pulse 0.8s ease-in-out infinite !important;
    color: #ef4444 !important;
    font-weight: 900 !important;
}

@keyframes timer-warning-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.timer-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Voting Control */
.voting-control {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.voting-control .btn {
    flex: 1;
    min-width: 150px;
}

/* Votes Display */
.votes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.vote-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    position: relative;
}

.vote-card.reveal {
    animation: voteReveal 450ms ease both;
}

.vote-card.hot-take {
    border: 2px solid #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2), 0 8px 18px rgba(249, 115, 22, 0.18);
    animation: hotTakeGlow 2.6s ease-in-out infinite;
}

.vote-card.voted {
    border: 2px solid var(--secondary-color);
}

.vote-card.highest {
    border: 2px solid #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.06);
}

.vote-card.lowest {
    border: 2px solid #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    background: rgba(59, 130, 246, 0.06);
}

.vote-card .player-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.vote-card .vote-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.vote-card .vote-value.hidden {
    color: var(--text-secondary);
}

.vote-card .confidence {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.vote-card .confidence-icon {
    font-size: 1.5rem;
}

.hot-take-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.15);
    color: #c2410c;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.hot-take-caption {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@keyframes voteReveal {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Votes Summary */
.votes-summary {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.5rem;
}

.bias-panel {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.bias-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0 1rem;
}

.bias-summary {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 0.5rem;
}

.bias-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--border-color);
}

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

.bias-name {
    font-weight: 700;
    color: var(--text-primary);
}

.bias-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.bias-label {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.bias-label.under {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.bias-label.over {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.bias-label.accurate {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.variance-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(59, 130, 246, 0.12));
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #7f1d1d;
    font-weight: 700;
    padding: 0.6rem 0.9rem;
    border-radius: 0.6rem;
    margin: 0.5rem 0 1rem;
}

.votes-summary h4 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.summary-stat .label {
    color: var(--text-secondary);
}

.summary-stat .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Score Suggestion Panel */
.score-suggestion-panel {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.suggestion-header h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-explanation {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.suggested-score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.suggestion-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.custom-score-input {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.custom-score-input .input-field {
    flex: 1;
    margin-bottom: 0;
}

.suggestion-note {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning-color);
    border-radius: 0.25rem;
}

.suggestion-note small {
    color: #92400e;
    font-weight: 600;
}

.suggestion-confirmed {
    text-align: center;
}

.suggestion-confirmed h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.confirmed-score {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.suggestion-confirmed p {
    color: var(--text-secondary);
}

/* Confidence Selector */
.confidence-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.confidence-option {
    flex: 1;
    min-width: 150px;
    cursor: pointer;
}

.confidence-option input[type="radio"] {
    display: none;
}

.confidence-label {
    display: block;
    padding: 1rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.confidence-option input[type="radio"]:checked + .confidence-label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.confidence-label:hover {
    border-color: var(--primary-color);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.poker-card {
    aspect-ratio: 2/3;
    background: linear-gradient(160deg, hsl(var(--card-hue, 210), 80%, 88%) 0%, hsl(var(--card-hue, 210), 75%, 80%) 100%);
    border: 2px solid hsl(var(--card-hue, 210), 65%, 35%);
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--shadow);
    overflow: hidden;
    color: hsl(var(--card-hue, 210), 60%, 20%);
}

.poker-card::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.poker-card::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    transform: rotate(-12deg);
}

.poker-card:hover {
    transform: translateY(-5px);
    border-color: hsl(var(--card-hue, 210), 70%, 30%);
    box-shadow: var(--shadow-lg);
}

.poker-card.selected {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 18px 25px -10px rgba(0, 0, 0, 0.35);
    border-color: hsl(var(--card-hue, 210), 80%, 25%);
    outline: 3px solid rgba(255, 255, 255, 0.8);
}

.card-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.card-corner {
    position: absolute;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 1;
    opacity: 0.85;
}

.card-corner.top-left {
    top: 0.6rem;
    left: 0.7rem;
}

.card-corner.bottom-right {
    bottom: 0.6rem;
    right: 0.7rem;
    transform: rotate(180deg);
}

.card-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    fill: hsl(var(--card-hue, 210), 55%, 30%);
}

/* Vote Status */
.vote-status {
    text-align: center;
    padding: 1rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* Participants */
.participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.participant-item {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.participant-item.waiting {
    border-left-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.08);
}

.participant-item.voted {
    border-left-color: var(--secondary-color);
    opacity: 0.7;
}

.participant-name {
    font-weight: 600;
}

.participant-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.participant-status.voted {
    color: var(--secondary-color);
    font-weight: 600;
}

.participant-status.waiting {
    color: var(--warning-color);
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Voting Status Banner (Top) */
.voting-status-banner {
    /* margin removed - spacing handled by parent gap */
}

.all-voted-banner {
    background: var(--card-bg);
    border: 3px solid var(--secondary-color);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.all-voted-banner h3 {
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.all-voted-banner p {
    color: #047857;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.waiting-banner {
    background: var(--card-bg);
    border: 2px solid var(--warning-color);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.waiting-banner p {
    color: #92400e;
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
}

.all-voted-notice {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    border: 2px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.all-voted-notice h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.all-voted-notice p {
    color: #047857;
    font-weight: 600;
    margin: 0;
}

.waiting-notice {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning-color);
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.waiting-notice p {
    color: #92400e;
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
}

/* Items Queue */
.items-queue {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.queue-item {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border-left: 3px solid var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.queue-item:hover {
    background: var(--border-color);
}

.queue-item.active {
    border-left-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.queue-item.completed {
    border-left-color: var(--secondary-color);
    opacity: 0.6;
}

.queue-item.parked {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.queue-parking-icon {
    display: inline-block;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.queue-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.queue-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.items-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.summary-item {
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.5rem;
    border-left: 3px solid var(--secondary-color);
}

.summary-item.parked {
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.08), rgba(255, 193, 7, 0.05));
    border-left-color: #ff9900;
}

.parking-badge-small {
    display: inline-block;
    background: linear-gradient(135deg, #ff9900, #ffb84d);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(255, 153, 0, 0.2);
}

.summary-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.summary-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.summary-link {
    margin-bottom: 0.35rem;
}

.summary-link a {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
}

.summary-link a:hover {
    text-decoration: underline;
}

.summary-score {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.summary-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.empty-summary {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

/* Completion View */
.completion-view {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.completion-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.completion-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.completion-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.completion-summary {
    margin-bottom: 2rem;
}

.completion-summary h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

#completion-items-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.completion-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--primary-color);
}

.completion-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.completion-item-number {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.completion-item-header h3 {
    flex: 1;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.completion-item-score {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.completion-item-description {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.completion-item-link {
    margin-bottom: 1rem;
}

.completion-item-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.completion-item-link a:hover {
    text-decoration: underline;
}

.completion-item-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.completion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.completion-actions .btn {
    min-width: 200px;
}

/* Player Completion */
.player-completion-message {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.player-completion-message h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.player-completion-message p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hidden Elements */
.hidden {
    display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hotTakeGlow {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2), 0 8px 18px rgba(249, 115, 22, 0.18);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.25), 0 12px 24px rgba(249, 115, 22, 0.22);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }

    .poker-card {
        border-radius: 0.75rem;
    }

    .card-value {
        font-size: 1.6rem;
    }

    .session-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .session-info-compact {
        gap: 0.75rem;
    }

    .confidence-selector {
        flex-direction: column;
    }

    .confidence-option {
        width: 100%;
    }

    .completion-header h1 {
        font-size: 1.75rem;
    }

    .completion-actions {
        flex-direction: column;
    }

    .completion-actions .btn {
        width: 100%;
    }

    .completion-item-header {
        flex-wrap: wrap;
    }
}

/* Copy Tooltip */
.copy-tooltip {
    position: absolute;
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: tooltip-appear 0.3s ease-out;
    transform: translateX(-50%);
}

.copy-tooltip.fade-out {
    animation: tooltip-fade-out 0.3s ease-out forwards;
}

@keyframes tooltip-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes tooltip-fade-out {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}
