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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-box input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-box button {
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-box button:hover {
    background: #5568d3;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

/* Calendar Page */
#calendar-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

.calendar-header {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    flex-wrap: wrap;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-left h1 {
    font-size: 20px;
    color: #333;
    margin-right: 5px;
}

.nav-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

.nav-btn:hover {
    background: #5568d3;
}

.week-display {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-left: 5px;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-name {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.logout-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    white-space: nowrap;
}

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

.calendar-container {
    flex: 1;
    overflow: auto;
    background: white;
    padding: 10px;
}

/* FullCalendar Custom Styles */
#calendar {
    height: 100%;
}

.fc {
    font-size: 14px;
}

.fc-header-toolbar {
    margin-bottom: 1em;
}

.fc-toolbar-title {
    font-size: 1.5em;
}

.fc-event {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
}

.fc-event-title {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-event-time {
    font-size: 10px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.fc-event-created-by {
    font-size: 9px;
    opacity: 0.8;
    font-style: italic;
    margin-top: 2px;
}

.fc-event-recurring {
    font-size: 9px;
    margin-top: 2px;
}

.fc-timegrid-slot {
    height: 2.5em;
}

.fc-col-header-cell {
    padding: 8px 4px;
    font-weight: 600;
}

.fc-daygrid-day-number {
    padding: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calendar-header {
        padding: 10px 15px;
    }
    
    .header-left h1 {
        font-size: 18px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .week-display {
        font-size: 14px;
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .fc {
        font-size: 12px;
    }
    
    .fc-toolbar-title {
        font-size: 1.2em;
    }
    
    .fc-event {
        font-size: 11px;
        padding: 1px 3px;
    }
    
    .fc-event-title {
        font-size: 11px;
    }
    
    .fc-event-time {
        font-size: 9px;
    }
    
    .fc-event-created-by {
        font-size: 8px;
    }
    
    .fc-timegrid-slot {
        height: 2em;
    }
    
    .fc-col-header-cell {
        padding: 6px 2px;
        font-size: 11px;
    }
    
    .calendar-container {
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .calendar-header {
        padding: 8px 10px;
    }
    
    .header-left {
        width: 100%;
        justify-content: center;
    }
    
    .header-left h1 {
        font-size: 16px;
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .week-display {
        font-size: 12px;
    }
    
    .fc {
        font-size: 11px;
    }
    
    .fc-toolbar-title {
        font-size: 1em;
    }
    
    .fc-event {
        font-size: 10px;
    }
    
    .fc-timegrid-slot {
        height: 1.8em;
    }
    
    .fc-col-header-cell {
        padding: 4px 1px;
        font-size: 10px;
    }
}

/* Add Session Button */
.add-session-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.add-session-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .add-session-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.form-actions button {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.form-actions button[type="submit"] {
    background: #667eea;
    color: white;
}

.form-actions button[type="submit"]:hover {
    background: #5568d3;
}

.form-actions button[type="button"] {
    background: #e0e0e0;
    color: #333;
}

.form-actions button[type="button"]:hover {
    background: #d0d0d0;
}

.delete-btn {
    background: #e74c3c !important;
    color: white !important;
}

.delete-btn:hover {
    background: #c0392b !important;
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 8px;
    }
    
    .form-actions button {
        font-size: 14px;
        padding: 10px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
