@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --danger-color: #E74C3C;
    --bg-color: #F5F7FA;
    --card-bg: #FFFFFF;
    --text-color: #2C3E50;
    --border-color: #E1E8ED;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 12px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.login-container, .dashboard-container {
    width: 100%;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.login-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

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

.role-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.role-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.role-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.role-card h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.role-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

button {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

button:hover {
    background: #357ABD;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

button.secondary {
    background: #95A5A6;
}

button.secondary:hover {
    background: #7F8C8D;
}

.admin-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.admin-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link a:hover {
    text-decoration: underline;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.message.success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.message.error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.hidden {
    display: none !important;
}

/* Dashboard Styles */
.dashboard-header {
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    width: auto;
    padding: 10px 20px;
    margin: 0;
    background: var(--danger-color);
}

.logout-btn:hover {
    background: #C0392B;
}

/* macOS Style App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 30px;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 15px;
}

.app-icon:hover {
    background: rgba(103, 126, 234, 0.1);
    transform: translateY(-5px);
}

.app-icon-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.app-icon-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-modal {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    background: none;
    border: none;
    padding: 0;
    width: auto;
    margin: 0;
}

.close-modal:hover {
    color: var(--danger-color);
    transform: none;
}

/* Students List */
.students-list {
    display: grid;
    gap: 15px;
}

.student-card {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.student-card:hover {
    border-color: var(--primary-color);
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.student-card h3 {
    color: var(--text-color);
    margin-bottom: 5px;
}

.student-card p {
    color: #7F8C8D;
    font-size: 0.9rem;
}

/* Success Page */
.success-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.success-container h1 {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.id-display {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    border: 2px dashed var(--primary-color);
}

.id-display label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-color);
}

.id-display .id-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
    word-break: break-all;
}

.copy-btn {
    background: var(--secondary-color);
    margin-top: 20px;
}

.copy-btn:hover {
    background: #45B368;
}

/* Custom Modal */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.custom-modal.active {
    display: flex;
}

.custom-modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.custom-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.custom-modal-content p {
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.6;
}

.custom-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.custom-modal-buttons button {
    width: auto;
    padding: 12px 30px;
    margin: 0;
}

/* Choice Cards */
.choice-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.choice-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    border: 3px solid transparent;
}

.choice-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.choice-card-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.choice-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.choice-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Image Upload */
.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-color);
    margin: 20px 0;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #EDF5FF;
}

