/* Kalender Button */
.calendar-button {
    
    position: fixed;
    bottom: 20px;    /* 20px vom unteren Rand */
    left: 20px;      /* 20px vom linken Rand */
    top: auto;       /* Top-Eigenschaft zurücksetzen */
    right: auto;     /* Right-Eigenschaft zurücksetzen */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.calendar-button:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.calendar-button:active {
    transform: scale(0.95) rotate(0deg);
}

.calendar-button .calendar-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Kalender Overlay */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(10px);
}

.calendar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.calendar-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #121212;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.calendar-overlay.active .calendar-container {
    transform: translate(-50%, -50%) scale(1);
}

/* Kalender Header */
.calendar-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h2 {
    color: #fff;
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-header h2 i {
    color: #667eea;
}

.calendar-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.calendar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Kalender Controls */
.calendar-controls {
    padding: 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-nav-btn {
    background: #2d2d2d;
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.calendar-nav-btn:hover {
    background: #667eea;
    transform: translateY(-2px);
}

.calendar-current-month {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    min-width: 200px;
    text-align: center;
    padding: 0 20px;
}

.calendar-today-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.calendar-today-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Kalender Grid */
.calendar-grid {
    padding: 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.weekday {
    color: #888;
    font-weight: 600;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    background: #1a1a1a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: #2d2d2d;
    transform: translateY(-3px);
}

.calendar-day.inactive {
    color: #555;
    background: transparent;
    cursor: default;
}

.calendar-day.inactive:hover {
    background: transparent;
    transform: none;
}

.calendar-day.today {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.calendar-day.active {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.calendar-day.highlighted {
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
}

.calendar-day.active:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
}

.calendar-day.highlighted:hover {
    background: linear-gradient(135deg, #FF5722 0%, #FF9800 100%);
}

.calendar-day::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.3s;
}

.calendar-day.has-event::after {
    background: #ff4757;
}

.calendar-day-content {
    position: relative;
    z-index: 1;
}

/* Kalender Info */
.calendar-info {
    padding: 20px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.calendar-stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
}

.stat i {
    color: #667eea;
}

.stat span {
    font-weight: 600;
    color: #4CAF50;
}

.calendar-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #aaa;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.today {
    background: #667eea;
}

.legend-color.active {
    background: #4CAF50;
}

.legend-color.highlighted {
    background: #FF9800;
}

/* Event Popup */
.event-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(10px);
}

.event-overlay.active {
    opacity: 1;
    visibility: visible;
}

.event-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #121212;
    border-radius: 20px;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-overlay.active .event-popup {
    transform: translate(-50%, -50%) scale(1);
}

.event-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.event-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.event-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 30px 20px 20px;
    border-bottom: 1px solid #333;
}

.event-date {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.event-day {
    color: #667eea;
    font-size: 16px;
}

.event-content {
    padding: 30px;
}

.event-image {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 25px;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.event-image:hover img {
    transform: scale(1.05);
}

.event-title {
    color: #fff;
    font-size: 28px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.event-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 16px;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.event-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.event-footer {
    padding: 20px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.event-nav-btn {
    background: #2d2d2d;
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.event-nav-btn:hover {
    background: #3d3d3d;
}

.event-action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.event-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
       
    position: fixed;
    bottom: 100px;    /* 20px vom unteren Rand */
    left: 10px;      /* 20px vom linken Rand */
    
    }
    
    .calendar-container {
        width: 95%;
        max-height: 85vh;
    }
    
    .calendar-controls {
        gap: 5px;
    }
    
    .calendar-current-month {
        min-width: 150px;
        font-size: 16px;
        padding: 0 10px;
    }
    
    .calendar-day {
        font-size: 14px;
    }
    
    .calendar-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .event-popup {
        width: 95%;
    }
    
    .event-image {
        height: 200px;
    }
    
    .event-title {
        font-size: 24px;
    }
    
    .event-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        padding: 10px;
    }
    
    .calendar-weekdays,
    .calendar-days {
        gap: 5px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .event-content {
        padding: 20px;
    }
    
    .event-title {
        font-size: 20px;
    }
}
}