/* Overhoren - Modern CSS Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Hero Section */
.hero-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content {
    text-align: center;
    color: white;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Statistics */
.stats-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tests Grid */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.test-card-enhanced {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.test-card-enhanced:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.test-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.test-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.test-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.test-description {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.test-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 10px 15px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: white;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error and No Content States */
.error-message, .no-tests, .no-results {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.error-content, .no-tests-content {
    max-width: 400px;
    margin: 0 auto;
}

.error-icon, .no-tests-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.error-content h3, .no-tests-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.error-content p, .no-tests-content p {
    color: #7f8c8d;
    margin-bottom: 25px;
}

/* Test Container */
.test-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.question-card {
    max-width: 600px;
    margin: 0 auto;
}

.question-card h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.4rem;
    line-height: 1.4;
}

.answer-section {
    margin-bottom: 25px;
}

.answer-section input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.answer-section input:focus {
    outline: none;
    border-color: #3498db;
}

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

/* Progress Bar */
.progress-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
    font-weight: 500;
}

/* Feedback */
.feedback {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

.feedback-correct {
    border-left-color: #27ae60;
    background: #d4edda;
}

.feedback-incorrect {
    border-left-color: #e74c3c;
    background: #f8d7da;
}

.feedback-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feedback h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.feedback-content p {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Results */
.results-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.results-hero {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.results-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.results-hero h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.score-summary-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.score-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.score-excellent {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
}

.score-good {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.score-needs-improvement {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}

.score-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.time-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.question-review-section {
    margin-bottom: 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.section-header p {
    color: #7f8c8d;
}

.questions-grid {
    display: grid;
    gap: 20px;
}

.question-result {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #3498db;
}

.question-result.correct {
    border-left-color: #27ae60;
    background: #d4edda;
}

.question-result.incorrect {
    border-left-color: #e74c3c;
    background: #f8d7da;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.question-number {
    font-weight: 600;
    color: #2c3e50;
}

.question-status {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.question-status.correct {
    background: #27ae60;
    color: white;
}

.question-status.incorrect {
    background: #e74c3c;
    color: white;
}

.question-content p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.explanation {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 3px solid #3498db;
}

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

/* Admin Dashboard */
.admin-dashboard {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.admin-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    height: fit-content;
}

.admin-sidebar h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.admin-main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.filter-tab:hover:not(.active) {
    border-color: #3498db;
    color: #3498db;
}

.search-box {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 25px;
    font-size: 1rem;
    margin-bottom: 25px;
    transition: border-color 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: #3498db;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e1e8ed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal form {
    padding: 30px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

/* Questions Management */
.questions-list {
    max-height: 400px;
    overflow-y: auto;
}

.question-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.question-number {
    font-weight: 600;
    color: #2c3e50;
}

.question-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.question-content {
    margin-bottom: 15px;
}

.question-text {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c3e50;
}

.answer-text {
    color: #27ae60;
    font-weight: 500;
    margin-bottom: 10px;
}

.explanation-text {
    color: #7f8c8d;
    font-style: italic;
}

.edit-form {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    border: 2px solid #e1e8ed;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.empty-state p {
    margin-bottom: 25px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 25px;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .nav-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-dashboard {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        order: 2;
    }
    
    .admin-main {
        order: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .score-main {
        flex-direction: column;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .test-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .question-actions {
        width: 100%;
        justify-content: center;
    }
}

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

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

.test-card-enhanced {
    animation: fadeIn 0.5s ease-out;
}

/* Accessibility */
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .btn,
    .nav-actions,
    .quick-actions {
        display: none;
    }
    
    .test-card-enhanced {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}