:root {
    --bg-deep: #08080a;
    --bg-card: rgba(17, 17, 20, 0.85);
    --bg-card-elevated: rgba(25, 25, 30, 0.9);
    --bg-input: #202027;
    --accent: #a78bfa;
    --accent-gold: #e5a64e;
    --accent-glow: rgba(167, 139, 250, 0.25);
    --accent-gold-glow: rgba(229, 166, 78, 0.25);
    --accent-subtle: rgba(167, 139, 250, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #c2c2ca;
    --text-muted: #8e8e99;
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(167, 139, 250, 0.3);
    --success: #4ade80;
    --error: #f87171;
    --danger: #dc2626;
    --radius: 12px;
    --radius-lg: 24px;
}

:root[data-theme="light"] {
    --bg-deep: #ffffff;
    --bg-card: rgba(255, 255, 255, 1);
    --bg-card-elevated: rgba(255, 255, 255, 1);
    --bg-input: #ffffff;
    --accent: #7c3aed;
    --accent-gold: #e49636;
    --accent-glow: rgba(124, 58, 237, 0.25);
    --accent-gold-glow: rgba(180, 83, 9, 0.25);
    --accent-subtle: rgba(124, 58, 237, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(124, 58, 237, 0.4);
    --success: #16a34a;
    --error: #dc2626;
    --danger: #dc2626;
}


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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 18px;
    background-image: url('../images/gradient.jpg');
    background-color: #070020;
    background-repeat: repeat-x;
    transition: background-color 0.4s ease, color 0.4s ease;
}


:root[data-theme="light"] .logo {
    color: var(--text-primary);
}

:root[data-theme="light"] .login-link {
    color: var(--text-secondary);
}

:root[data-theme="light"] .login-link:hover {
    color: var(--text-primary);
}

:root[data-theme="light"] .hero h1 {
    color: var(--text-primary);
}

:root[data-theme="light"] .hero h1 span {
    color: var(--accent-gold);
}

:root[data-theme="light"] .poll-card,
:root[data-theme="light"] .create-form,
:root[data-theme="light"] .feature-card {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

:root[data-theme="light"] .form-input,
:root[data-theme="light"] .search-input {
    background: #f8fafc;
    border-color: var(--border);
    color: var(--text-primary);
}

:root[data-theme="light"] .form-input:focus,
:root[data-theme="light"] .search-input:focus {
    background: #ffffff;
    border-color: var(--accent);
}

:root[data-theme="light"] .toggle-switch {
    background: #f1f5f9;
    border-color: var(--border);
}

:root[data-theme="light"] .toggle-option.active {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

:root[data-theme="light"] .movie-item {
    background: #f8fafc;
}

:root[data-theme="light"] .movie-item:hover {
    background: #f1f5f9;
}

:root[data-theme="light"] .btn-secondary {
    background: #f8fafc;
    border-color: var(--border);
    color: var(--text-primary);
}

:root[data-theme="light"] .btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--border-accent);
}

:root[data-theme="light"] .btn-ghost {
    color: var(--accent-gold);
}

:root[data-theme="light"] .search-results {
    background: #ffffff;
    border-color: var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .search-result-item:hover,
:root[data-theme="light"] .search-result-item.active {
    background: #f8fafc;
}

:root[data-theme="light"] .advanced-toggle {
    border-color: var(--border);
    color: var(--text-muted);
}

:root[data-theme="light"] .advanced-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

:root[data-theme="light"] .genre-checkbox label,
:root[data-theme="light"] .tier-checkbox label,
:root[data-theme="light"] .verification-option label,
:root[data-theme="light"] .vote-limit-option label {
    background: #f8fafc;
    border-color: var(--border);
}

:root[data-theme="light"] .genre-checkbox label:hover,
:root[data-theme="light"] .tier-checkbox label:hover,
:root[data-theme="light"] .verification-option label:hover,
:root[data-theme="light"] .vote-limit-option label:hover {
    border-color: var(--accent);
}

:root:root[data-theme="light"] body {
    background-color: #e0f0ff;
    background-image: none;
}

/* Light mode text overrides */
:root[data-theme="light"] .section-label {
    color: var(--text-muted);
}

:root[data-theme="light"] .poll-title {
    color: var(--text-primary);
}

:root[data-theme="light"] .poll-description {
    color: var(--text-secondary);
}

:root[data-theme="light"] .author-name {
    color: var(--text-primary);
}

:root[data-theme="light"] .leaders-title {
    color: var(--text-muted);
}

:root[data-theme="light"] .total-votes {
    color: var(--text-secondary);
}

:root[data-theme="light"] .movie-title-text {
    color: var(--text-primary);
}

:root[data-theme="light"] .movie-year {
    color: var(--text-muted);
}

:root[data-theme="light"] .movie-rank {
    color: var(--text-muted);
}

:root[data-theme="light"] .vote-count {
    color: var(--text-muted);
}

:root[data-theme="light"] .no-votes {
    color: var(--text-muted);
}

:root[data-theme="light"] .vote-counter {
    color: var(--text-secondary);
}

:root[data-theme="light"] .hero-subtitle {
    color: var(--text-secondary);
}

:root[data-theme="light"] .form-label {
    color: var(--text-primary);
}

:root[data-theme="light"] .toggle-label {
    color: var(--text-primary);
}

:root[data-theme="light"] .toggle-option {
    color: var(--text-secondary);
}

:root[data-theme="light"] .toggle-option.active {
    color: var(--text-primary);
}

:root[data-theme="light"] .settings-section-title {
    color: var(--text-muted);
}

:root[data-theme="light"] .verification-title {
    color: var(--text-primary);
}

:root[data-theme="light"] .verification-desc {
    color: var(--text-muted);
}

:root[data-theme="light"] .close-type-label {
    color: var(--text-secondary);
}

:root[data-theme="light"] .feature-card h3 {
    color: var(--text-primary);
}

:root[data-theme="light"] .feature-card p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .footer-links a {
    color: var(--text-secondary);
}

:root[data-theme="light"] .footer-copy {
    color: var(--text-muted);
}

:root[data-theme="light"] .manage-section h1 {
    color: var(--text-primary);
}

:root[data-theme="light"] .manage-poll-info h3 a {
    color: var(--text-primary);
}

:root[data-theme="light"] .manage-poll-meta span {
    color: var(--text-muted);
}

:root[data-theme="light"] .manage-poll-desc {
    color: var(--text-muted);
}

:root[data-theme="light"] .poll-card-title a {
    color: var(--text-primary);
}

:root[data-theme="light"] .poll-card-desc {
    color: var(--text-muted);
}

:root[data-theme="light"] .poll-card-votes {
    color: var(--text-muted);
}

:root[data-theme="light"] .search-result-title {
    color: var(--text-primary);
}

:root[data-theme="light"] .search-result-year {
    color: var(--text-muted);
}

:root[data-theme="light"] .form-hint {
    color: var(--text-muted);
}

:root[data-theme="light"] .settings-hint {
    color: var(--text-muted);
}

:root[data-theme="light"] .year-input-group label,
:root[data-theme="light"] .season-input-group label {
    color: var(--text-muted);
}

:root[data-theme="light"] .slider-value span {
    color: var(--text-muted);
}

:root[data-theme="light"] .share-section span {
    color: var(--text-muted);
}

:root[data-theme="light"] .patreon-connect-prompt p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .access-message p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .email-hint {
    color: var(--text-muted);
}

:root[data-theme="light"] .create-section h1,
:root[data-theme="light"] .create-section h2 {
    color: var(--text-primary);
}

:root[data-theme="light"] .create-section > p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .empty-state p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .login-prompt p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .poll-created-banner h3 {
    color: var(--text-primary);
}

:root[data-theme="light"] .poll-created-banner .banner-content > p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .save-poll-option > p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .genre-checkbox label,
:root[data-theme="light"] .tier-checkbox label {
    color: var(--text-secondary);
}

:root[data-theme="light"] .genre-checkbox input:checked + label,
:root[data-theme="light"] .tier-checkbox input:checked + label {
    color: var(--text-primary);
}

:root[data-theme="light"] .vote-limit-option label {
    color: var(--text-secondary);
}

:root[data-theme="light"] .vote-limit-option input:checked + label {
    color: var(--text-primary);
}

:root[data-theme="light"] .checkbox-option .checkbox-label {
    color: var(--text-secondary);
}

:root[data-theme="light"] .checkbox-option input:checked + .checkbox-label {
    color: var(--text-primary);
}

:root[data-theme="light"] .tier-option label {
    color: var(--text-secondary);
}

:root[data-theme="light"] .tier-option input:checked + label {
    color: var(--text-primary);
}

:root[data-theme="light"] .tier-price {
    color: var(--text-muted);
}

:root[data-theme="light"] .feature-tag {
    color: var(--text-muted);
}

:root[data-theme="light"] .email-modal h3 {
    color: var(--text-primary);
}

:root[data-theme="light"] .email-modal > p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .email-modal .email-hint {
    color: var(--text-muted);
}

:root[data-theme="light"] .genre-modal-title {
    color: var(--text-primary);
}

:root[data-theme="light"] .genre-modal-text,
:root[data-theme="light"] .genre-modal-details {
    color: var(--text-secondary);
}

:root[data-theme="light"] .genre-modal-details strong {
    color: var(--text-primary);
}

:root[data-theme="light"] .badge-time {
    background: #e2e8f0;
    color: var(--text-secondary);
}

:root[data-theme="light"] .author-avatar-gradient {
    text-shadow: none;
}

:root[data-theme="light"] .link-copy-box input {
    background: #f8fafc;
    color: var(--text-primary);
}

:root[data-theme="light"] .year-input,
:root[data-theme="light"] .season-input {
    background: #f8fafc;
    color: var(--text-primary);
}

:root[data-theme="light"] .share-input {
    background: #f8fafc;
    color: var(--text-primary);
}

:root[data-theme="light"] .genre-modal {
    background: #ffffff;
    border-color: var(--border);
}

:root[data-theme="light"] .email-modal {
    background: #ffffff;
    border-color: var(--border);
}

:root[data-theme="light"] .patreon-connect-prompt {
    background: #f8fafc;
}

:root[data-theme="light"] .account-fields {
    background: #f8fafc;
}

:root[data-theme="light"] .manage-poll-card {
    background: #ffffff;
}

:root[data-theme="light"] .poll-card-preview {
    background: #ffffff;
}

:root[data-theme="light"] .access-message {
    background: #f8fafc;
}

:root[data-theme="light"] .danger-zone {
    background: rgba(220, 38, 38, 0.05);
}

:root[data-theme="light"] .danger-zone h3 {
    color: var(--error);
}

:root[data-theme="light"] .danger-zone p {
    color: var(--text-secondary);
}

:root[data-theme="light"] .vote-slider {
    background: #cbd5e1;
}

:root[data-theme="light"] .vote-slider::-webkit-slider-thumb {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

:root[data-theme="light"] .vote-slider::-moz-range-thumb {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}


/* ========================================
   Header
   ======================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    background: rgba(8, 8, 10, 0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    transition: background 0.4s ease;
}

:root[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    line-height: 1.4rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #e5a64e 0%, #d4944a 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--bg-deep);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.login-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.login-link:hover {
    color: var(--text-primary);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    line-height: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #e5a64e 0%, #d4944a 100%);
    color: var(--bg-deep);
    box-shadow: 0 0 24px var(--accent-gold-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f5c66e 0%, #e5b05a 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(245, 198, 110, 0.5), 0 10px 40px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: var(--bg-card-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-input);
    border-color: var(--border-accent);
}

.btn-ghost {
    background: transparent;
    color: var(--accent-gold);
    padding: 0.75rem 1.5rem;
    font-family: 'Outfit', sans-serif;
}

.btn-ghost:hover {
    background: rgba(229, 166, 78, 0.1);
}

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

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

.btn-sm {
    padding: 0.6rem 1.15rem;
    font-size: 0.95rem;
}

/* ========================================
   Main Content
   ======================================== */

main {
    position: relative;
    z-index: 1;
    padding-top: 95px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2.5rem, 8vw, 3.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.hero h1 span {
    color: var(--accent-gold);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    font-weight: 400;
    line-height: 1.65;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* ========================================
   Sections
   ======================================== */

.section-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.live-poll-section {
    padding: 1rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.polls-section {
    padding: 2rem 2rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.polls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ========================================
   Poll Card
   ======================================== */

.poll-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.poll-card-full {
    max-width: 900px;
    margin: 0 auto;
}

.poll-header {
    padding: 2rem 2.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.poll-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.poll-author {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.author-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
}

.author-avatar-gradient {
    background: linear-gradient(135deg, #f472b6 0%, #7c3aed 50%, #06b6d4 100%);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
}

.author-name {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3;
}

.author-name-sm {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.poll-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
}

.badge-time {
    background: var(--bg-input);
    color: var(--text-secondary);
}

.badge-public {
    background: var(--accent-subtle);
    color: var(--accent);
}

.badge-private {
    background: rgba(229, 166, 78, 0.15);
    color: var(--accent-gold);
}

.poll-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.poll-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.poll-actions {
    margin-top: 1.25rem;
}

.poll-body {
    padding: 2rem 2.5rem 2.25rem;
}

.poll-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

/* Poll Card Preview */
.poll-card-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.poll-card-preview:hover {
    border-color: var(--border-accent);
}

.poll-card-preview.poll-closed {
    opacity: 0.7;
}

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

.poll-card-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.poll-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.poll-card-title a:hover {
    color: var(--accent-gold);
}

.poll-card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.poll-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poll-card-votes {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========================================
   Search
   ======================================== */

.search-label {
    color: var(--accent-gold);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.search-container {
    position: relative;
    margin-bottom: 2rem;
    z-index: 60;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.35rem 1.25rem 3.5rem;
    background: var(--bg-input);
    border: 1px solid rgba(229, 166, 78, 0.25);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(229, 166, 78, 0.08);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(229, 166, 78, 0.15);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 40px rgba(229, 166, 78, 0.2), 0 0 0 3px var(--accent-gold-glow);
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--accent-gold);
    stroke: var(--accent-gold);
    fill: none;
    opacity: 0.7;
    pointer-events: none;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.search-results.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: var(--bg-input);
}

.search-result-poster {
    width: 45px;
    height: 68px;
    background: var(--bg-input);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.search-result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.search-result-year {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.search-result-vote {
    flex-shrink: 0;
}

.search-no-results,
.search-error {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* ========================================
   Leaders / Movie List
   ======================================== */

.leaders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.leaders-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.total-votes {
    font-size: 1rem;
    color: var(--text-secondary);
}

.total-votes strong {
    color: var(--accent-gold);
    font-weight: 600;
}

.movie-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.movie-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card-elevated);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.movie-item:hover {
    background: var(--bg-input);
}

.movie-rank {
    font-family: 'Sora', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.movie-item:nth-child(1) .movie-rank { color: #ffd700; }
.movie-item:nth-child(2) .movie-rank { color: #c0c0c0; }
.movie-item:nth-child(3) .movie-rank { color: #cd7f32; }

.movie-item-outside-top {
    opacity: 0.7;
    border-top: 1px dashed var(--border);
    margin-top: 0.5rem;
    padding-top: 1.4rem;
}

.movie-item-outside-top .movie-rank {
    font-size: 0.85rem;
    color: var(--text-muted);
    width: auto;
    min-width: 2.5rem;
}

.movie-poster {
    width: 50px;
    height: 75px;
    background: var(--bg-input);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
    overflow: hidden;
    border: 1px solid var(--border);
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.movie-title-text {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-year {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.movie-votes {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.vote-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

.vote-btn {
    padding: 0.6rem 1.15rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.vote-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-deep);
}

.vote-btn.voted {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}

.vote-btn.voted:hover {
    background: transparent;
    border-color: var(--error);
    color: var(--error);
}

.no-votes {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.vote-counter {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.vote-counter strong {
    color: var(--accent-gold);
}

/* ========================================
   Access Message
   ======================================== */

.access-message {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card-elevated);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.access-message p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.email-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.email-form .form-input {
    flex: 1;
}

.email-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   Share Section
   ======================================== */

.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.share-section span {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.share-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: inherit;
}

.share-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ========================================
   Create / Edit Form
   ======================================== */

.create-section {
    padding: 4rem 2rem;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    /* make bigger at top for scroll effect, make space for banner */
    padding-top: 8rem;
    margin-top: -4rem;
}

.create-section h1,
.create-section h2 {
    font-family: 'Sora', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.create-section > p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.create-form {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.6rem;
    font-size: 1.02rem;
}

.form-input {
    width: 100%;
    padding: 1.05rem 1.15rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group-inline {
    flex: 1;
}

.form-group-inline label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.datetime-inputs {
    display: flex;
    gap: 1rem;
}

/* Toggle Switch */
.toggle-group {
    margin-bottom: 1.75rem;
}

.toggle-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.75rem;
    font-size: 1.02rem;
}

.toggle-switch {
    display: inline-flex;
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 0.35rem;
    gap: 0.25rem;
    border: 1px solid var(--border);
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.toggle-option:hover {
    color: var(--text-secondary);
}

.toggle-option.active {
    background: var(--bg-card-elevated);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.toggle-option svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.toggle-option.active svg {
    opacity: 1;
    color: var(--accent);
}

.toggle-option input {
    display: none;
}

/* Advanced Settings */
.advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.advanced-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.advanced-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.advanced-toggle.open svg {
    transform: rotate(180deg);
}

.advanced-settings {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.advanced-settings.open {
    max-height: 2500px;
    opacity: 1;
}

.advanced-settings-inner {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    margin-top: 1.75rem;
    display: none;
}

.advanced-settings.open .advanced-settings-inner{
    display: block;
}

.settings-section {
    margin-bottom: 2.5rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

/* Genre Checkboxes */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
}

.genre-checkbox {
    position: relative;
}

.genre-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.genre-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.genre-checkbox label:hover {
    border-color: var(--accent);
}

.genre-checkbox input:checked + label {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
}

.genre-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.genre-checkbox input:checked + label .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.genre-checkbox .checkmark svg {
    width: 12px;
    height: 12px;
    color: var(--bg-deep);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s ease;
}

.genre-checkbox input:checked + label .checkmark svg {
    opacity: 1;
    transform: scale(1);
}

/* Year Range */
.year-range,
.season-range {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.year-input-group,
.season-input-group {
    flex: 1;
}

.year-input-group label,
.season-input-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.year-input,
.season-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.year-input:focus,
.season-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.year-range-separator {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

/* Verification Options */
.verification-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.verification-option {
    position: relative;
}

.verification-option input {
    position: absolute;
    opacity: 0;
}

.verification-option label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.verification-option label:hover {
    border-color: var(--accent);
}

.verification-option input:checked + label {
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.radio-circle {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.verification-option input:checked + label .radio-circle {
    border-color: var(--accent);
}

.radio-circle::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.15s ease;
}

.verification-option input:checked + label .radio-circle::after {
    opacity: 1;
    transform: scale(1);
}

.verification-content {
    flex: 1;
}

.verification-title {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.verification-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.verification-badge {
    padding: 0.25rem 0.6rem;
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.verification-badge.patreon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255,255,255,0.8);
}

/* Vote Limit */
.vote-limit-toggle {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.vote-limit-option {
    flex: 1;
    position: relative;
}

.vote-limit-option input {
    position: absolute;
    opacity: 0;
}

.vote-limit-option label {
    display: block;
    padding: 0.85rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-secondary);
}

.vote-limit-option label:hover {
    border-color: var(--accent);
}

.vote-limit-option input:checked + label {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
}

.slider-container {
    padding: 0.5rem 0;
    display: none;
}

.slider-container.visible {
    display: block;
}

.slider-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.slider-value span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.slider-value strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: 'Sora', sans-serif;
}

.vote-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-input);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.vote-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #e5a64e 0%, #d4944a 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 166, 78, 0.4);
}

.vote-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #e5a64e 0%, #d4944a 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Checkbox Options */
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-option .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
}

.checkbox-option .checkbox-label::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-option input:checked + .checkbox-label::before {
    background: var(--accent);
    border-color: var(--accent);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%231a1a2e' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 4.5l-7 7L3 8' stroke='%231a1a2e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.checkbox-option input:checked + .checkbox-label {
    color: var(--text-primary);
}

/* Tier Options */
.tier-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tier-option {
    position: relative;
}

.tier-option input {
    position: absolute;
    opacity: 0;
}

.tier-option label {
    display: block;
    padding: 0.75rem 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.tier-option label:hover {
    border-color: var(--accent);
}

.tier-option input:checked + label {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Tier Checkboxes */
.tier-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tier-checkbox {
    position: relative;
}

.tier-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tier-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tier-checkbox label:hover {
    border-color: var(--accent);
}

.tier-checkbox input:checked + label {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--text-primary);
}

.tier-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tier-checkbox input:checked + label .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.tier-checkbox .checkmark svg {
    width: 12px;
    height: 12px;
    color: var(--bg-deep);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s ease;
}

.tier-checkbox input:checked + label .checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.tier-price {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Patreon Connect Prompt */
.patreon-connect-prompt {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.patreon-connect-prompt p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.patreon-connect-prompt .btn {
    margin: 0.25rem;
}

.patreon-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 2rem;
}

.form-features {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.feature-tag svg {
    width: 17px;
    height: 17px;
    color: var(--success);
}

/* ========================================
   Manage Page
   ======================================== */

.manage-section {
    padding: 3rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.manage-section h1 {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

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

.manage-poll-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    gap: 1.5rem;
}

.manage-poll-card.poll-closed {
    opacity: 0.7;
}

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

.manage-poll-info h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.manage-poll-info h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.manage-poll-info h3 a:hover {
    color: var(--accent-gold);
}

.manage-poll-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.manage-poll-meta span {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.poll-type {
    text-transform: capitalize;
}

.poll-status {
    font-weight: 500;
}

.status-open {
    color: var(--success);
}

.status-closed {
    color: var(--text-muted);
}

.manage-poll-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.manage-poll-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Poll Created Banner */
.poll-created-banner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.poll-created-banner .banner-icon {
    width: 48px;
    height: 48px;
    background: #61e661;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--bg-deep);
}

.poll-created-banner h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.poll-created-banner .banner-content > p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.link-copy-box {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.link-copy-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    box-shadow: 0 0 20px rgba(229, 166, 78, 0.15);
}

.link-copy-box input:focus {
    outline: none;
    box-shadow: 0 0 24px rgba(229, 166, 78, 0.25);
}

.link-copy-box .btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.link-copy-box .btn.copied {
    background: var(--success);
}

.save-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.save-divider::before,
.save-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.save-poll-option {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.save-poll-option > p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.save-poll-option .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Optional Badge in Form */
.optional-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    background: var(--bg-input);
    border-radius: 4px;
    color: var(--text-muted);
    margin-left: auto;
}

.settings-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.save-account-section {
    border-top: 1px dashed var(--border);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

/* Button with icon alignment */
.btn svg {
    flex-shrink: 0;
}

.header-actions .btn svg {
    margin-right: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.login-prompt p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

/* Danger Zone */
.danger-zone {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius);
}

.danger-zone h3 {
    color: var(--error);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.danger-zone p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* ========================================
   Poll Page
   ======================================== */

.poll-page {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--error);
}

.alert ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* ========================================
   Toast Notifications
   ======================================== */

.toast,
.form-error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 1rem 1.5rem;
    background: var(--bg-card-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.visible,
.form-error-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    border-color: var(--success);
    color: var(--success);
}

.toast-error,
.form-error-toast {
    border-color: var(--error);
    color: var(--error);
}

/* ========================================
   Features Grid
   ======================================== */

.features-section {
    padding: 3rem 2rem 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */

footer {
    position: relative;
    z-index: 10;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    background: rgba(8, 8, 10, 0.6);
    transition: background 0.4s ease;
}

:root[data-theme="light"] footer {
    background: rgba(255, 255, 255, 0.95);
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    header {
        padding: 1rem 1.25rem;
    }

    .header-actions {
        gap: 1rem;
    }

    .btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .live-poll-section,
    .create-section,
    .features-section,
    .manage-section,
    .poll-page {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .poll-header {
        padding: 1.5rem 1.5rem 1.25rem;
    }

    .poll-body {
        padding: 1.5rem;
    }

    .poll-footer {
        padding: 1rem 1.5rem;
    }

    .movie-item {
        padding: 0.75rem;
    }

    .movie-poster {
        width: 42px;
        height: 63px;
    }

    .movie-title-text {
        font-size: 0.95rem;
    }

    .vote-count {
        display: none;
    }

    .create-form {
        padding: 1.75rem;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-features {
        justify-content: center;
    }

    .toggle-switch {
        width: 100%;
    }

    .toggle-option {
        flex: 1;
        justify-content: center;
    }

    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .year-range,
    .season-range,
    .datetime-inputs {
        flex-direction: column;
    }

    .year-range-separator {
        display: none;
    }

    .verification-option label {
        flex-wrap: wrap;
    }

    .verification-badge {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .vote-limit-toggle {
        flex-direction: column;
    }

    .manage-poll-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .manage-poll-actions {
        width: 100%;
    }

    .manage-poll-actions .btn {
        flex: 1;
    }

    .email-form {
        flex-direction: column;
    }

    .share-section {
        flex-direction: column;
        align-items: stretch;
    }

    .share-section span {
        text-align: center;
    }

    .wide-only{
        display: none;
    }
}

@media (max-width: 480px) {
    .polls-grid {
        grid-template-columns: 1fr;
    }

    .poll-meta {
        flex-direction: column;
    }

    .poll-badges {
        order: -1;
    }

    .search-result-item {
        flex-wrap: wrap;
    }

    .search-result-vote {
        width: 100%;
        margin-top: 0.5rem;
    }
}

.account-form-inline {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.account-form-inline .form-input {
    flex: 1;
    min-width: 150px;
}

.account-created-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    color: #22c55e;
}

.account-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.account-fields .form-group {
    margin-bottom: 0.75rem;
}

.account-fields .form-group:last-child {
    margin-bottom: 0;
}

.optional-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    background: var(--bg-input);
    border-radius: 4px;
    color: var(--text-muted);
    margin-left: auto;
}

.settings-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.save-account-section {
    border-top: 1px dashed var(--border);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.btn svg {
    flex-shrink: 0;
}

/* Poll Close Toggle */
.close-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.close-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.close-type-option input {
    display: none;
}

.close-type-option .radio-fill {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    background: transparent;
    transition: all 0.2s;
}

.close-type-option input:checked + .radio-fill {
    border-color: var(--accent);
    background: var(--accent);
}

.close-type-label {
    color: var(--text-secondary);
}

.close-type-option input:checked ~ .close-type-label {
    color: var(--text-primary);
}

.close-type-options .datetime-inputs {
    display: flex;
    gap: 0.5rem;
    margin-left: 26px;
    transition: opacity 0.2s;
}

.close-type-options .datetime-inputs .form-input {
    flex: 1;
}

/* Genre Mismatch Modal */
.genre-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 1rem;
}

.genre-modal-overlay.visible {
    opacity: 1;
}

.genre-modal {
    background: var(--bg-card, #111114);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg, 24px);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.genre-modal-overlay.visible .genre-modal {
    transform: scale(1);
}

.genre-modal-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--accent-gold, #e5a64e);
}

.genre-modal-icon svg {
    width: 100%;
    height: 100%;
}

.genre-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-primary, #fff);
}

.genre-modal-text {
    color: var(--text-secondary, #c2c2ca);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.genre-modal-details {
    color: var(--text-secondary, #c2c2ca);
    margin: 0 0 1.5rem;
    line-height: 1.6;
    font-size: 0.925rem;
}

.genre-modal-details strong {
    color: var(--text-primary, #fff);
}

.genre-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.genre-modal-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Poll genres display */
.poll-genres {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.poll-genres-label {
    color: var(--text-secondary);
    opacity: 0.7;
}

.poll-genres-list {
    color: var(--accent);
}

/* Email Capture Modal */
.email-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
}

.email-modal-overlay.visible {
    opacity: 1;
}

.email-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.email-modal-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.email-modal-icon svg {
    width: 30px;
    height: 30px;
    color: var(--accent);
}

.email-modal h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.email-modal > p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.email-modal form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.email-modal .email-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* ========================================
   Theme Toggle
   ======================================== */

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.theme-toggle-track {
    position: relative;
    width: 64px;
    height: 32px;
    background: #1a1a2e;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.4s ease, border-color 0.4s ease;
}

.theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.4s ease;
}

.theme-toggle-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.theme-toggle-sun {
    color: #fbbf24;
}

.theme-toggle-moon {
    color: #fff;
}

.theme-toggle-thumb {
    position: absolute;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #a78bfa;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.15, 0.32, 1.15);
    z-index: 1;
}

/* Light mode state */
.theme-toggle.light .theme-toggle-track {
    background: #e0f2fe;
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-toggle.light .theme-toggle-thumb {
    right: calc(100% - 28px);
    background: #fbbf24;
}

.theme-toggle.light .theme-toggle-sun {
    color: #92400e;
}

.theme-toggle.light .theme-toggle-moon {
    color: #64748b;
}

/* Hover effects */
.theme-toggle:hover .theme-toggle-thumb {
    transform: scale(1.1);
}

.theme-toggle:active .theme-toggle-thumb {
    transform: scale(0.95);
}

/* Focus state for accessibility */
.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 16px;
}