/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
    .exam-content {
        grid-template-columns: 1fr;
    }
    
    .question-palette-section {
        position: static;
    }
    
    .question-palette {
        grid-template-columns: repeat(10, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    /* Login Page */
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
    
    .logos-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        height: 50px;
    }
    
    /* Dashboard */
    .dashboard-header {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        border-radius: 0 0 20px 20px;
    }
    
    .header-left {
        width: 100%;
        justify-content: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .dashboard-main {
        padding: 1rem;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .subject-card {
        padding: 1.25rem;
        border-radius: 16px;
        text-align: center;
    }
    
    .subject-icon-img {
        width: 60px;
        height: 60px;
        margin: 0 auto 0.75rem;
    }
    
    .subject-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .subject-card p {
        font-size: 0.75rem;
    }
    
    /* Exam Page */
    .exam-header {
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        border-radius: 0 0 16px 16px;
    }
    
    .header-left {
        justify-content: space-between;
    }
    
    .btn-back {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .back-text {
        display: none;
    }
    
    .back-icon {
        font-size: 1.3rem;
    }
    
    .header-center {
        order: -1;
    }
    
    .timer-display {
        width: 100%;
        justify-content: center;
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .exam-main {
        padding: 0.75rem;
    }
    
    .question-section {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .question-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .question-actions .btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .question-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .question-navigation .btn {
        width: 100%;
    }
    
    .question-palette-section {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .question-palette {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
    }
    
    .palette-number {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    /* Result Page */
    .result-page-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .top-logo {
        height: 50px;
    }
    
    .header-info h1 {
        font-size: 1.25rem;
    }
    
    .header-info p {
        font-size: 0.85rem;
    }
    
    .result-container {
        padding: 1rem;
    }
    
    .result-card {
        padding: 1.25rem;
        border-radius: 20px;
    }
    
    .result-header h2 {
        font-size: 1.5rem;
    }
    
    .score-circle {
        width: 160px;
        height: 160px;
    }
    
    .score-percentage {
        font-size: 2.5rem;
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-lg {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    .footer-logos-inline {
        gap: 1rem;
    }
    
    .footer-logo-small {
        height: 30px;
    }
    
    .developer-info {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .developer-separator {
        display: none;
    }
    
    .telegram-contact {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
    }
    
    /* Review Page */
    .review-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .review-main {
        padding: 0.75rem;
    }
    
    .review-navigation {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .review-navigation .btn {
        width: 100%;
    }
    
    .review-content {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .review-palette {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
        padding: 1rem;
        border-radius: 16px;
    }
    
    /* Modal */
    .modal-content {
        margin: 1rem;
        border-radius: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .login-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .login-header h1 {
        font-size: 1.25rem;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .subject-card {
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    .question-text {
        font-size: 0.95rem;
    }
    
    .option-label {
        font-size: 0.9rem;
    }
    
    .question-palette {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.3rem;
    }
    
    .palette-number {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-percentage {
        font-size: 2rem;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .developer-name {
        font-size: 0.9rem;
    }
    
    .developer-title,
    .contact-item-inline {
        font-size: 0.75rem;
    }
    
    .review-content {
        padding: 1rem;
    }
    
    .review-question {
        font-size: 1rem;
    }
    
    .review-palette {
        grid-template-columns: repeat(5, 1fr);
    }
}
