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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #C41E3A 0%, #165B33 50%, #C41E3A 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

h3 {
    color: #555;
    margin-bottom: 15px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #C41E3A;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #165B33 0%, #0D3D22 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    font-weight: 700;
}

.room-code {
    font-size: 3em;
    font-weight: bold;
    text-align: center;
    color: #C41E3A;
    background: linear-gradient(135deg, #FFD700 20%, #FFF8DC 80%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    letter-spacing: 8px;
    border: 3px solid #165B33;
}

.judges-section {
    margin-top: 30px;
}

#judgesList {
    list-style: none;
    padding: 0;
}

#judgesList li {
    background: #f8f9fa;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border-left: 4px solid #C41E3A;
}

.progress-info {
    text-align: center;
    font-size: 1.5em;
    margin: 20px 0;
    color: #165B33;
    font-weight: bold;
}

.cookie-rating-card {
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 2px solid #C41E3A;
}

.cookie-rating-card h3 {
    color: #C41E3A;
    margin-bottom: 20px;
    text-align: center;
}

.rating-group {
    margin-bottom: 15px;
}

.rating-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.rating-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.rating-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.rating-btn:hover {
    border-color: #165B33;
    transform: scale(1.1);
}

.rating-btn.active {
    background: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    color: white;
    border-color: #C41E3A;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.place {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.place.first {
    order: 2;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    transform: scale(1.1);
    border: 3px solid #DAA520;
}

.place.second {
    order: 1;
    background: linear-gradient(135deg, #C0C0C0 0%, #E8E8E8 100%);
    border: 3px solid #A9A9A9;
}

.place.third {
    order: 3;
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    border: 3px solid #8B4513;
}

.medal {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.place h3 {
    margin: 10px 0;
    font-size: 1.3em;
}

.place p {
    color: #666;
    font-weight: 600;
}

.detailed-results {
    margin-top: 30px;
}

.detailed-results table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.detailed-results th,
.detailed-results td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.detailed-results th {
    background: linear-gradient(135deg, #C41E3A 0%, #165B33 100%);
    color: white;
    font-weight: 600;
}

.detailed-results tr:nth-child(even) {
    background: #f8f9fa;
}

.detailed-results tr:hover {
    background: #e9ecef;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #C41E3A;
    border-right: 5px solid #165B33;
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .room-code {
        font-size: 2em;
        letter-spacing: 4px;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .place {
        width: 100%;
        max-width: 250px;
    }

    .place.first {
        order: 1;
    }

    .place.second {
        order: 2;
    }

    .place.third {
        order: 3;
    }

    .button-group {
        flex-direction: column;
    }

    .rating-buttons {
        flex-wrap: wrap;
    }

    .detailed-results {
        overflow-x: auto;
    }
}
