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

body {
font-family: "Helvetica Neue", Helvetica, Arial, -apple-system,
             BlinkMacSystemFont, "Segoe UI", Roboto,
             Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #263037 0%, #224F55 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.phase {
    display: none;
}

.phase.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #263037;
    margin-bottom: 30px;
    font-size: 2.5em;
}

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

h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.2em;
}

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

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

input[type="text"],
input[type="file"],
input[type="url"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="file"]:focus,
input[type="url"]:focus {
    outline: none;
    border-color: #667eea;
}

small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.9em;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #224F55;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #224F55;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-submit {
    background: #224F55;
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 20px;
}

.btn-submit:hover:not(:disabled) {
    background: #224F55 ;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F5CB6C, #EB672C);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #333;
    z-index: 1;
}

.videos-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.video-wrapper {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.video-wrapper h3 {
    text-align: center;
    margin-bottom: 15px;
}

.test-video {
    width: 100%;
    border-radius: 8px;
    background: #000;
}

/* YouTube iframe container */
#video-1-container,
#video-2-container,
#reference-player-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

#video-1-container iframe,
#video-2-container iframe,
#reference-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#reference-player-container {
    padding-bottom: 56.25%;
    margin: 20px 0;
}

#reference-youtube-player {
    width: 100%;
    height: 100%;
}

.video-status {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.video-status.completed {
    color: #EB672C;
    font-weight: 600;
}

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

.play-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.selection-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.preference-buttons,
.rating-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.preference-btn,
.rating-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    background: white;
    border: 2px solid #224F55;
    color: #224F55;
    font-size: 16px;
}

.preference-btn:hover,
.rating-btn:hover {
    background: #224F55;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.preference-btn.selected,
.rating-btn.selected {
    background: #224F55;
    color: white;
    border-color: #224F55;
}

.rating-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

#export-section {
    text-align: center;
    margin-top: 30px;
}

#export-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
}

#export-status.success {
    background: #d4edda;
    color: #224F55;
    border: 1px solid #224F55;
}

#export-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#admin-status {
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

#admin-status.success {
    background: #d4edda;
    color: #EB672C;
    border: 1px solid #c3e6cb;
}

#admin-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .videos-container {
        grid-template-columns: 1fr;
    }
    
    .preference-buttons,
    .rating-buttons {
        flex-direction: column;
    }
    
    .preference-btn,
    .rating-btn {
        width: 100%;
    }
    
    .container {
        padding: 20px;
    }
}