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

header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    margin: 0.5rem 0 0 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

header a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    float: right;
    margin-top: -1.5rem;
}

header a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.export-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 1rem;
    position: relative;
    overflow: hidden;
}

.export-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.export-btn:hover::before {
    left: 100%;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.export-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

#add-session {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

#add-session h2 {
    color: #2c3e50;
    margin-top: 0;
    text-align: center;
    font-size: 1.8rem;
}

form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

form label {
    font-weight: bold;
    color: #34495e;
    margin-bottom: 5px;
    display: block;
}

input, select, textarea {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

#timetable {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 12px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    position: relative;
}

th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: top;
    position: relative;
}

tr:nth-child(even) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
}

.session {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 25px;
    margin: 6px 0;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
    min-height: 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.session strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.dinner {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: #2d3436;
    padding: 10px 16px;
    border-radius: 25px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}


.success-message, .error-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.success-message {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.error-message {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

/* Admin Panel Styles */

#login, #admin-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

#login h2, #admin-panel h2 {
    color: #2c3e50;
    margin-top: 0;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.admin-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    border-left: 5px solid #3498db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.admin-section h3 {
    color: #34495e;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.admin-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-section label {
    font-weight: bold;
    color: #34495e;
}

.admin-section input[type="date"] {
    padding: 10px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
}

.admin-section button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.admin-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

#sessions-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#sessions-list th {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#sessions-list td {
    padding: 12px 8px;
    border-bottom: 1px solid #e1e8ed;
}

#sessions-list tr:nth-child(even) {
    background-color: rgba(52, 152, 219, 0.02);
}

#sessions-list tr:hover td {
    background-color: rgba(52, 152, 219, 0.05);
}

#sessions-list button {
    padding: 6px 12px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sessions-list button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
}

/* Form Messages */
.success-message, .error-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.success-message {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.error-message {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}/* Week sections styling */
.week-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.week-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
}

.week-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 700;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.week-section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.week-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.week-section th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 12px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    position: relative;
}

.week-section th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.week-section td {
    padding: 14px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: top;
    min-height: 50px;
    position: relative;
}

.week-section tr:nth-child(even) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
}

.session-cell {
    min-height: 50px;
    position: relative;
}

.occupied-cell {
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
    color: white;
    font-weight: 600;
    border-radius: 15px;
    margin: 4px;
    box-shadow: 0 3px 10px rgba(0, 210, 211, 0.2);
    position: relative;
    overflow: hidden;
}

.empty-cell {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(233, 236, 239, 0.8) 100%);
    border-radius: 15px;
    margin: 4px;
}

.spanned {
    background: transparent;
    border: none;
    box-shadow: none;
}

.session-content {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.session-content.primary-session {
    width: 100%;
    background: rgba(52, 152, 219, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
}

.session-content.secondary-session {
    width: 48%;
    background: rgba(155, 89, 182, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    display: inline-block;
    margin-right: 2px;
}

.session-content.tertiary-session {
    width: 48%;
    background: rgba(230, 126, 34, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .week-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .week-section h3 {
        font-size: 1.3rem;
    }

    .week-section th,
    .week-section td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    th {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    td {
        padding: 10px 8px;
    }

    .session {
        padding: 8px 12px;
        min-height: 50px;
        font-size: 0.8rem;
    }

    .dinner {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Animation for timetable loading */
#timetable {
    animation: fadeInUp 0.6s ease-out;
}

.week-section {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.week-section:nth-child(1) { animation-delay: 0.1s; }
.week-section:nth-child(2) { animation-delay: 0.2s; }
.week-section:nth-child(3) { animation-delay: 0.3s; }
.week-section:nth-child(4) { animation-delay: 0.4s; }

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

/* Enhanced focus states for accessibility */
.session:focus,
.dinner:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Better typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
