/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

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

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Voting section styles */
.voting-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.round-info {
    text-align: center;
    margin-bottom: 40px;
}

.round-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #4a5568;
}

.round-info p {
    color: #718096;
    font-size: 1.1rem;
}

/* Image comparison styles */
.image-comparison {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.image-container {
    flex: 1;
    max-width: 400px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.image-container.selected {
    border: 4px solid #48bb78;
    transform: scale(1.05);
}

.image-container img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.vote-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 0 0 15px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vote-btn:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
}

.vs {
    font-size: 2rem;
    font-weight: bold;
    color: #e53e3e;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Progress bar styles */
.progress {
    text-align: center;
    margin-top: 30px;
}

.progress p {
    margin-bottom: 10px;
    color: #4a5568;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Results section styles */
.results-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    text-align: center;
}

.results-section h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #2d3748;
}

.rankings {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.ranking-item {
    display: flex;
    align-items: center;
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
}

.ranking-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 20px;
}

.ranking-info {
    flex: 1;
    text-align: left;
}

.ranking-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #2d3748;
}

.ranking-info p {
    color: #718096;
    font-size: 0.9rem;
}

.ranking-position {
    font-size: 2rem;
    font-weight: bold;
    color: #48bb78;
    margin-right: 20px;
    min-width: 40px;
}

.restart-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

/* Hidden class */
.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .image-comparison {
        flex-direction: column;
        gap: 30px;
    }

    .image-container {
        max-width: 100%;
    }

    .vs {
        transform: rotate(90deg);
        margin: 20px 0;
    }

    .voting-section {
        padding: 20px;
    }

    .rankings {
        gap: 15px;
    }

    .ranking-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .ranking-item img {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .ranking-info {
        text-align: center;
    }
}
