* {
    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: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.current-date {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0 20px;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.action-controls {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.main-content {
    padding: 30px;
}

.calendar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.calendar-header div {
    padding: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #f0f0f0;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: #f8f9ff;
    border-color: #667eea;
    transform: scale(1.02);
}

.calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

.calendar-day.today {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    font-weight: bold;
}

.calendar-day.today:hover {
    background: linear-gradient(135deg, #3d8bfe, #00d4fe);
}

.day-number {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.events-list {
    max-height: 80px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.event {
    background: var(--category-color, #667eea);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    margin: 2px 0;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.event:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.week-view, .day-view {
    display: none;
}

.week-view.active, .day-view.active {
    display: block;
}

.week-grid {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    gap: 1px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.week-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.time-slot {
    background: #f8f9fa;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    border-right: 1px solid #e0e0e0;
}

.week-day-column {
    background: white;
    min-height: 600px;
    position: relative;
}

.day-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.day-content {
    padding: 20px;
    background: white;
    min-height: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.category-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option:hover, .color-option.selected {
    border-color: #333;
    transform: scale(1.1);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.modal-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
}

.modal-btn.secondary:hover {
    background: #e9ecef;
}

.modal-btn.danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.modal-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Scrollbar Styling */
.events-list::-webkit-scrollbar {
    width: 4px;
}

.events-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.events-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.events-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .controls {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .nav-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .current-date {
        font-size: 1.4em;
        margin: 10px 0;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 5px;
        font-size: 12px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .event {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .view-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .calendar-header div {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .nav-btn, .action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .view-btn {
        padding: 8px 10px;
        font-size: 11px;
    }
}