/* Modern Physics Banks App - SaaS Style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Cairo", sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    direction: rtl;
}

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

/* User Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #4f46e5;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.input-group {
    margin-bottom: 20px;
    text-align: right;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

/* Main Header */
.main-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.user-info {
    text-align: left;
    direction: ltr;
}

.user-stats {
    margin-top: 5px;
    opacity: 0.9;
}

/* Banks Grid */
.banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.bank-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.15);
    border-color: #4f46e5;
}

.bank-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.bank-card h3 {
    color: #4f46e5;
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.bank-card p {
    color: #64748b;
    margin-bottom: 20px;
    text-align: center;
}

.bank-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}

.score {
    color: #f59e0b;
    font-weight: 600;
}

.btn-start {
    width: 100%;
    background: #4f46e5;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-start:hover {
    background: #3730a3;
    transform: translateY(-2px);
}

/* Quiz Interface */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.btn-home, .btn-finish {
    background: #64748b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-finish {
    background: #f59e0b;
}

.btn-home:hover {
    background: #475569;
}

.btn-finish:hover {
    background: #d97706;
}

/* Progress Bar */
.progress-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    color: #4f46e5;
    font-weight: 600;
    float: left;
    direction: ltr;
}

/* Question Container */
.question-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

#questionCounter {
    background: #4f46e5;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
}

#questionCategory {
    color: #64748b;
    font-weight: 600;
}

.question-content h3 {
    color: #1e293b;
    margin-bottom: 20px;
    font-size: 1.3rem;
    line-height: 1.8;
}

.options-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.option-btn {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.option-btn:hover {
    border-color: #4f46e5;
    background: #f0f4ff;
}

.option-btn.selected {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.option-btn.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.option-btn.wrong {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.explanation {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.explanation h4 {
    color: #0ea5e9;
    margin-bottom: 10px;
}

/* Navigation Buttons */
.question-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-nav {
    background: #64748b;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-nav:hover:not(:disabled) {
    background: #475569;
    transform: translateY(-2px);
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Interface */
.results-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results-container h2 {
    color: #4f46e5;
    margin-bottom: 30px;
    font-size: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

#scorePercentage {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
}

.score-message {
    font-size: 1.5rem;
    color: #10b981;
    margin-bottom: 30px;
    font-weight: 600;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #4f46e5;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-review, .btn-home-large {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-review {
    background: #f59e0b;
    color: white;
}

.btn-home-large {
    background: #4f46e5;
    color: white;
}

.btn-review:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.btn-home-large:hover {
    background: #3730a3;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .banks-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 25px;
    }
    
    .question-container {
        padding: 20px;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    #scorePercentage {
        font-size: 2rem;
    }
}
