* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #0f0f1a;
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
}

.hidden {
    display: none !important;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 24px;
}

.session-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.9rem;
    color: #888;
}

/* Noscript */
.noscript-message {
    text-align: center;
    padding: 60px 0;
    color: #aaa;
    font-size: 1rem;
    line-height: 1.5;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 0;
    color: #888;
}

/* No ballot */
.no-ballot {
    text-align: center;
    padding: 60px 0;
    color: #888;
}

/* Now Playing */
.now-playing {
    margin-bottom: 20px;
}

.now-playing-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 8px;
}

.now-playing-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 12px;
}

.now-playing-card .cover-art {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.song-info {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.85rem;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Countdown */
.countdown-section {
    text-align: center;
    margin-bottom: 20px;
}

.countdown {
    font-size: 1rem;
    font-weight: 600;
    color: #ccc;
}

.countdown.urgent {
    color: #ff6b6b;
}

.countdown.closed {
    color: #666;
}

.countdown.paused {
    color: #f0a500;
}

.countdown.cooldown {
    color: #6c5ce7;
}

/* Ballot Grid */
.ballot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ballot-option {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.ballot-option:active {
    transform: scale(0.97);
}

.ballot-option:hover {
    background: #242445;
}

.ballot-option[data-has-color]:hover {
    filter: brightness(1.2);
}

.ballot-option.voted {
    border-color: #6c5ce7;
    background: #242445;
}

.ballot-option[data-has-color].voted {
    border-color: rgba(255, 255, 255, 0.6);
}

.ballot-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ballot-option .cover-art {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
}

.ballot-option .song-title {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 2px;
}

.ballot-option .song-artist {
    font-size: 0.75rem;
}

.vote-count {
    display: inline-block;
    margin-top: 6px;
    background: #6c5ce7;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.vote-count.zero {
    background: #333;
}

/* Session Ended */
.session-ended {
    text-align: center;
    padding: 60px 16px;
}

.session-ended h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.session-ended p {
    font-size: 1rem;
    color: #aaa;
    line-height: 1.5;
}

/* Vote Feedback */
.vote-feedback {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #aaa;
}
