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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Arial, sans-serif;
    line-height: 1.5;
    color: #1a202c;
    background: linear-gradient(to bottom, #1E3867 0%, #2750a3 100%);
    min-height: 100vh;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

h1 {
    color: white;
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

h1 a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

h1 a:hover {
    opacity: 0.8;
}

.logo {
    height: 80px;
    width: auto;
    vertical-align: middle;
    filter: invert(1);
}

h2 {
    color: #2d3748;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Theme classes for consistent color management */
.theme-dark {
    color: white;
}

.theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark h5, .theme-dark h6 {
    color: white;
}

.theme-dark p, .theme-dark span, .theme-dark div, .theme-dark label, .theme-dark small {
    color: white;
}

.theme-dark a {
    color: white;
    text-decoration: underline;
}

.theme-dark a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.theme-light {
    color: #2d3748;
}

.theme-light h1, .theme-light h2, .theme-light h3, .theme-light h4, .theme-light h5, .theme-light h6 {
    color: #2d3748;
}

.theme-light p, .theme-light span, .theme-light div, .theme-light label, .theme-light small {
    color: #2d3748;
}

.theme-light a {
    color: #667eea;
    text-decoration: underline;
}

.theme-light a:hover {
    color: #5a67d8;
}

/* Button color classes */
.btn-dark {
    color: white;
    text-decoration: none;
}

.btn-dark:hover {
    color: white;
    text-decoration: none;
}

.btn-dark span,
.btn-dark div,
.btn-dark i {
    color: white;
}

.btn-light {
    color: #2d3748;
    text-decoration: none;
}

.btn-light:hover {
    color: #2d3748;
    text-decoration: none;
}

.btn-light span,
.btn-light div,
.btn-light i {
    color: #2d3748;
}

/* Poll title section - outside white container */
.poll-title-section {
    margin-bottom: 32px;
    text-align: left;
    padding-left: 32px;
}

.poll-title-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.poll-title-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0;
}

.poll-expiration {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 8px;
    font-style: italic;
}

/* Button styling cleaned up - color classes handle all styling now */

/* Error messages for different themes */
.theme-dark .error {
    background: rgba(254, 242, 242, 0.95);
    color: #991b1b;
    backdrop-filter: blur(10px);
}

.theme-light .error {
    background: rgba(254, 242, 242, 0.95);
    color: #991b1b;
}

/* Button color classes */
.btn-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #dc2626;
}

.btn-red:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;
}

.btn-blue {
    background: linear-gradient(135deg, #1E3867 0%, #2563eb 100%);
    color: white;
    border-color: #1E3867;
}

.btn-blue:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1E3867 100%);
    border-color: #2563eb;
}

.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.btn-green:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #059669;
}

.btn-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #d97706;
}

.btn-orange:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #b45309;
}

.btn-gray {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border-color: #d1d5db;
}

.btn-gray:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #9ca3af;
}

/* Default button styling (fallback if no color class is applied) */
.btn-primary:not([class*="btn-"]):not(.btn-blue):not(.btn-red):not(.btn-green):not(.btn-orange):not(.btn-gray),
.btn-secondary:not([class*="btn-"]):not(.btn-blue):not(.btn-red):not(.btn-green):not(.btn-orange):not(.btn-gray) {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Recent polls section */
.recent-polls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.recent-polls h2 {
    color: #1f2937;
}


.polls-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.poll-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.poll-info h4 {
    color: #1f2937 !important;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.poll-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
}

.poll-meta small {
    color: #6b7280 !important;
    font-size: 0.875rem;
}

.poll-type {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.poll-type.created {
    background: #dcfce7;
    color: #166534 !important;
}

.poll-type.participated {
    background: #dbeafe;
    color: #1e40af !important;
    font-style: italic;
}

.participant-count {
    color: #6b7280 !important;
    font-size: 0.875rem;
    font-weight: 500;
}

.poll-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-small.admin {
    background: linear-gradient(135deg, #1E3867 0%, #2563eb 100%);
    color: white;
    border-color: #1E3867;
    text-decoration: none;
}

.btn-small.admin:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1E3867 100%);
    border-color: #2563eb;
}

.btn-small.delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid #dc2626;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-small.delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.no-polls {
    color: #6b7280 !important;
    font-style: italic;
    text-align: center;
    padding: 24px;
}

