/* =============================================================================
   Queue Page Styles
   ============================================================================= */

.queue-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.queue-header {
    text-align: center;
    margin-bottom: 2rem;
}

.queue-header .page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.queue-header .page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Server Status Banner */
.server-status-banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.status-dot.idle {
    background: var(--text-muted);
}

.status-dot.starting {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.running {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
}

.status-details {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Layout */
.queue-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .queue-layout {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .queue-layout {
        grid-template-columns: 300px 1fr 300px;
    }
}

/* Panels */
.queue-panel,
.voting-panel,
.tallies-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-title svg {
    color: var(--accent-primary);
}

/* Queue Count */
.queue-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Progress Bar */
.queue-progress-container {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.queue-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width var(--transition-spring);
    width: 0%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    width: 100%;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-accent-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-hover);
}

.queue-actions {
    margin-bottom: 1.25rem;
}

.login-prompt {
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}

.login-prompt a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Players List */
.players-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.player-item:hover {
    background: var(--bg-hover);
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--border-primary);
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.player-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}

/* Queue Ready Banner */
.queue-ready-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    color: #10b981;
    font-weight: 600;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Voting Panel */
.vote-section {
    margin-bottom: 1.5rem;
}

.vote-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Track Grid */
.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.track-card {
    position: relative;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.track-card:hover {
    border-color: var(--accent-hover);
    background: var(--bg-hover);
}

.track-card.selected {
    border-color: var(--accent-primary);
    background: var(--accent-subtle);
}

.track-card .track-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
}

.track-card .vote-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Weather Grid */
.weather-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.weather-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.weather-card:hover {
    border-color: var(--accent-hover);
    background: var(--bg-hover);
}

.weather-card.selected {
    border-color: var(--accent-primary);
    background: var(--accent-subtle);
}

.weather-icon {
    font-size: 1.25rem;
}

.weather-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
}

.btn-vote {
    margin-top: 0.5rem;
}

/* Tallies Panel */
.tally-section {
    margin-bottom: 1.5rem;
}

.tally-section:last-child {
    margin-bottom: 0;
}

.tally-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.tally-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tally-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.tally-item.leading {
    background: var(--accent-subtle);
    border: 1px solid var(--accent-primary);
}

.tally-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
}

.tally-bar-container {
    flex: 2;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.tally-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width var(--transition-spring);
}

.tally-count {
    min-width: 30px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.3);
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 767px) {
    .queue-page {
        padding: 1rem;
    }

    .queue-header .page-title {
        font-size: 1.5rem;
    }

    .server-status-banner {
        flex-direction: column;
        text-align: center;
    }

    .track-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        max-width: none;
    }
}