.upload-area.dragover {
    border-color: var(--secondary-color);
    background: #E8F5E9;
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.image-preview {
    margin: 20px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Schedule Parts */
.schedule-parts {
    margin: 20px 0;
}

.schedule-part {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.schedule-part:hover {
    border-color: var(--primary-color);
}

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

.part-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.remove-part-btn {
    width: auto;
    padding: 8px 15px;
    background: var(--danger-color);
    margin: 0;
}

.time-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.time-select-group {
    display: flex;
    flex-direction: column;
}

.time-select-group label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.duration-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.duration-input input {
    flex: 1;
}

.duration-input span {
    color: var(--text-color);
    font-weight: 500;
}

/* Study Hours Counter */
.study-hours {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.study-hours h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.9;
    font-weight: 500;
}

.study-hours .hours {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Add Part Button */
.add-part-btn {
    background: var(--secondary-color);
    border: 2px dashed white;
}

.add-part-btn:hover {
    background: #45B368;
}

/* Schedule Display for Student */
.schedule-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.schedule-image-display {
    text-align: center;
    margin: 20px 0;
}

.schedule-image-display img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.schedule-timeline {
    margin: 20px 0;
}

.schedule-timeline-no-line {
    margin: 20px 0;
}

.schedule-timeline-no-line .timeline-item::before {
    display: none !important;
}

.timeline-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: calc(100% - 20px);
    background: var(--border-color);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-time {
    min-width: 120px;
    text-align: right;
    padding-top: 10px;
}

.timeline-time .time-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-content {
    flex: 1;
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid var(--primary-color);
}

.timeline-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text-color);
    line-height: 1.6;
}

.volume-item {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-right: 4px solid var(--primary-color);
}

.volume-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.volume-item .duration {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.volume-item p {
    color: var(--text-color);
    line-height: 1.6;
}

.no-schedule {
    text-align: center;
    padding: 60px 20px;
}

.no-schedule-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Calendar Specific Styles */
.calendar-wrapper {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.calendar-header h3 {
    color: #4A90E2;
    font-size: 1.5rem;
    flex: 1;
    text-align: center;
}

.calendar-nav-btn {
    width: auto !important;
    min-width: 50px;
    padding: 10px 20px !important;
    margin: 0 !important;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.calendar-day-header {
    font-weight: bold;
    color: #4A90E2;
    padding: 10px 5px;
    font-size: 0.95rem;
}

.calendar-day {
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: #F5F7FA;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.calendar-day:hover {
    background: #E1E8ED;
    transform: scale(1.05);
}

.calendar-day.today {
    font-weight: bold;
    border: 2px solid #4A90E2;
    background: #EDF5FF;
}

.calendar-day.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #F9F9F9;
}

.calendar-day.disabled:hover {
    background: #F9F9F9;
    transform: none;
}

.calendar-day-dot {
    width: 6px;
    height: 6px;
    background: #50C878;
    border-radius: 50%;
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Responsive */
@media (max-width: 768px) {
    .role-selector {
        grid-template-columns: 1fr;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 20px;
        padding: 20px;
    }
    
    .login-box, .modal-content, .success-container {
        padding: 25px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 1.3rem;
    }

    .choice-cards {
        grid-template-columns: 1fr;
    }

    .time-selects {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        flex-direction: column;
        gap: 10px;
    }

    .timeline-time {
        text-align: right;
    }

    .custom-modal-buttons {
        flex-direction: column;
    }

    .custom-modal-buttons button {
        width: 100%;
    }

    /* Calendar Mobile Styles */
    .calendar-wrapper {
        padding: 15px;
        border-radius: 15px;
    }

    .calendar-header h3 {
        font-size: 1.1rem;
    }

    .calendar-nav-btn {
        min-width: 40px !important;
        padding: 8px 12px !important;
        font-size: 1rem;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day-header {
        padding: 8px 2px;
        font-size: 0.8rem;
    }

    .calendar-day {
        padding: 8px 4px;
        min-height: 40px;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .calendar-day-dot {
        width: 5px;
        height: 5px;
        bottom: 3px;
    }
}

@media (max-width: 480px) {
    .calendar-wrapper {
        padding: 10px;
    }

    .calendar-header h3 {
        font-size: 1rem;
    }

    .calendar-nav-btn {
        min-width: 35px !important;
        padding: 6px 10px !important;
    }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day-header {
        padding: 6px 1px;
        font-size: 0.7rem;
    }

    .calendar-day {
        padding: 6px 2px;
        min-height: 35px;
        font-size: 0.75rem;
    }
}

/* Chat Styles */
.chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #F5F7FA;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 70%;
    animation: messageSlide 0.3s ease;
}

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

.message-mine {
    align-self: flex-end;
    align-items: flex-end;
    margin-right: 8px;
}

.message-theirs {
    align-self: flex-start;
    align-items: flex-start;
    margin-left: 8px;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.5;
}

.message-mine .message-content {
    background: #4A90E2;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-theirs .message-content {
    background: white;
    color: #2C3E50;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-time {
    font-size: 0.75rem;
    color: #7F8C8D;
    margin-top: 4px;
    padding: 0 8px;
}

.chat-input-container {
    border-top: 1px solid #E8ECF1;
    padding: 20px;
    background: white;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-container textarea {
    flex: 1;
    border: 1px solid #E8ECF1;
    border-radius: 20px;
    padding: 12px 16px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s;
    max-height: 120px;
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: #4A90E2;
}

.chat-input-container button {
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.chat-input-container button:hover:not(:disabled) {
    background: #357ABD;
    transform: scale(1.05);
}

.chat-input-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Tests Section */
.tests-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #E8ECF1;
}

.test-toggle-btn {
    background: #27AE60;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    width: 100%;
}

.test-toggle-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

.tests-config {
    margin-top: 15px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E8ECF1;
}

.test-types {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    background: white;
    border: 1px solid #E8ECF1;
    border-radius: 6px;
    transition: all 0.3s;
}

.checkbox-label:hover {
    border-color: #4A90E2;
    background: #F0F7FF;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #2C3E50;
}

/* Test Display in Student Schedule */
.test-info {
    margin-top: 10px;
    padding: 10px;
    background: #FFF9E6;
    border-radius: 8px;
    border: 1px solid #FFE08A;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.test-badge {
    background: #F39C12;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.test-types-label {
    color: #7F8C8D;
    font-size: 13px;
    background: white;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Exam System */
.exam-day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
}

.exam-option-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.exam-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

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

.exam-option-card h3 {
    color: #2C3E50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.exam-option-card p {
    color: #7F8C8D;
    font-size: 0.95rem;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    background: #F8F9FA;
    border-radius: 8px;
    border: 2px solid #E8ECF1;
    transition: all 0.3s;
}

.radio-label:hover {
    border-color: #4A90E2;
    background: #EDF5FF;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #4A90E2;
}

.question-type-card {
    background: #F8F9FA;
    border: 2px solid #E8ECF1;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.question-type-card:hover {
    border-color: #4A90E2;
    background: #EDF5FF;
    transform: translateY(-3px);
}

.question-type-card h3 {
    color: #2C3E50;
    margin: 10px 0;
}

.question-type-card p {
    color: #7F8C8D;
    font-size: 0.9rem;
}

.exam-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.3s;
}

.exam-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.exam-card.exam-disabled {
    opacity: 0.6;
}

.exam-card.exam-disabled:hover {
    transform: none;
}

.option-card {
    background: #F8F9FA;
    border: 2px solid #E8ECF1;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-card:hover {
    border-color: #4A90E2;
    background: #EDF5FF;
}

.option-card input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option-card span {
    flex: 1;
    font-size: 1rem;
    color: #2C3E50;
}

.option-card.option-selected {
    background: #4A90E2;
    border-color: #4A90E2;
    color: white;
}

.option-card.option-selected span {
    color: white;
    font-weight: 600;
}

/* DateTime Display */
.datetime-display {
    position: fixed;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 0.75rem;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 9999;
    min-width: 140px;
}

.datetime-date {
    font-weight: 700;
    color: white;
    font-size: 0.8rem;
}

.datetime-time {
    color: rgba(255,255,255,0.9);
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 768px) {
    .datetime-display {
        top: 5px;
        left: 5px;
        padding: 6px 10px;
        font-size: 0.7rem;
        min-width: 120px;
    }
    
    .datetime-date {
        font-size: 0.75rem;
    }
    
    .datetime-time {
        font-size: 0.65rem;
    }
    
    .study-hours {
        padding: 12px 15px;
    }
    
    .study-hours h3 {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .study-hours .hours {
        font-size: 1.3rem;
    }
    
    .chat-container {
        height: calc(100vh - 160px);
        border-radius: 15px;
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    .message-content {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .chat-input-container {
        padding: 12px;
        gap: 8px;
    }
    
    .chat-input-container button {
        width: 44px;
        height: 44px;
    }
    
    .send-icon-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .study-hours {
        padding: 10px 12px;
        border-radius: 10px;
    }
    
    .study-hours h3 {
        font-size: 0.8rem;
        margin-bottom: 5px;
    }
    
    .study-hours .hours {
        font-size: 1.1rem;
    }
    
    .chat-container {
        height: calc(100vh - 140px);
        border-radius: 12px;
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .chat-message {
        max-width: 90%;
        margin-bottom: 10px;
    }
    
    .message-content {
        font-size: 13px;
        padding: 9px 12px;
    }
    
    .chat-input-container {
        padding: 10px;
    }
    
    .chat-input-container textarea {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .chat-input-container button {
        width: 40px;
        height: 40px;
    }
    
    .send-icon-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Result Page Styles */
.result-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.score-badge {
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    margin: 0 auto 30px;
    max-width: 200px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
}

.score-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    margin-top: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    text-align: center;
    padding: 20px 15px;
    background: #F8F9FA;
    border-radius: 12px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
}

.stat-label {
    color: #7F8C8D;
    margin-top: 5px;
    font-size: 0.85rem;
}

.message-box {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.success-box {
    background: #D5F4E6;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.warning-box {
    background: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEEBA;
}

.error-box {
    background: #FADBD8;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.details-btn {
    width: 100%;
    padding: 14px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.details-btn:hover {
    background: #357ABD;
    transform: translateY(-2px);
}

.details-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
}

.question-card {
    background: #F8F9FA;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #4A90E2;
}

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

.question-header h4 {
    color: #2C3E50;
    margin: 0;
}

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

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: white;
    font-weight: 500;
}

.time-badge {
    padding: 5px 12px;
    border-radius: 15px;
    background: #95A5A6;
    color: white;
    font-size: 0.85rem;
}

.question-text {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.options-list {
    display: grid;
    gap: 10px;
}

.option-item {
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-correct {
    background: #D5F4E6;
    border-color: #27AE60;
}

.option-wrong {
    background: #FADBD8;
    border-color: #E74C3C;
}

.option-number {
    font-weight: bold;
    color: #2C3E50;
    min-width: 25px;
}

.option-text {
    flex: 1;
    color: #2C3E50;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
}

.question-image {
    text-align: center;
    margin-bottom: 15px;
}

.question-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.image-option {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    border: 2px solid transparent;
}

.image-option.option-correct {
    background: #D5F4E6;
    border-color: #27AE60;
    color: #155724;
}

.image-option.option-wrong {
    background: #FADBD8;
    border-color: #E74C3C;
    color: #721C24;
}

/* Responsive */
@media (max-width: 768px) {
    .result-card {
        padding: 20px;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .question-card {
        padding: 15px;
    }
    
    .question-header {
        flex-direction: column;
    }
    
    .details-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .result-card {
        padding: 15px;
        border-radius: 15px;
    }
    
    .score-badge {
        padding: 20px;
    }
    
    .score-number {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .image-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Report Upload Styles */
.report-upload-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.instructions-box {
    background: #E8F4FD;
    border-left: 5px solid #4A90E2;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.instructions-box h3 {
    color: #2C3E50;
    margin-bottom: 15px;
}

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

.date-display {
    background: #F8F9FA;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.upload-area {
    border: 3px dashed #E1E8ED;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    background: #F8F9FA;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #4A90E2;
    background: #F0F5FF;
}

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

.upload-text {
    font-size: 1.1rem;
    color: #2C3E50;
    margin-bottom: 10px;
}

.upload-hint {
    color: #7F8C8D;
    font-size: 0.9rem;
}

.upload-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.preview-container {
    text-align: center;
    margin: 20px 0;
}

.preview-container img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.remove-btn {
    background: #E74C3C;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.confirm-section {
    background: #FFF3CD;
    border: 2px solid #F39C12;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

.submit-btn {
    background: #27AE60;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.submit-btn:hover {
    background: #229954;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4A90E2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Reports Calendar Styles */
.calendar-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.nav-btn {
    background: #4A90E2;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
    color: #7F8C8D;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: #F8F9FA;
    position: relative;
    font-weight: 600;
}

.calendar-day:hover {
    background: #E8F4FD;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    background: #4A90E2;
    color: white;
    font-weight: bold;
}

.calendar-day.has-report {
    background: linear-gradient(135deg, #D5F4E6 0%, #A8E6CF 100%);
    border: 2px solid #27AE60;
    position: relative;
}

.calendar-day.has-report:hover {
    background: linear-gradient(135deg, #A8E6CF 0%, #80DEAA 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: 2px solid #2E5C8A;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.calendar-day.selected .report-indicator {
    background: white;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.report-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8rem;
}

.report-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #27AE60;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(39, 174, 96, 0.6);
}

.report-card {
    background: white;
    border: 2px solid #E1E8ED;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F8F9FA;
}

.report-header h4 {
    color: #2C3E50;
    margin: 0;
}

.time-badge {
    background: #4A90E2;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.report-image {
    text-align: center;
}

.report-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.report-image img:hover {
    transform: scale(1.02);
}

/* Desktop: Make calendars smaller and centered */
@media (min-width: 1024px) {
    .calendar-wrapper {
        max-width: 700px;
        margin: 0 auto;
    }
    
    .calendar-container {
        max-width: 700px;
        margin: 0 auto;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .report-upload-container {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .calendar-container {
        padding: 20px;
    }
    
    .calendar-weekdays,
    .calendar-days {
        gap: 5px;
    }
}
