/* =============================================================================
   RUBI.Referendum App Styles
   Load Order: rubi-shared.css -> referendum-theme.css -> tailwind.css -> app.css
   ============================================================================= */

/* App-specific overrides go here */

/* Ensure body uses slate-900 background */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #0f172a;
}

#app {
    min-height: 100vh;
}

/* Navigation loading bar - shows during page transitions */
.nav-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-500, #6366f1), var(--theme-400, #818cf8), var(--theme-500, #6366f1));
    background-size: 200% 100%;
    animation: nav-loading-slide 1s ease-in-out infinite;
    z-index: 9999;
    box-shadow: 0 0 10px var(--theme-500, #6366f1);
}

@keyframes nav-loading-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Blazor loading indicator */
#blazor-error-ui {
    background: #1e293b;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #fca5a5;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: #94a3b8;
}

.blazor-error-boundary {
    background: #7f1d1d;
    color: #fecaca;
    padding: 1rem;
    border-radius: 0.5rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Validation styles */
.validation-message {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: #22c55e;
}

.invalid {
    outline: none;
    border-color: #ef4444;
}

/* Form inputs */
input, select, textarea {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

input::placeholder, textarea::placeholder {
    color: #64748b;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: auto;
    accent-color: #6366f1;
}

/* PWA safe area support - .safe-area-bottom is in shared rubi-app.css */


/* =============================================================================
   Town Square Component Styles
   ============================================================================= */

.town-square {
    background: linear-gradient(to br, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 1.5rem;
}

.town-square-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
}

.btn-submit-argument {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit-argument:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Prominent Add Argument CTA */
.add-argument-cta {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.add-argument-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    border: 2px dashed rgba(99, 102, 241, 0.5);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-argument-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
    border-color: rgba(99, 102, 241, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.add-argument-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 0.75rem;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.add-argument-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.add-argument-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.add-argument-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.add-argument-arrow {
    color: #6366f1;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.add-argument-btn:hover .add-argument-arrow {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .add-argument-btn {
        padding: 0.875rem 1rem;
    }
    .add-argument-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    .add-argument-title {
        font-size: 1rem;
    }
    .add-argument-subtitle {
        font-size: 0.75rem;
    }
}

/* Stats Bar */
.town-square-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-item.for { color: #4ade80; }
.stat-item.against { color: #f87171; }
.stat-item.neutral { color: #94a3b8; }

.stat-divider {
    width: 1px;
    height: 1rem;
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Tabs */
.mobile-tabs {
    display: none;
    padding: 0.75rem;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.3);
}

@media (max-width: 768px) {
    .mobile-tabs {
        display: flex;
    }
}

.mobile-tab {
    flex: 1;
    padding: 0.75rem;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #94a3b8;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-tab.active.for {
    background: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
    color: #4ade80;
}

.mobile-tab.active.against {
    background: rgba(248, 113, 113, 0.1);
    border-color: #f87171;
    color: #f87171;
}

/* Sort Options */
.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sort-buttons {
    display: flex;
    gap: 0.25rem;
}

.sort-btn {
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #64748b;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

.sort-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Unified Filter Bar (Simplified UI - replaces stats, tabs, sort options)
   ───────────────────────────────────────────────────────────────────────────── */
.town-square-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
}

.filter-tab.active.for {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.5);
    color: #4ade80;
}

.filter-tab.active.against {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-tab.active.for .filter-count {
    background: rgba(74, 222, 128, 0.3);
}

.filter-tab.active.against .filter-count {
    background: rgba(248, 113, 113, 0.3);
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.sort-select {
    appearance: none;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-select:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.sort-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.sort-icon {
    position: absolute;
    right: 0.5rem;
    pointer-events: none;
    color: #94a3b8;
    font-size: 0.75rem;
}

@media (max-width: 480px) {
    .filter-tab span:not(.filter-count) {
        display: none;
    }
    .filter-tab {
        padding: 0.5rem 0.625rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Floating Action Button (FAB) for Add Argument
   ───────────────────────────────────────────────────────────────────────────── */
.town-square-fab {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    transition: all 0.3s ease;
    z-index: 40;
}

.town-square-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.6);
}

.town-square-fab:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    .town-square-fab {
        bottom: 2rem;
        right: 2rem;
    }
}

/* Loading State */
.town-square-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

/* Arguments Columns */
.arguments-columns {
    display: flex;
    min-height: 400px;
}

@media (max-width: 768px) {
    .arguments-columns {
        flex-direction: column;
    }
    .mobile-hidden {
        display: none !important;
    }
}

.argument-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.column-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

@media (max-width: 768px) {
    .column-divider {
        display: none;
    }
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.column-header.for {
    background: linear-gradient(to right, rgba(74, 222, 128, 0.1), transparent);
    color: #4ade80;
    border-bottom: 2px solid #4ade80;
}

.column-header.against {
    background: linear-gradient(to right, rgba(248, 113, 113, 0.1), transparent);
    color: #f87171;
    border-bottom: 2px solid #f87171;
}

.arguments-list {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    max-height: 600px;
}

.empty-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

/* =============================================================================
   Argument Card Styles
   ============================================================================= */

.argument-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.argument-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.argument-card.position-for {
    border-left: 3px solid #4ade80;
}

.argument-card.position-against {
    border-left: 3px solid #f87171;
}

.argument-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.3);
}

.position-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.position-badge.badge-for {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.position-badge.badge-against {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.quality-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    font-size: 0.625rem;
}

.quality-badge.high {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e293b;
}

.argument-score {
    font-weight: 700;
    font-size: 1rem;
}

.argument-summary {
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.argument-body {
    padding: 0 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.evidence-links {
    background: rgba(15, 23, 42, 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.argument-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stake-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.argument-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vote-buttons {
    display: flex;
    gap: 0.5rem;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

/* Upvote button - green tint */
.vote-btn.upvote {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #86efac;
}

.vote-btn.upvote:hover:not(:disabled) {
    background: rgba(74, 222, 128, 0.2);
    border-color: rgba(74, 222, 128, 0.5);
    color: #4ade80;
}

.vote-btn.upvote.active {
    background: rgba(74, 222, 128, 0.25);
    border-color: #4ade80;
    color: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

/* Downvote button - red tint */
.vote-btn.downvote {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
}

.vote-btn.downvote:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.5);
    color: #f87171;
}

.vote-btn.downvote.active {
    background: rgba(248, 113, 113, 0.25);
    border-color: #f87171;
    color: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

.vote-btn i {
    font-size: 1.125rem;
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.action-btn {
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

.action-btn.flag:hover {
    color: #fbbf24;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Compact Argument Card (Simplified UI)
   ───────────────────────────────────────────────────────────────────────────── */
.argument-card-compact {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
}

.argument-card-compact:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.argument-card-compact.position-for {
    border-left: 3px solid #4ade80;
}

.argument-card-compact.position-against {
    border-left: 3px solid #f87171;
}

/* Summary row with inline score */
.argument-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
}

.argument-summary-text {
    flex: 1;
    color: white;
    font-weight: 500;
    line-height: 1.5;
}

.argument-score-inline {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.argument-score-inline.positive {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.argument-score-inline.negative {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

/* Body */
.argument-body-compact {
    padding: 0 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.evidence-links-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.evidence-link {
    font-size: 0.75rem;
    color: #818cf8;
    background: rgba(129, 140, 248, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s;
}

.evidence-link:hover {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

/* Unified footer: votes + author + actions in one row */
.argument-footer-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.3);
}

/* Compact vote buttons */
.vote-buttons-compact {
    display: flex;
    gap: 0.25rem;
}

.vote-btn-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: transparent;
}

.vote-btn-compact.upvote {
    color: #86efac;
}

.vote-btn-compact.upvote:hover:not(:disabled) {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.vote-btn-compact.upvote.active {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.vote-btn-compact.downvote {
    color: #fca5a5;
}

.vote-btn-compact.downvote:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.vote-btn-compact.downvote.active {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.vote-btn-compact:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Author info - compact */
.author-compact {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    font-size: 0.8125rem;
}

.author-name {
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-time {
    color: #64748b;
    white-space: nowrap;
}

.author-time::before {
    content: "•";
    margin-right: 0.5rem;
}

/* Actions compact */
.actions-compact {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.action-btn-compact {
    padding: 0.375rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-compact:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

/* Overflow menu */
.overflow-menu-wrapper {
    position: relative;
}

.overflow-menu {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 0.25rem;
    min-width: 10rem;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 50;
    overflow: hidden;
}

.overflow-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.overflow-item:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

.overflow-item.info {
    cursor: default;
    color: #fbbf24;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.overflow-item.info:hover {
    background: transparent;
}

@media (max-width: 480px) {
    .argument-footer-compact {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .author-compact {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
    }

    .vote-buttons-compact {
        order: 1;
    }

    .actions-compact {
        order: 2;
        margin-left: auto;
    }
}

/* =============================================================================
   Modal Styles
   ============================================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
}

/* Position Selector */
.position-selector {
    margin-bottom: 1.25rem;
}

.position-buttons {
    display: flex;
    gap: 0.75rem;
}

.position-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: rgba(51, 65, 85, 0.5);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.position-btn.for:hover,
.position-btn.for.active {
    background: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
    color: #4ade80;
}

.position-btn.against:hover,
.position-btn.against.active {
    background: rgba(248, 113, 113, 0.1);
    border-color: #f87171;
    color: #f87171;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Evidence Link Inputs - Expandable */
.btn-add-evidence {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: 0.5rem;
    color: #818cf8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-evidence:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.6);
    color: #a5b4fc;
}

.evidence-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.evidence-input-row .form-input {
    flex: 1;
}

.btn-add-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 0.5rem;
    color: #818cf8;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-add-link:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* Stake Slider */
.stake-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stake-slider {
    flex: 1;
    height: 0.5rem;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 9999px;
    -webkit-appearance: none;
    appearance: none;
}

.stake-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 9999px;
    cursor: pointer;
}

.stake-amount {
    min-width: 4rem;
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    color: #a5b4fc;
    font-weight: 600;
    text-align: center;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    color: #fca5a5;
    font-size: 0.875rem;
}

/* Modal Buttons */
.btn-cancel {
    padding: 0.625rem 1.25rem;
    background: rgba(51, 65, 85, 0.5);
    border: none;
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: rgba(71, 85, 105, 0.5);
}

.btn-submit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit.for {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-submit.against {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Flag Modal */
.flag-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.flag-reason {
    padding: 0.5rem 1rem;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid transparent;
    border-radius: 9999px;
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.flag-reason:hover {
    background: rgba(71, 85, 105, 0.5);
}

.flag-reason.active {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}

.btn-flag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-flag:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-flag:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =============================================================================
   Voting Type Selector Styles
   ============================================================================= */

.voting-type-card {
    padding: 1rem;
    border: 2px solid;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voting-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.voting-type-selected {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.voting-type-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Voting Options Input Section */
.voting-options-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(14, 165, 233, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   AI Assistant - Mobile-First Bottom Sheet
   with Snap-to-Corner Draggable FAB
   ============================================ */

/* Floating Action Button (FAB) - Draggable, snaps to corners */
.ai-fab {
    position: fixed;
    right: 1rem;
    bottom: 6rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5), 0 0 0 0 rgba(139, 92, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aiFabPulse 2s ease-in-out infinite;
}

/* Snap-to-corner positions */
.ai-fab.snap-bottom-right {
    right: 1rem;
    bottom: 6rem;
    left: auto;
    top: auto;
}

.ai-fab.snap-bottom-left {
    left: 1rem;
    bottom: 6rem;
    right: auto;
    top: auto;
}

.ai-fab.snap-top-right {
    right: 1rem;
    top: 6rem;
    left: auto;
    bottom: auto;
}

.ai-fab.snap-top-left {
    left: 1rem;
    top: 6rem;
    right: auto;
    bottom: auto;
}

/* Dragging state */
.ai-fab.dragging {
    cursor: grabbing;
    transform: scale(1.15);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.7);
    animation: none;
}

/* Edge-peek minimized state */
.ai-fab.minimized {
    width: 48px;
    height: 48px;
    border-radius: 24px 0 0 24px;
    opacity: 0.7;
}

.ai-fab.minimized.snap-bottom-right,
.ai-fab.minimized.snap-top-right {
    right: -24px;
    border-radius: 24px 0 0 24px;
}

.ai-fab.minimized.snap-bottom-left,
.ai-fab.minimized.snap-top-left {
    left: -24px;
    border-radius: 0 24px 24px 0;
}

.ai-fab.minimized:hover {
    opacity: 1;
}

.ai-fab.minimized.snap-bottom-right:hover,
.ai-fab.minimized.snap-top-right:hover {
    right: 0;
}

.ai-fab.minimized.snap-bottom-left:hover,
.ai-fab.minimized.snap-top-left:hover {
    left: 0;
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .ai-fab.snap-bottom-right { right: 1.5rem; bottom: 2rem; }
    .ai-fab.snap-bottom-left { left: 1.5rem; bottom: 2rem; }
    .ai-fab.snap-top-right { right: 1.5rem; top: 5rem; }
    .ai-fab.snap-top-left { left: 1.5rem; top: 5rem; }
}

@keyframes aiFabPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5), 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(99, 102, 241, 0.6), 0 0 0 8px rgba(139, 92, 246, 0); }
}

.ai-fab:hover, .ai-fab:active {
    transform: scale(1.1);
    animation: none;
}

.ai-fab-icon {
    width: 26px;
    height: 26px;
}

.ai-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badgeBounce 0.5s ease;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.ai-fab.ai-fab-has-suggestions {
    animation: aiFabAttention 1.5s ease-in-out infinite;
}

@keyframes aiFabAttention {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

.ai-fab.ai-fab-open {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    animation: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* AI Panel - Bottom sheet on mobile, sidebar on desktop */
.ai-panel {
    position: fixed;
    inset: 0;
    z-index: 99;
    pointer-events: none;
    visibility: hidden;
}

.ai-panel-visible {
    visibility: visible;
    pointer-events: auto;
}

.ai-panel-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.ai-panel-visible .ai-panel-backdrop {
    opacity: 1;
}

.ai-panel-content {
    position: absolute;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Mobile: Bottom sheet */
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    max-height: 85vh;
    border-radius: 1.5rem 1.5rem 0 0;
    transform: translateY(100%);
}

.ai-panel-visible .ai-panel-content {
    transform: translateY(0);
}

/* Desktop: Side panel */
@media (min-width: 768px) {
    .ai-panel-content {
        top: 0;
        bottom: 0;
        left: auto;
        right: 0;
        width: 360px;
        max-height: none;
        border-radius: 0;
        border-left: 1px solid rgba(99, 102, 241, 0.3);
        transform: translateX(100%);
    }

    .ai-panel-visible .ai-panel-content {
        transform: translateX(0);
    }
}

/* Drag handle for mobile */
.ai-panel-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0.75rem auto;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ai-panel-handle {
        display: none;
    }
}

.ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(99, 102, 241, 0.1);
    flex-shrink: 0;
}

.ai-panel-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-panel-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.ai-panel-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Inline AI Hint - next to input labels */
.ai-inline-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 9999px;
    color: #a5b4fc;
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: hintGlow 2s ease-in-out infinite;
}

@keyframes hintGlow {
    0%, 100% { border-color: rgba(99, 102, 241, 0.3); }
    50% { border-color: rgba(99, 102, 241, 0.6); }
}

.ai-inline-hint:hover, .ai-inline-hint:active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
    border-color: rgba(99, 102, 241, 0.5);
    color: #c7d2fe;
    animation: none;
}

.ai-inline-hint svg {
    flex-shrink: 0;
}

.ai-icon-pulse {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

.ai-section {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-section-warning {
    background: rgba(234, 179, 8, 0.05);
}

.ai-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.ai-section-header i {
    color: #818cf8;
}

/* Quality Score Ring */
.quality-score-ring {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.quality-ring-svg {
    width: 100%;
    height: 100%;
}

.quality-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* Quality Factors */
.quality-factors {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quality-factor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.03);
}

.quality-factor.factor-good { color: #86efac; }
.quality-factor.factor-warning { color: #fde047; }
.quality-factor.factor-bad { color: #fca5a5; }

/* Similar Topics */
.similar-topics-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.similar-topic-item {
    display: block;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.2);
    text-decoration: none;
    transition: all 0.15s ease;
}

.similar-topic-item:hover {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.3);
}

.similar-topic-title {
    display: block;
    color: #fde047;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
}

.similar-topic-meta {
    display: block;
    color: #94a3b8;
    font-size: 0.6875rem;
    margin-top: 0.25rem;
}

/* Suggestions */
.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-card {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.suggestion-highlighted {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.1);
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 0.375rem;
}

.suggestion-content {
    font-size: 0.8125rem;
    color: #e2e8f0;
    line-height: 1.4;
    margin: 0;
}

.suggestion-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.suggestion-apply-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

.suggestion-applied-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 0.25rem;
    animation: applied-pulse 0.3s ease-out;
}

@keyframes applied-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Voting Recommendation */
.voting-recommendation {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: rgba(99, 102, 241, 0.05);
}

.voting-rec-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #818cf8;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 0.25rem;
}

.voting-rec-reason {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0.5rem 0 0;
    line-height: 1.4;
}

/* AI Loading Spinner */
.ai-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Help zone styling now in shared rubi-app.css - uses theme variables */

/* =============================================================================
   Voting Strategy Radio Cards
   ============================================================================= */

.voting-strategy-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #475569;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(30, 41, 59, 0.5);
}

.voting-strategy-card:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.voting-strategy-card.strategy-selected {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.voting-strategy-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

.voting-strategy-card.strategy-selected .voting-strategy-icon {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.voting-strategy-icon svg {
    width: 24px;
    height: 24px;
}

.voting-strategy-content {
    flex: 1;
    text-align: left;
}

.voting-strategy-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #e2e8f0;
}

.voting-strategy-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.voting-strategy-desc {
    font-size: 0.8125rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.voting-strategy-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.voting-strategy-card.strategy-selected .voting-strategy-check {
    border-color: #6366f1;
    background: #6366f1;
    color: white;
}

/* =============================================================================
   Ballot Box Vote Animation
   A subtle but satisfying animation when casting a vote
   ============================================================================= */

.ballot-animation-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ballot-box-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* The ballot box */
.ballot-box {
    width: 120px;
    height: 100px;
    background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
    border-radius: 8px;
    position: relative;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid #475569;
}

/* Ballot slot on top */
.ballot-box::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #0f172a;
    border-radius: 3px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Decorative emblem on box */
.ballot-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    opacity: 0.3;
}

/* The ballot paper */
.ballot-paper {
    position: absolute;
    width: 50px;
    height: 70px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: ballotDrop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ballot-paper.ballot-yes {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.ballot-paper.ballot-no {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Ballot drop animation */
@keyframes ballotDrop {
    0% {
        top: -100px;
        opacity: 0;
        transform: rotate(-15deg) scale(1.2);
    }
    20% {
        opacity: 1;
        transform: rotate(5deg) scale(1);
    }
    40% {
        top: -20px;
        transform: rotate(-3deg);
    }
    60% {
        top: 10px;
        transform: rotate(2deg) scaleY(0.95);
    }
    75% {
        top: 5px;
        transform: rotate(0deg) scaleY(0.9);
        opacity: 1;
    }
    85% {
        top: 8px;
        transform: scaleY(0.4);
        opacity: 0.8;
    }
    100% {
        top: 12px;
        transform: scaleY(0);
        opacity: 0;
    }
}

/* Box shake when ballot enters */
.ballot-box.shake {
    animation: boxShake 0.4s ease-out 0.8s;
}

@keyframes boxShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px) rotate(-1deg); }
    40% { transform: translateX(3px) rotate(1deg); }
    60% { transform: translateX(-2px) rotate(-0.5deg); }
    80% { transform: translateX(2px) rotate(0.5deg); }
}

/* Success checkmark that appears after */
.ballot-success-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0;
    animation: checkPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
}

@keyframes checkPopIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Text message below */
.ballot-message {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    animation: messageFadeIn 0.4s ease-out 1.3s forwards;
}

@keyframes messageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Subtle particle effects */
.ballot-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ballot-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
}

.ballot-particle:nth-child(1) { animation: particleBurst 0.6s ease-out 1.1s forwards; --angle: 0deg; --distance: 60px; background: #22c55e; }
.ballot-particle:nth-child(2) { animation: particleBurst 0.6s ease-out 1.15s forwards; --angle: 45deg; --distance: 70px; background: #6366f1; }
.ballot-particle:nth-child(3) { animation: particleBurst 0.6s ease-out 1.1s forwards; --angle: 90deg; --distance: 55px; background: #8b5cf6; }
.ballot-particle:nth-child(4) { animation: particleBurst 0.6s ease-out 1.2s forwards; --angle: 135deg; --distance: 65px; background: #22c55e; }
.ballot-particle:nth-child(5) { animation: particleBurst 0.6s ease-out 1.15s forwards; --angle: 180deg; --distance: 60px; background: #6366f1; }
.ballot-particle:nth-child(6) { animation: particleBurst 0.6s ease-out 1.1s forwards; --angle: 225deg; --distance: 70px; background: #8b5cf6; }
.ballot-particle:nth-child(7) { animation: particleBurst 0.6s ease-out 1.2s forwards; --angle: 270deg; --distance: 55px; background: #22c55e; }
.ballot-particle:nth-child(8) { animation: particleBurst 0.6s ease-out 1.15s forwards; --angle: 315deg; --distance: 65px; background: #6366f1; }

@keyframes particleBurst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1)) scale(0);
    }
}

/* =============================================================================
   Inline Ballot Animation (integrated with Recording Your Vote screen)
   ============================================================================= */

.ballot-inline-container {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

/* Inline ballot box */
.ballot-box-inline {
    width: 100px;
    height: 80px;
    background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
    border-radius: 8px;
    position: relative;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid #475569;
}

.ballot-box-inline::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: #0f172a;
    border-radius: 3px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ballot-box-inline::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 50%;
    opacity: 0.3;
}

.ballot-box-inline.shake {
    animation: boxShakeInline 0.4s ease-out 0.7s;
}

@keyframes boxShakeInline {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px) rotate(-1deg); }
    40% { transform: translateX(2px) rotate(1deg); }
    60% { transform: translateX(-1px) rotate(-0.5deg); }
    80% { transform: translateX(1px) rotate(0.5deg); }
}

/* Inline ballot paper */
.ballot-paper-inline {
    position: absolute;
    width: 40px;
    height: 55px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: ballotDropInline 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    z-index: 10;
}

.ballot-paper-inline.ballot-yes {
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.ballot-paper-inline.ballot-no {
    background: linear-gradient(145deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

@keyframes ballotDropInline {
    0% {
        top: -60px;
        opacity: 0;
        transform: rotate(-12deg) scale(1.1);
    }
    15% {
        opacity: 1;
        transform: rotate(5deg) scale(1);
    }
    35% {
        top: -15px;
        transform: rotate(-3deg);
    }
    55% {
        top: 8px;
        transform: rotate(2deg) scaleY(0.95);
    }
    70% {
        top: 4px;
        transform: rotate(0deg) scaleY(0.85);
        opacity: 1;
    }
    85% {
        top: 6px;
        transform: scaleY(0.3);
        opacity: 0.7;
    }
    100% {
        top: 8px;
        transform: scaleY(0);
        opacity: 0;
    }
}

/* Inline success check */
.ballot-check-inline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    animation: checkPopInline 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s forwards;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
    z-index: 20;
}

@keyframes checkPopInline {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Inline particles */
.ballot-particles-inline {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ballot-particle-inline {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0;
}

.ballot-particle-inline:nth-child(1) { animation: particleBurstInline 0.5s ease-out 0.95s forwards; --angle: 0deg; --distance: 45px; background: #22c55e; }
.ballot-particle-inline:nth-child(2) { animation: particleBurstInline 0.5s ease-out 1s forwards; --angle: 60deg; --distance: 50px; background: #6366f1; }
.ballot-particle-inline:nth-child(3) { animation: particleBurstInline 0.5s ease-out 0.95s forwards; --angle: 120deg; --distance: 40px; background: #8b5cf6; }
.ballot-particle-inline:nth-child(4) { animation: particleBurstInline 0.5s ease-out 1.05s forwards; --angle: 180deg; --distance: 48px; background: #22c55e; }
.ballot-particle-inline:nth-child(5) { animation: particleBurstInline 0.5s ease-out 1s forwards; --angle: 240deg; --distance: 45px; background: #6366f1; }
.ballot-particle-inline:nth-child(6) { animation: particleBurstInline 0.5s ease-out 0.95s forwards; --angle: 300deg; --distance: 52px; background: #8b5cf6; }

@keyframes particleBurstInline {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--distance) * -1)) scale(0);
    }
}

/* Inline message animation */
.ballot-message-inline {
    opacity: 0;
    animation: messageSlideInline 0.4s ease-out 1.1s forwards;
}

.ballot-submessage-inline {
    opacity: 0;
    animation: messageSlideInline 0.4s ease-out 1.25s forwards;
}

@keyframes messageSlideInline {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   Immersive Login Animation
   ============================================================================= */

.login-immersive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 300px;
}

/* Central orb container */
.login-orb-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 2rem;
}

/* Main glowing orb */
.login-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    box-shadow:
        0 0 30px rgba(99, 102, 241, 0.5),
        0 0 60px rgba(168, 85, 247, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: orbPulse 2s ease-in-out infinite;
}

.login-orb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    border-radius: 50%;
}

@keyframes orbPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 30px rgba(99, 102, 241, 0.5), 0 0 60px rgba(168, 85, 247, 0.3); }
    50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 40px rgba(99, 102, 241, 0.7), 0 0 80px rgba(168, 85, 247, 0.5); }
}

/* Orbiting rings */
.login-orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.login-orbit-ring:nth-child(1) {
    width: 90px;
    height: 90px;
    animation: ringPulse 3s ease-in-out infinite;
}

.login-orbit-ring:nth-child(2) {
    width: 120px;
    height: 120px;
    animation: ringPulse 3s ease-in-out infinite 0.5s;
}

.login-orbit-ring:nth-child(3) {
    width: 140px;
    height: 140px;
    animation: ringPulse 3s ease-in-out infinite 1s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.02); }
}

/* Orbiting particles (network nodes) */
.login-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
}

.login-particle:nth-child(4) {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    animation: orbitParticle1 3s linear infinite;
}

.login-particle:nth-child(5) {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
    animation: orbitParticle2 4s linear infinite;
}

.login-particle:nth-child(6) {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
    animation: orbitParticle3 3.5s linear infinite;
}

.login-particle:nth-child(7) {
    background: linear-gradient(135deg, #ec4899, #db2777);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
    animation: orbitParticle4 4.5s linear infinite;
}

@keyframes orbitParticle1 {
    from { transform: translate(-50%, -50%) rotate(0deg) translateX(45px) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg) translateX(45px) rotate(-360deg); }
}

@keyframes orbitParticle2 {
    from { transform: translate(-50%, -50%) rotate(90deg) translateX(60px) rotate(-90deg); }
    to { transform: translate(-50%, -50%) rotate(450deg) translateX(60px) rotate(-450deg); }
}

@keyframes orbitParticle3 {
    from { transform: translate(-50%, -50%) rotate(180deg) translateX(55px) rotate(-180deg); }
    to { transform: translate(-50%, -50%) rotate(540deg) translateX(55px) rotate(-540deg); }
}

@keyframes orbitParticle4 {
    from { transform: translate(-50%, -50%) rotate(270deg) translateX(70px) rotate(-270deg); }
    to { transform: translate(-50%, -50%) rotate(630deg) translateX(70px) rotate(-630deg); }
}

/* Connection lines (animated) */
.login-connection-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    transform: translate(-50%, -50%);
    animation: connectionSpin 8s linear infinite;
}

.login-connection-lines::before,
.login-connection-lines::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
    transform-origin: center;
}

.login-connection-lines::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.login-connection-lines::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes connectionSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Progress stages */
.login-stages {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.login-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.3;
    transition: all 0.5s ease;
}

.login-stage.active {
    opacity: 1;
}

.login-stage.completed {
    opacity: 0.7;
}

.login-stage-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(51, 65, 85, 0.5);
    border: 2px solid rgba(100, 116, 139, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    transition: all 0.5s ease;
}

.login-stage.active .login-stage-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.3));
    border-color: #6366f1;
    color: #a5b4fc;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: stageIconPulse 1s ease-in-out infinite;
}

.login-stage.completed .login-stage-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    border-color: #22c55e;
    color: #4ade80;
}

@keyframes stageIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-stage-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
    text-align: center;
}

.login-stage.active .login-stage-label {
    color: #a5b4fc;
}

.login-stage.completed .login-stage-label {
    color: #4ade80;
}

/* Main message */
.login-message {
    text-align: center;
}

.login-message-primary {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    animation: messageFade 0.5s ease;
}

.login-message-secondary {
    font-size: 0.875rem;
    color: #64748b;
    animation: messageFade 0.5s ease 0.1s both;
}

@keyframes messageFade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Progress bar */
.login-progress-container {
    width: 100%;
    max-width: 280px;
    margin-top: 1.5rem;
}

.login-progress-bar {
    height: 4px;
    background: rgba(51, 65, 85, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

.login-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #06b6d4);
    background-size: 200% 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.login-progress-text {
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* =============================================================================
   Mobile UX Simplification Utilities
   Hide verbose UI elements on small screens for cleaner mobile experience
   ============================================================================= */

@media (max-width: 640px) {
    /* Hide help indicators on mobile - obvious elements don't need tooltips */
    .help-indicator {
        display: none !important;
    }

    /* Tighter spacing on mobile */
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }

    .space-y-3 > * + * {
        margin-top: 0.5rem;
    }

    /* Compact gaps */
    .gap-4 {
        gap: 0.75rem;
    }

    .gap-3 {
        gap: 0.5rem;
    }

    /* Smaller padding on cards */
    .p-4 {
        padding: 0.875rem;
    }

    .p-5 {
        padding: 1rem;
    }

    /* Compact margins */
    .mb-6 {
        margin-bottom: 1rem;
    }

    .mb-8 {
        margin-bottom: 1.5rem;
    }
}

