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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header */
.header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.evaluator-info {
    display: flex;
    gap: 10px;
    max-width: 500px;
}

.evaluator-info input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.evaluator-info input:focus {
    outline: none;
    border-color: #667eea;
}

.evaluator-info button {
    padding: 10px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.evaluator-info button:hover {
    background: #5568d3;
}

/* Progress Bar */
.progress-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.progress-text {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
}

/* Panels */
.panel {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#session-setup {
    max-width: 800px;
    margin: 0 auto;
}

#session-setup h2 {
    color: #667eea;
    margin-bottom: 15px;
}

#session-setup ol {
    margin-left: 25px;
    line-height: 2;
}

/* Evaluator Form */
.evaluator-form {
    max-width: 650px;
    margin: 30px auto;
    padding: 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.15);
    position: relative;
}

.evaluator-form::before {
    content: '👤';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    background: white;
    padding: 15px 25px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label::before {
    content: '●';
    color: #667eea;
    font-size: 0.6rem;
}

.form-group input {
    width: 100%;
    padding: 14px 18px 14px 45px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #a0aec0;
}

/* Icons for inputs */
.form-group:nth-child(1)::before {
    content: '👤';
    position: absolute;
    left: 15px;
    bottom: 14px;
    font-size: 1.2rem;
    pointer-events: none;
}

.form-group:nth-child(2)::before {
    content: '🏛️';
    position: absolute;
    left: 15px;
    bottom: 14px;
    font-size: 1.2rem;
    pointer-events: none;
}

.form-group:nth-child(3)::before {
    content: '📧';
    position: absolute;
    left: 15px;
    bottom: 14px;
    font-size: 1.2rem;
    pointer-events: none;
}

.evaluator-form .primary-button {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.evaluator-form .primary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.instructions {
    max-width: 650px;
    margin: 30px auto 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    border-left: 5px solid #667eea;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.instructions h3 {
    margin-top: 0;
    color: #667eea;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions h3::before {
    content: 'ℹ️';
    font-size: 1.5rem;
}

.instructions ol {
    margin-left: 20px;
    line-height: 2;
    color: #2d3748;
}

.instructions li {
    margin-bottom: 8px;
}

.instructions li::marker {
    color: #667eea;
    font-weight: bold;
}

/* Real-time save indicator */
.save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    display: none;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.save-indicator.show {
    display: flex;
}

.save-indicator::before {
    content: '✓';
    background: white;
    color: #10b981;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Case Navigation */
.case-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.nav-button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.nav-button:hover:not(:disabled) {
    background: #5568d3;
}

.nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.case-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

/* Case Info */
.case-info {
    margin-bottom: 30px;
}

.case-info h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.case-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.task-details {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.task-details summary {
    cursor: pointer;
    font-weight: bold;
    user-select: none;
}

.task-details pre {
    margin-top: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

/* Images */
.images-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.image-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.image-grid {
    display: grid;
    gap: 15px;
}

.image-grid img,
.image-grid video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Evaluation Form */
.evaluation-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.evaluation-form h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Scoring Guidelines */
.scoring-guidelines {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.scoring-guidelines h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.scoring-guidelines p {
    margin-bottom: 10px;
    color: #856404;
}

.scoring-guidelines ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.scoring-guidelines li {
    padding: 8px 0;
    color: #856404;
    border-bottom: 1px solid #ffeeba;
}

.scoring-guidelines li:last-child {
    border-bottom: none;
}

.scoring-guidelines strong {
    color: #664d03;
}

.metric-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
}

.metric-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.rating-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-slider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 4px;
    outline: none;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.rating-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.rating-value {
    min-width: 60px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

.notes-section {
    margin-top: 20px;
}

.notes-section label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.notes-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.notes-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.primary-button,
.secondary-button {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-button {
    background: #667eea;
    color: white;
}

.primary-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.secondary-button {
    background: #f0f0f0;
    color: #666;
}

.secondary-button:hover {
    background: #e0e0e0;
}

/* Footer */
.footer {
    margin-top: 20px;
    text-align: center;
    color: white;
}

.footer a {
    color: white;
    text-decoration: underline;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .images-container {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .case-navigation {
        flex-direction: column;
        gap: 10px;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}
