:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --button-color: #4a90e2;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.voting-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 576px) {
    .voting-card {
        border-radius: 15px;
        margin: 5px;
    }
    
    .card-header {
        padding: 1rem 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .logo-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .access-code-input {
        font-size: 1rem;
        padding: 0.7rem;
        letter-spacing: 0.15em;
    }
    
    .form-control {
        font-size: 1rem !important;
        padding: 0.7rem !important;
    }
    
    .btn-primary-custom {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .h4 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem !important;
    }
    
    .card-body p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .mb-3 {
        margin-bottom: 0.75rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .form-text {
        font-size: 0.8rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
        margin-top: 1rem;
    }
    
    .security-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.75rem !important;
    }
}

.card-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.card-body {
    padding: 2.5rem;
}

.logo-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.access-code-input {
    font-size: 1.2rem;
    padding: 1rem;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.access-code-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.access-code-input[readonly] {
    background-color: #f8f9fa !important;
    border-color: #28a745 !important;
    color: #495057;
    cursor: not-allowed;
}

.access-code-input[readonly]:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.btn-primary-custom {
    background: var(--button-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: white;
}

.btn-primary-custom:hover {
    background: #357abd;
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: white;
    cursor: not-allowed;
}

.btn-secondary:disabled {
    background: #6c757d;
    border: none;
    color: white;
    opacity: 0.6;
    cursor: not-allowed;
}

.security-badge {
    background: #e8f5e8;
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-text {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
}

/* ============================================================================
   BALLOT INTERFACE STYLES
   ============================================================================ */

.ballot-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.ballot-progress .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.ballot-item-container {
    min-height: 300px;
}

.ballot-title {
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.4;
}

.ballot-description {
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
}

.ballot-description p {
    margin-bottom: 1rem;
}

.vote-options {
    margin: 2rem 0;
}

.vote-option {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-width: 2px;
}

.vote-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.vote-option.selected {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.vote-option.selected:hover {
    background-color: #1e3d6f !important;
    border-color: #1e3d6f !important;
}

.btn-outline-success.vote-option:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-outline-danger.vote-option:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.current-selection {
    border-radius: 10px;
}

.current-selection .alert {
    margin-bottom: 0;
    border-radius: 10px;
}

.ballot-navigation {
    border-top: 2px solid #e9ecef;
    padding-top: 1.5rem;
}

.ballot-navigation .btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

#submitBallotBtn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
}

#submitBallotBtn:hover {
    background-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Multiple Choice Buttons */
.choice-button {
    text-align: left;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.4;
}

.choice-button:hover {
    border-color: var(--primary-color);
    background-color: #f8f9ff;
    transform: translateY(-1px);
}

.choice-button.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.choice-button .choice-text {
    font-weight: 500;
}

.choice-button .choice-description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Write-in Input */
#writeInInput {
    font-size: 1.1rem;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#writeInInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Responsive adjustments for ballot */
@media (max-width: 576px) {
    .ballot-item-container {
        min-height: 250px;
    }
    
    .vote-option {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
    
    .ballot-title {
        font-size: 1.1rem;
    }
    
    .ballot-description {
        font-size: 0.95rem;
    }
    
    .choice-button {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    
    #submitBallotBtn {
        font-size: 1.1rem;
        padding: 0.9rem 1.5rem;
    }
}