:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --bg-color: #f4f4f9;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    text-align: center;
    color: var(--text-color);
    padding-bottom: 40px;
}

header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    color: white;
    padding: 20px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.survey-notice {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: center;
}

.survey-notice p {
    margin: 5px 0;
}

.survey-notice strong {
    font-weight: 600;
    color: #fff;
}

.ad-slot {
    background: #e9e9e9;
    border: 1px dashed #ccc;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px auto;
    font-size: 0.8rem;
    min-height: 50px;
}

.ad-top {
    width: 100%;
    max-width: 320px;
    height: 100px;
}

.ad-native {
    width: 100%;
    max-width: 300px;
    height: 250px;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.candidate-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.candidate-card:active {
    transform: scale(0.95);
}

.candidate-icon {
    font-size: 80px;
    margin-bottom: 10px;
    color: #667eea;
}

.candidate-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    margin-bottom: 10px;
    border: 4px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.candidate-card h3 {
    margin: 10px 0;
    font-size: 1rem;
    color: #333;
    min-height: 40px;
}

.btn-vote {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.progress-container {
    margin: 20px auto;
    width: 90%;
    max-width: 800px;
}

.progress-wrapper {
    margin-bottom: 15px;
    text-align: left;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.label {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1rem;
}

.label span:last-child {
    font-size: 1.1rem;
    color: #333;
}

.bar-bg {
    background: #ddd;
    border-radius: 10px;
    height: 25px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    width: 0%;
    transition: width 1s ease-out;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.total-votes-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    text-align: center;
}

.summary-total {
    font-size: 1.1rem;
    color: #333;
}

.summary-total strong {
    color: #667eea;
    font-size: 1.2rem;
}

.summary-total span {
    font-size: 1.4rem;
    color: #28a745;
}

.modal-overlay {
    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: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    width: 85%;
    max-width: 350px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
}

.modal-content input[type="text"],
.modal-content input[type="tel"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.checkbox-group {
    margin: 15px 0;
    text-align: left;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    color: #333;
    user-select: none;
}

.btn-submit {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

.recent-voters-container {
    margin-top: 25px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 0;
}

.recent-voters-marquee {
    display: inline-flex;
    gap: 12px;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    will-change: transform;
}

.recent-voters-marquee:hover {
    animation-play-state: paused;
}

.voter-badge {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    margin-right: 12px;
}
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    margin-bottom: 10px;
    border: 4px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #666;
    margin-top: 40px;
}

footer a {
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s;
}

footer a:hover {
    color: #0056b3;
    text-decoration: underline;
}

footer ul {
    list-style-type: disc;
}

footer ul li {
    margin-bottom: 5px;
}

.share-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.share-btn:active {
    transform: translateY(-1px) !important;
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.4rem;
    }
}
