* {
    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%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    border-bottom: 3px solid #667eea;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.header-text h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.header-text p {
    font-size: 14px;
    opacity: 0.8;
}

.header-center {
    text-align: center;
}

.header-center h2 {
    font-size: 24px;
}

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

.qr-code {
    width: 80px;
    height: 80px;
    background: white;
    padding: 5px;
    border-radius: 5px;
}

.qr-label {
    font-size: 12px;
    opacity: 0.8;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.nav-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Legend */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border-left: 3px solid;
}

/* Calendar Wrapper */
.calendar-wrapper {
    display: flex;
    height: 600px;
    position: relative;
    overflow: hidden;
}

.time-column {
    width: 80px;
    border-right: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.time-header {
    height: 50px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    background: #f0f0f0;
}

.time-labels {
    flex: 1;
    overflow-y: auto;
    padding-top: 10px;
}

.time-label {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #e0e0e0;
    padding-top: 5px;
}

/* Calendar Container */
.calendar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.calendar-header {
    height: 50px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 2px solid #e0e0e0;
    background: #f0f0f0;
}

.day-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #e0e0e0;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.day-header:last-child {
    border-right: none;
}

.day-name {
    font-size: 12px;
}

.day-date {
    font-size: 16px;
}

/* Calendar Grid */
.calendar-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(11, 60px);
    gap: 0;
    overflow-y: auto;
    position: relative;
    border-left: 1px solid #e0e0e0;
}

.calendar-day {
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    background: white;
    min-height: 60px;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: #f9f9f9;
    cursor: pointer;
}

/* Events */
.event {
    position: absolute;
    left: 5px;
    right: 5px;
    padding: 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    border-left: 4px solid;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.event:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.event-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.event-time {
    font-size: 11px;
    opacity: 0.9;
}

.event-description {
    font-size: 10px;
    margin-top: 3px;
    opacity: 0.8;
}

/* Event Types - Service */
.event-service {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-left-color: #f5576c;
}

/* Event Types - Training */
.event-pump {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #667eea;
}

.event-crossfit {
    background: linear-gradient(135deg, #FA8BFF 0%, #2BD2FF 90%, #2BFF88 100%);
    color: white;
    border-left-color: #FA8BFF;
}

.event-hyrox {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
    color: white;
    border-left-color: #FF6B6B;
}

.event-spinning {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-left-color: #4facfe;
}

.event-bauchbeineppo {
    background: linear-gradient(135deg, #F77F00 0%, #FCBF49 100%);
    color: white;
    border-left-color: #F77F00;
}

.event-rehasport {
    background: linear-gradient(135deg, #06FFA5 0%, #1ABC9C 100%);
    color: white;
    border-left-color: #06FFA5;
}

.event-gesundheitssport {
    background: linear-gradient(135deg, #72DDF7 0%, #00D4FF 100%);
    color: white;
    border-left-color: #72DDF7;
}

.event-rentnersport {
    background: linear-gradient(135deg, #C471F5 0%, #FA71CD 100%);
    color: white;
    border-left-color: #C471F5;
}

.event-studentensport {
    background: linear-gradient(135deg, #85FFBD 0%, #FFFB7D 100%);
    color: #333;
    border-left-color: #85FFBD;
}

/* Legend Color Matching */
.legend-color.event-pump {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-left-color: #667eea;
}

.legend-color.event-crossfit {
    background: linear-gradient(135deg, #FA8BFF 0%, #2BD2FF 90%, #2BFF88 100%);
    border-left-color: #FA8BFF;
}

.legend-color.event-hyrox {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 100%);
    border-left-color: #FF6B6B;
}

.legend-color.event-spinning {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-left-color: #4facfe;
}

.legend-color.event-bauchbeineppo {
    background: linear-gradient(135deg, #F77F00 0%, #FCBF49 100%);
    border-left-color: #F77F00;
}

.legend-color.event-rehasport {
    background: linear-gradient(135deg, #06FFA5 0%, #1ABC9C 100%);
    border-left-color: #06FFA5;
}

.legend-color.event-gesundheitssport {
    background: linear-gradient(135deg, #72DDF7 0%, #00D4FF 100%);
    border-left-color: #72DDF7;
}

.legend-color.event-rentnersport {
    background: linear-gradient(135deg, #C471F5 0%, #FA71CD 100%);
    border-left-color: #C471F5;
}

.legend-color.event-studentensport {
    background: linear-gradient(135deg, #85FFBD 0%, #FFFB7D 100%);
    border-left-color: #85FFBD;
}

.legend-color.event-service {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-left-color: #f5576c;
}

/* Current Time Indicator */
.current-time-indicator {
    position: absolute;
    width: 100%;
    height: 2px;
    background: red;
    z-index: 100;
    left: 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

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

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-wrapper {
        height: 500px;
    }
    
    .calendar-grid {
        grid-template-rows: repeat(11, 50px);
    }

    .legend {
        gap: 10px;
    }

    .legend-item {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .time-column {
        width: 60px;
    }
    
    .time-label {
        height: 50px;
        font-size: 10px;
    }
    
    .calendar-grid {
        grid-template-rows: repeat(11, 50px);
    }
    
    .event {
        font-size: 10px;
        padding: 5px;
    }

    .legend {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        padding: 10px 30px;
    }

    .legend-item {
        font-size: 12px;
    }
}