/* Button text/icon display */
.btn-text {
    display: inline;
}

.btn-icon {
    display: none;
}

@media (max-width: 768px) {
    .poll-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .poll-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .poll-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    /* Show icons instead of text on mobile */
    .btn-small .btn-text {
        display: none;
    }
    
    .btn-small .btn-icon {
        display: inline;
        font-size: 16px;
    }
    
    .btn-small {
        min-width: 40px;
        height: 40px;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile-friendly results grid */
    .response-grid, .results-grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: white;
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    .grid-header, .participant-row {
        min-width: 500px;
        display: flex;
        align-items: stretch;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .grid-header:last-child, .participant-row:last-child {
        border-bottom: none;
    }
    
    .participant-col, .participant-name {
        flex: 0 0 100px;
        font-size: 0.8rem;
        padding: 12px 8px;
        border-right: 1px solid #f3f4f6;
        background: #f8fafc;
        font-weight: 600;
    }
    
    .participant-name {
        background: white;
        font-weight: 600;
    }
    
    .options-header, .response-options {
        display: flex;
        flex: 1;
        min-width: 0;
    }
    
    .option-header, .response-option {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 8px;
        text-align: center;
        font-size: 0.75rem;
        border-right: 1px solid #f3f4f6;
    }
    
    .option-header:last-child, .response-option:last-child {
        border-right: none;
    }
    
    .option-header {
        font-weight: 600;
        background: #f8fafc;
    }
    
    .choice-indicator {
        font-size: 0.9rem;
        padding: 2px 6px;
        min-width: 20px;
    }
    
    /* Force horizontal scrolling for all mobile sizes */
    .mobile-results {
        display: none;
    }
    
    /* Ensure existing responses container doesn't clip content */
    .existing-responses {
        overflow: visible;
        padding: 20px 16px;
    }
    
    .existing-responses .response-grid {
        margin: 0 -16px;
        padding: 0 16px;
    }
        
        .mobile-participant-card {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 12px;
        }
        
        .mobile-participant-name {
            font-weight: 600;
            margin-bottom: 12px;
            color: #374151;
        }
        
        .mobile-response-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .mobile-response-item:last-child {
            border-bottom: none;
        }
        
        .mobile-option-name {
            flex: 1;
            font-size: 0.875rem;
            color: #4b5563;
        }
        
        .mobile-choice {
            flex-shrink: 0;
        }
    }
}

/* Mobile results - hidden by default */
.mobile-results {
    display: none;
}

/* Ensure loading text is visible */
main .loading {
    color: white !important;
    background: rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Ensure links on colored backgrounds are visible */
main a {
    color: white !important;
    text-decoration: underline;
}

main a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Exception for links inside white cards */
.create-poll-section a,
.poll-header a,
.poll-form-container a,
.results-header a,
.password-prompt a,
.admin-login a,
.poll-created a,
.response-success a,
.results-summary a,
.response-grid a,
.results-grid a,
.response-list a {
    color: #667eea !important;
}

.create-poll-section a:hover,
.poll-header a:hover,
.poll-form-container a:hover,
.results-header a:hover,
.password-prompt a:hover,
.admin-login a:hover,
.poll-created a:hover,
.response-success a:hover,
.results-summary a:hover,
.response-grid a:hover,
.results-grid a:hover,
.response-list a:hover {
    color: #5a67d8 !important;
}

h3 {
    color: #5a6c7d;
    margin-bottom: 15px;
}

.language-switcher {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    backdrop-filter: blur(10px);
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.lang-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group.compact {
    margin-bottom: 16px;
}

.form-group.compact input,
.form-group.compact select {
    max-width: 300px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease;
    margin-right: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary:hover {
    transform: translateY(-1px);
}

.btn-copy {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    background: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    margin-left: -1px;
}

.btn-copy:hover {
    background: #e9ecef;
}

.time-slot, .poll-option {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    flex-wrap: wrap;
}

.time-slot:hover, .poll-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.slot-datetime, .slot-label, .option-text {
    flex: 1;
    min-width: 200px;
}

.calendar-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.calendar-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.remove-slot, .remove-option {
    background: #ef4444 !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-slot:hover, .remove-option:hover {
    background: #dc2626 !important;
    transform: scale(1.05);
}

#addTimeSlot, #addPollOption {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px 0 rgba(16, 185, 129, 0.2);
}

#addTimeSlot:hover, #addPollOption:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px 0 rgba(16, 185, 129, 0.3);
}

.link-container {
    display: flex;
    align-items: stretch;
}

.link-container input {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.poll-created {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.poll-links {
    margin: 20px 0;
}

.link-group {
    margin-bottom: 15px;
    text-align: left;
}

.response-grid, .results-grid {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.response-list {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 24px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.option-name {
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.option-choices {
    display: flex;
    gap: 8px;
}

.grid-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.participant-col {
    flex: 0 0 200px;
    padding: 15px;
    border-right: 1px solid #dee2e6;
}

.time-slots-header, .options-header {
    display: flex;
    flex: 1;
}

.time-slot-header, .option-header {
    flex: 1 1 0;
    min-width: 0;
    padding: 15px 10px;
    text-align: center;
    border-right: 1px solid #dee2e6;
    font-size: 0.8rem;
}

.time-slot-header:last-child, .option-header:last-child {
    border-right: none;
}

.grid-body {
    display: flex;
    flex-direction: column;
}

.participant-row {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    min-height: 60px;
}

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

.participant-name {
    flex: 0 0 200px;
    padding: 15px;
    border-right: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.response-options {
    display: flex;
    flex: 1;
}

.response-option {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dee2e6;
    padding: 10px;
}

.response-option:last-child {
    border-right: none;
}

.choice-buttons {
    display: flex;
    gap: 5px;
}

.choice-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.choice-btn .btn-icon {
    display: none;
    font-size: 12px;
}

.choice-btn .btn-text {
    display: inline;
}

.choice-btn.active {
    background: linear-gradient(135deg, #1E3867 0%, #2563eb 100%);
    color: white;
    border-color: #1E3867;
    box-shadow: 0 2px 4px 0 rgba(30, 56, 103, 0.2);
}

.choice-btn.yes.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
    box-shadow: 0 2px 4px 0 rgba(16, 185, 129, 0.2);
}

.choice-btn.no.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 2px 4px 0 rgba(239, 68, 68, 0.2);
}

.choice-btn.maybe.active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
    box-shadow: 0 2px 4px 0 rgba(245, 158, 11, 0.2);
}

.choice-indicator {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    min-width: 24px;
    display: inline-block;
}

.choice-indicator.yes {
    background: #d1fae5;
    color: #065f46;
}

.choice-indicator.no {
    background: #fee2e2;
    color: #991b1b;
}

.choice-indicator.maybe {
    background: #fef3c7;
    color: #92400e;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 48px;
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

.error {
    background: rgba(254, 242, 242, 0.95);
    color: #991b1b !important;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #fecaca;
    font-weight: 500;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.response-success {
    background: transparent;
    color: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
}

.response-success h2 {
    color: white;
    margin-bottom: 24px;
}

.response-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.response-actions .btn-secondary {
    min-width: 160px;
    padding: 12px 20px;
    text-decoration: none;
}


.password-prompt, .admin-login {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

/* Shake animation for error state */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.poll-header, .results-header, .poll-form-container {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.existing-responses {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25), 0 8px 16px -4px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.results-meta {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.results-meta span {
    margin-right: 20px;
}

.results-actions {
    margin-bottom: 20px;
}

.results-summary {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.create-poll-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 32px;
}

.create-poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    cursor: pointer;
    user-select: none;
    border-radius: 16px 16px 0 0;
    transition: background-color 0.2s ease;
}

.create-poll-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.create-poll-header h2 {
    margin-bottom: 0;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.create-poll-content {
    padding: 0 32px 32px 32px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.create-poll-content.collapsed {
    max-height: 0;
    padding: 0 32px;
}

small {
    color: #6b7280;
    font-size: 0.8125rem;
    margin-top: 6px;
    display: block;
    line-height: 1.4;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 12px;
    transform: scale(1.2);
    accent-color: #667eea;
}

.checkbox-text {
    color: #374151;
    font-weight: 500;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .time-slot, .poll-option {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .slot-datetime, .slot-label, .option-text {
        min-width: 150px;
        flex: 1;
    }
    
    .calendar-btn, .remove-slot, .remove-option {
        flex-shrink: 0;
    }
    
    .participant-col {
        flex: 0 0 150px;
    }
    
    .participant-name {
        flex: 0 0 150px;
    }
    
    .time-slot-header, .option-header {
        font-size: 0.7rem;
        padding: 10px 5px;
    }
    
    .choice-buttons {
        flex-direction: column;
    }
    
    .choice-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-width: 40px;
    }
    
    .choice-btn .btn-text {
        display: none;
    }
    
    .choice-btn .btn-icon {
        display: inline;
        font-size: 14px;
    }
    
    .option-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .option-choices {
        align-self: stretch;
        justify-content: center;
    }
}

/* Date picker modal */
.date-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.date-picker-modal.active {
    opacity: 1;
}

.date-picker-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.date-picker-modal.active .date-picker-content {
    transform: scale(1);
}

.date-picker-header h3 {
    margin: 0 0 20px 0;
    color: #1f2937 !important;
    font-size: 1.25rem;
    font-weight: 600;
}

.date-picker-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #1E3867;
    border-bottom-color: #1E3867;
}

.tab-btn:hover {
    color: #374151;
}

.date-picker-body {
    margin-bottom: 24px;
}

.date-picker-section.hidden {
    display: none;
}

.date-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    color: #374151;
}

.date-input:focus {
    outline: none;
    border-color: #1E3867;
    box-shadow: 0 0 0 3px rgba(30, 56, 103, 0.1);
}

.date-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.time-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.datetime-row {
    display: flex;
    gap: 8px;
}

.datetime-row .date-input {
    flex: 1;
}

.date-input-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151 !important;
    font-weight: 500;
}

.date-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.date-picker-actions .btn-secondary,
.date-picker-actions .btn-primary {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-picker-actions .btn-secondary {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151 !important;
}

.date-picker-actions .btn-secondary:hover {
    background: #e5e7eb;
}

.date-picker-actions .btn-primary {
    background: linear-gradient(135deg, #1E3867 0%, #2563eb 100%);
    border: 1px solid #1E3867;
    color: white !important;
}

.date-picker-actions .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1E3867 100%);
}

/* Best option highlighting */
.best-option {
    background-color: rgba(16, 185, 129, 0.15) !important;
    font-weight: 600;
}

/* Results legend */
.results-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4b5563;
}

.legend-indicator {
    width: 20px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.legend-text {
    font-weight: 500;
}


/* PIN Input Styling */
.pin-input-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 16px 0;
}

.pin-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    transition: border-color 0.2s ease;
}

.pin-digit:focus {
    outline: none;
    border-color: #1E3867;
    box-shadow: 0 0 0 3px rgba(30, 56, 103, 0.1);
}

.pin-digit:invalid {
    border-color: #ef4444;
}

/* Admin PIN Display */
.admin-pin-section {
    margin-top: 24px;
    padding: 20px;
    background-color: rgba(30, 56, 103, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(30, 56, 103, 0.2);
}

.admin-pin-display-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.admin-pin-number {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #1E3867;
    background-color: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #1E3867;
    letter-spacing: 4px;
    min-width: 120px;
    text-align: center;
}

.admin-pin-section label {
    font-weight: 600;
    color: #1E3867;
    margin-bottom: 8px;
    display: block;
}

.admin-pin-section small {
    color: #64748b;
    font-style: italic;
}

/* Participant timestamp styling */
.participant-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.participant-name-text {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.participant-timestamp {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: normal;
    line-height: 1.2;
    display: block;
    white-space: nowrap;
}

/* Results title styling */
.results-title {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 24px 0 16px 0;
    text-align: left;
}

/* Admin link styling */
.admin-link-container {
    margin-top: 16px;
    text-align: center;
}

.admin-link {
    color: white !important;
    font-size: 0.875rem;
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.admin-link:hover {
    opacity: 0.8;
    color: white !important;
}