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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Loading State */
.loading {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Countdown Timer */
.countdown {
    text-align: center;
    color: white;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.countdown h2 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-unit span {
    font-size: 3rem;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 1rem;
    border-radius: 15px;
    min-width: 80px;
    display: block;
    text-align: center;
}

.time-unit label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Voting Section */
.voting {
    text-align: center;
}

.question-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.question-card h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.option-btn:active {
    transform: translateY(0);
}

.option-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Section */
.results {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.results h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2rem;
}

.results-container {
    margin-bottom: 2rem;
}

.result-bar {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.option-label {
    min-width: 100px;
    font-weight: 600;
    color: #333;
}

.progress-bar {
    flex: 1;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
}

.stats {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    color: #666;
}

.total-votes {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #666;
    font-weight: 500;
}

/* Next Question Countdown */
.next-question-countdown {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    text-align: center;
}

.next-question-countdown h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.next-question-countdown .timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.next-question-countdown .time-unit span {
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: 8px;
    min-width: 50px;
    display: block;
    text-align: center;
}

.next-question-countdown .time-unit label {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Error State */
.error {
    text-align: center;
    color: white;
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.error h2 {
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.retry-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .timer {
        gap: 1rem;
    }
    
    .time-unit span {
        font-size: 2rem;
        min-width: 60px;
        padding: 0.5rem;
    }
    
    .question-card {
        padding: 2rem;
    }
    
    .question-card h2 {
        font-size: 1.5rem;
    }
    
    .option-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .results {
        padding: 2rem;
    }
    
    .result-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .option-label {
        min-width: auto;
    }
    
    .progress-bar {
        width: 100%;
    }
    
    .stats {
        min-width: auto;
        text-align: left;
    }
} 