:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #f8f9fa;
    --border-color: #e0e0e0;
    --text-color: #333333;
    --text-light: #666666;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.progress-indicator {
    display: flex;
    gap: 10px;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-light);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.progress-step.active {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

/* Main App Container */
.app-container {
    position: relative;
    min-height: 500px;
}

.step {
    display: none;
    animation: slideIn 0.5s ease;
}

.step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.step-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Days Grid */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.day-option input {
    display: none;
}

.day-option label {
    display: block;
    padding: 20px;
    background: var(--secondary-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.day-option input:checked + label {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Daily Hours Section */
.daily-hours-section {
    background: var(--accent-color);
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
}

.daily-hours-section h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.daily-hours-section > p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.daily-hour-item {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.daily-hour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.daily-hour-header h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.daily-hour-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--secondary-color);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Buttons */
button {
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-next, .btn-prev {
    min-width: 120px;
}

.btn-next {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-next:hover {
    background: #333333;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-prev {
    background: var(--accent-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-prev:hover {
    background: var(--border-color);
}

.btn-add {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px dashed var(--border-color);
    width: 100%;
    margin-bottom: 30px;
}

.btn-add:hover {
    border-color: var(--primary-color);
    background: var(--accent-color);
}

.btn-export, .btn-edit {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-export:hover, .btn-edit:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.step-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

/* Rest Periods & Subjects */
.rest-period, .subject-item {
    background: var(--secondary-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--info-color);
    animation: fadeInUp 0.5s ease;
}

.subject-item {
    border-left-color: var(--primary-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.item-header h3 {
    color: var(--primary-color);
}

.remove-btn {
    background: var(--error-color);
    color: var(--secondary-color);
    padding: 8px 12px;
    font-size: 0.9rem;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* Availability Section */
.availability-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.availability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.availability-header h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.availability-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.availability-day {
    display: flex;
    align-items: center;
    gap: 8px;
}

.availability-day input {
    width: auto;
}

.unavailable-times {
    margin-top: 15px;
}

.unavailable-time-item {
    background: var(--accent-color);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.remove-time-btn {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.8rem;
}

.add-unavailable-btn {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
}

.add-unavailable-btn:hover {
    border-color: var(--primary-color);
    background: var(--accent-color);
}

/* Schedule Container */
.schedule-container {
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.schedule-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--accent-color);
    border-radius: 10px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: var(--secondary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.summary-label {
    display: block;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.schedule-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.schedule-display {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.schedule-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
}

.schedule-cell {
    background: var(--secondary-color);
    padding: 15px 10px;
    min-height: 70px;
    position: relative;
}

.schedule-header-cell {
    background: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    font-weight: bold;
    padding: 15px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-cell {
    background: var(--accent-color);
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-block {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    animation: taskAppear 0.5s ease;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.task-block:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes taskAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.rest-period-block {
    background: var(--warning-color);
    color: var(--secondary-color);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-align: center;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-content {
    background: var(--secondary-color);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .days-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .schedule-actions {
        flex-direction: column;
    }
    
    .schedule-grid {
        grid-template-columns: 60px repeat(2, 1fr);
        overflow-x: auto;
    }
    
    .schedule-cell, .schedule-header-cell, .time-cell {
        padding: 10px 5px;
        min-height: 60px;
        font-size: 0.9rem;
    }
    
    .daily-hour-fields {
        grid-template-columns: 1fr;
    }
    
    .unavailable-time-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .days-grid {
        grid-template-columns: 1fr;
    }
    
    .schedule-grid {
        grid-template-columns: 50px repeat(2, 1fr);
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .availability-days {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state p {
    margin-bottom: 15px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}
/* Improved Schedule Display */
.schedule-container {
    background: var(--secondary-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.schedule-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--accent-color);
    border-radius: 10px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: var(--secondary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.summary-label {
    display: block;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.schedule-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* New Clean Schedule Layout */
.schedule-display {
    background: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
    vertical-align: top;
}

.schedule-table th {
    background: var(--primary-color);
    color: var(--secondary-color);
    font-weight: bold;
    padding: 12px 8px;
}

.schedule-table .time-column {
    background: var(--accent-color);
    font-weight: bold;
    width: 80px;
    padding: 12px 8px;
}

.schedule-table .day-column {
    min-width: 120px;
}

/* Time Slot Styles */
.time-slot {
    min-height: 60px;
    position: relative;
    transition: var(--transition);
}

.time-slot:hover {
    background: #fafafa;
}

.time-slot-header {
    background: #2c3e50;
    color: white;
    font-weight: bold;
}

/* Task Blocks in Schedule */
.schedule-task {
    padding: 6px 8px;
    border-radius: 4px;
    margin: 2px 0;
    font-size: 0.8rem;
    line-height: 1.3;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    animation: taskAppear 0.5s ease;
    color: white;
    text-align: left;
    position: relative;
    z-index: 1;
}

.schedule-task:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.schedule-task.compact {
    padding: 4px 6px;
    font-size: 0.75rem;
}

.schedule-rest {
    background: var(--warning-color);
    padding: 6px 8px;
    border-radius: 4px;
    margin: 2px 0;
    font-size: 0.8rem;
    text-align: center;
    color: white;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

/* Multi-slot tasks */
.task-span-2 { min-height: 120px; }
.task-span-3 { min-height: 180px; }
.task-span-4 { min-height: 240px; }

/* Schedule Legend */
.schedule-legend {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Empty State */
.empty-slot {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.8rem;
    padding: 8px;
}

/* Time Period Groups */
.time-period {
    background: var(--accent-color);
    font-weight: bold;
    text-align: center;
}

.time-period-morning { background: #e8f4f8; }
.time-period-afternoon { background: #f8f4e8; }
.time-period-evening { background: #f4e8f8; }

/* Responsive Schedule */
@media (max-width: 768px) {
    .schedule-table {
        font-size: 0.8rem;
    }
    
    .schedule-table .time-column {
        width: 60px;
        padding: 8px 4px;
    }
    
    .schedule-table .day-column {
        min-width: 100px;
    }
    
    .schedule-task {
        padding: 4px 6px;
        font-size: 0.75rem;
    }
    
    .schedule-legend {
        gap: 10px;
    }
    
    .legend-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .schedule-table {
        font-size: 0.75rem;
    }
    
    .schedule-table .time-column {
        width: 50px;
        padding: 6px 3px;
    }
    
    .schedule-table .day-column {
        min-width: 80px;
    }
    
    .schedule-task {
        padding: 3px 4px;
        font-size: 0.7rem;
    }
}

/* Animation for task appearance */
@keyframes taskAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes smoothAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-task {
    animation: smoothAppear 0.5s ease;

}
/* Conflict Dialog Styles */
.conflict-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.conflict-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.conflict-header {
    text-align: center;
    margin-bottom: 20px;
}

.conflict-header h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

.conflicts-list {
    margin-bottom: 20px;
}

.conflict-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.conflict-item.critical {
    background: #ffeaea;
    border-left-color: #e74c3c;
}

.conflict-item.warning {
    background: #fff4e6;
    border-left-color: #f39c12;
}

.conflict-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.conflict-message {
    margin-bottom: 8px;
    color: #555;
}

.conflict-details {
    font-size: 0.9rem;
    color: #666;
}

.conflict-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

