/* Weekly Challenge Solve Page - Additional Styles */

/* View All Problems Button */
.view-problems-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-problems-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

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

.problem-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Contest Problems Overview Modal Styles */
.contest-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    z-index: 99999;
    overflow-y: auto;
}

.contest-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.contest-modal-container {
    background: #1e1e2e;
    border-radius: 16px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.contest-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #2d2d3d;
}

.contest-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
}

.contest-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.2s;
}

.contest-modal-close:hover {
    background: #2d2d3d;
    color: #fff;
}

.contest-modal-info {
    display: flex;
    justify-content: space-around;
    padding: 20px 32px;
    background: #252535;
    border-bottom: 1px solid #2d2d3d;
}

.contest-modal-info-item {
    text-align: center;
}

.contest-modal-info-label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.contest-modal-info-value {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.contest-modal-progress-bar-container {
    height: 6px;
    background: #2d2d3d;
}

.contest-modal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
}

.contest-modal-problems {
    padding: 24px 32px;
    max-height: 500px;
    overflow-y: auto;
}

.contest-modal-problem {
    background: #252535;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.contest-modal-problem:hover {
    background: #2d2d3d;
    border-color: #667eea;
    transform: translateX(4px);
}

.contest-modal-problem.solved {
    border-color: #10b981;
}

.contest-modal-problem.current {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.contest-modal-problem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.contest-modal-problem-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contest-modal-problem-number {
    background: #667eea;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.contest-modal-problem.solved .contest-modal-problem-number {
    background: #10b981;
}

.contest-modal-problem.current .contest-modal-problem-number {
    background: #f59e0b;
}

.contest-modal-problem-name {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.contest-modal-badges {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.contest-modal-difficulty {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.difficulty-easy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.difficulty-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.difficulty-hard {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.contest-modal-points {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.contest-modal-status {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.contest-modal-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 13px;
}

.status-solved { color: #10b981; }
.status-current { color: #f59e0b; }
.status-not-attempted { color: #6b7280; }

.contest-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 32px;
    border-top: 1px solid #2d2d3d;
}

.contest-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contest-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.contest-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.contest-modal-btn-secondary {
    background: #2d2d3d;
    color: #fff;
}

.contest-modal-btn-secondary:hover {
    background: #3d3d4d;
}

.contest-modal-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

@media (max-width: 768px) {
    .contest-modal-problem-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .contest-modal-badges {
        align-self: flex-start;
    }
    .view-problems-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   LIGHT THEME SUPPORT
   ======================================== */

body[data-theme="light"] .contest-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

body[data-theme="light"] .contest-modal-container {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .contest-modal-header {
    border-bottom: 1px solid #e2e8f0;
}

body[data-theme="light"] .contest-modal-header h2 {
    color: #1a202c;
}

body[data-theme="light"] .contest-modal-close {
    color: #718096;
}

body[data-theme="light"] .contest-modal-close:hover {
    background: #edf2f7;
    color: #2d3748;
}

body[data-theme="light"] .contest-modal-info {
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

body[data-theme="light"] .contest-modal-info-label {
    color: #718096;
}

body[data-theme="light"] .contest-modal-info-value {
    color: #1a202c;
}

body[data-theme="light"] .contest-modal-progress-bar-container {
    background: #e2e8f0;
}

body[data-theme="light"] .contest-modal-problem {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
}

body[data-theme="light"] .contest-modal-problem:hover {
    background: #edf2f7;
    border-color: #667eea;
}

body[data-theme="light"] .contest-modal-problem.solved {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

body[data-theme="light"] .contest-modal-problem.current {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

body[data-theme="light"] .contest-modal-problem-name {
    color: #1a202c;
}

body[data-theme="light"] .contest-modal-status-item {
    color: #4a5568;
}

body[data-theme="light"] .contest-modal-footer {
    border-top: 1px solid #e2e8f0;
}

body[data-theme="light"] .contest-modal-btn-secondary {
    background: #edf2f7;
    color: #2d3748;
}

body[data-theme="light"] .contest-modal-btn-secondary:hover {
    background: #e2e8f0;
}

body[data-theme="light"] .contest-modal-loading {
    color: #718096;
}

