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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Form Section */
.create-poll {
    padding: 4rem 0;
}

.form-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-card h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group select {
    background-color: white;
    cursor: pointer;
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.error-text {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.option-input {
    display: flex;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    align-items: center;
}

.option-input input {
    flex: 1;
}

.remove-option {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-option:hover {
    background: #c0392b;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3498db;
    color: white;
    width: 100%;
    font-size: 1.1rem;
    padding: 1rem;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    margin-top: 0.5rem;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

#poll-url {
    word-break: break-all;
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 3px;
    font-family: monospace;
}

.qr-code-container {
    text-align: center;
    margin: 1rem 0;
}

.qr-code-container img {
    max-width: 200px;
    margin-top: 0.5rem;
}

/* Poll Voting Page */
.poll-container {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.poll-question {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.poll-options {
    list-style: none;
}

.poll-option {
    margin-bottom: 1rem;
}

.poll-option label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.poll-option label:hover {
    border-color: #3498db;
    background-color: #f8f9ff;
}

.poll-option input[type="radio"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.poll-option input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.4);
}

.poll-option input[type="radio"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

.poll-option input[type="checkbox"]:checked + span {
    color: #3498db;
    font-weight: 600;
}

.poll-option label:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background-color: #f8f9ff;
}

.poll-option label:has(input[type="checkbox"]:checked) {
    border-color: #3498db;
    background-color: #f8f9ff;
}

.vote-btn {
    width: 100%;
    margin-top: 1rem;
}

.vote-status {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-bottom: 1rem;
    font-weight: 500;
}

.vote-status-sub {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Override checked state colors for better revote indication */
.poll-option label:has(input[type="radio"]:checked) {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
}

.poll-option input[type="radio"]:checked + span {
    color: #28a745 !important;
    font-weight: 600;
}

/* Results */
.results-container {
    margin-top: 2rem;
}

.result-item {
    margin-bottom: 1rem;
}

.result-option {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-bar {
    background: #e9ecef;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.result-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
    height: 100%;
    transition: width 0.5s ease;
}

/* Admin Pages */
.admin-header {
    background: #34495e;
    color: white;
    padding: 2rem 0;
}

.admin-header h2 {
    margin: 0;
}

.admin-content {
    padding: 2rem 0;
}

.admin-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.poll-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

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

.poll-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.info-text {
    color: #007bff;
    font-style: italic;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
}

.status-in-progress {
    background: #fff3cd;
    color: #856404;
}

.status-closed {
    background: #d4edda;
    color: #155724;
}

/* Support Page */
.support-form {
    max-width: 600px;
    margin: 2rem auto;
}

.support-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.support-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-links {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Legal pages styling */
.legal-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.legal-section h3 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .form-card {
        margin: 0 1rem;
        padding: 1.5rem;
    }

    .poll-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

/* Loading and Success States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
}

/* Poll type indicator */
.poll-type-indicator {
    background: #e7f3ff;
    color: #0056b3;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-left: 4px solid #007bff;
}