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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h3 {
    color: #555;
    margin-bottom: 20px;
}

/* Calendar Section */
.calendar-section {
    margin-bottom: 30px;
}

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

.calendar-header h2 {
    color: #667eea;
    font-size: 1.5em;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.3s;
}

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

.calendar {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #667eea;
    color: white;
    font-weight: bold;
}

.weekdays div {
    padding: 15px;
    text-align: center;
}

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

.day {
    background: white;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day:hover:not(.disabled):not(.other-month) {
    background: #e8ebff;
    transform: scale(1.05);
}

.day.selected {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.day.other-month {
    color: #ccc;
    background: #fafafa;
}

.day.has-slots {
    position: relative;
}

.day.has-slots::after {
    content: '•';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: #28a745;
    font-size: 20px;
}

.day.no-slots {
    position: relative;
    color: #999;
    cursor: not-allowed;
}

.day.no-slots .no-slot-mark {
    position: absolute;
    top: 2px;
    right: 2px;
    color: #dc3545;
    font-size: 12px;
    font-weight: bold;
}

.day.has-appointment {
    position: relative;
}

.day.has-appointment::after {
    content: '•';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: #667eea;
    font-size: 20px;
}

/* Time Slots */
.time-slots {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

#timeSlotsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.time-slot {
    padding: 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
}

.time-slot .slot-remaining {
    display: block;
    font-size: 0.75em;
    color: #28a745;
    margin-top: 4px;
    font-weight: normal;
}

.time-slot:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.time-slot.booked {
    background: #e0e0e0;
    border-color: #999;
    color: #666;
    cursor: not-allowed;
    text-decoration: line-through;
}

.time-slot.booked:hover {
    background: #e0e0e0;
    color: #666;
    transform: none;
}

/* Booking Form */
.booking-form {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.booking-summary {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.booking-summary p {
    margin: 5px 0;
    color: #555;
}

.submit-btn,
.cancel-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
}

.submit-btn {
    background: #667eea;
    color: white;
}

.submit-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.cancel-btn {
    background: #e0e0e0;
    color: #555;
}

.cancel-btn:hover {
    background: #d0d0d0;
}

/* Appointments List */
.appointments-list {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

#appointmentsContainer {
    margin-top: 15px;
}

.appointment-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.appointment-info p {
    margin: 5px 0;
    color: #555;
}

.delete-appointment {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.delete-appointment:hover {
    background: #ff3838;
}

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

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    color: #4caf50;
    margin-bottom: 15px;
}

.close-modal {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1em;
}

.close-modal:hover {
    background: #5568d3;
}

/* Back to Home Button */
.back-home-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #timeSlotsContainer {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .day {
        padding: 10px;
        font-size: 0.9em;
    }
}
