/* ========================= */
/* 🌙 Dark Theme Hauptdesign */
/* ========================= */

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #0d0d0d; /* Fallback-Farbe */
    background: -webkit-linear-gradient(45deg, #0d0d0d, #1f1f1f, #3b3b3b, #1f1f1f, #0d0d0d);
    background: -moz-linear-gradient(45deg, #0d0d0d, #1f1f1f, #3b3b3b, #1f1f1f, #0d0d0d);
    background: linear-gradient(45deg, #0d0d0d, #1f1f1f, #3b3b3b, #1f1f1f, #0d0d0d);
    background-size: 200% 200%;
    animation: waveGradient 10s ease-in-out infinite;
    overflow-x: hidden !important;
    position: relative;
}

/* Animierter Hintergrund mit mehr Dynamik */
@keyframes waveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Neon-Glow-Effekt für den Body */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(187, 134, 252, 0.1) 10%, transparent 20%);
    background-size: 20px 20px;
    z-index: -1;
    animation: glow 3s infinite alternate;
}

@keyframes glow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Überschriften mit coolen Animationen */
h1 {
    font-size: 3rem;
    margin: 20px 0;
    text-align: center;
    animation: float 3s ease-in-out infinite, fadeIn 1.5s ease-in-out;
    color: #ff79c6; /* Farbe aus der zweiten Datei */
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* Menü mit coolen Effekten */
.menu {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.menu input[type="checkbox"] { display: none; }

.menu label {
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.menu label:hover {
    color: #bb86fc;
    transform: rotate(90deg);
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #222;
    position: absolute;
    top: 50px;
    right: 0;
    display: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-in-out;
}

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

.menu ul li {
    padding: 10px;
    transition: background 0.3s ease;
}

.menu ul li:hover {
    background: #333;
}

.menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.menu ul li a:hover {
    color: #bb86fc;
}

.menu input[type="checkbox"]:checked ~ ul { display: block; }

/* Container mit Hover-Effekt */
.container {
    width: 80%;
    max-width: 600px;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    margin-top: 50px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

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

/* Formular-Styling mit Hover-Effekten */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

label {
    margin: 10px 0 5px;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: none;
    background: #2a2a2a;
    color: white;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    background: #3a3a3a;
    outline: none;
    box-shadow: 0 0 10px rgba(187, 134, 252, 0.5);
}

/* Buttons mit coolen Animationen */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #444;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    background-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:disabled {
    background-color: #222 !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* Bildvorschau mit Animation */
#imagePreview {
    max-width: 100%;
    max-height: 200px;
    display: none;
    margin-top: 10px;
    border-radius: 5px;
    animation: fadeIn 0.5s ease-in-out;
}

/* Timeline-Styling */
.timeline-container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    position: relative;
}

.timeline {
    position: relative;
    padding: 40px 0;
    list-style: none;
}

/* Horizontale Linie */
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px; /* Linie auf mobilen Geräten links ausrichten */
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #bb86fc, #3700b3);
    animation: lineGlow 2s infinite alternate;
}

/* Startlinie am Anfang der Timeline (ganz unten) */
.timeline::after {
    content: "";
    position: absolute;
    bottom: -10px; /* Position der Startlinie */
    left: 20px; /* An der Linie ausrichten */
    width: 20px;
    height: 4px;
    background: #bb86fc;
    transform: translateX(-50%);
}

/* Pfeil am Ende der Timeline */
.timeline-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 20px; /* An der Linie ausrichten */
    width: 0;
    height: 0;
    border-left: 10px solid transparent; /* Dreieck-Form */
    border-right: 10px solid transparent;
    border-bottom: 15px solid #bb86fc; /* Pfeil nach oben */
    transform: translateX(-50%) translateY(-100%);
    animation: arrowPulse 1.5s infinite;
}

@keyframes lineGlow {
    0% { box-shadow: 0 0 10px rgba(187, 134, 252, 0.5); }
    100% { box-shadow: 0 0 20px rgba(187, 134, 252, 0.8); }
}

@keyframes arrowPulse {
    0% { opacity: 0.5; transform: translateX(-50%) translateY(-100%); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-120%); }
    100% { opacity: 0.5; transform: translateX(-50%) translateY(-100%); }
}

/* Timeline-Einträge */
.timeline-item {
    position: relative;
    width: 100%; /* Volle Breite auf mobilen Geräten */
    padding: 20px;
    background: #2a2a2a;
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease-in-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-left: 40px; /* Abstand zur Linie */
}

.timeline-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* Punkte auf der Linie */
.timeline-item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -30px; /* Punkt an der Linie ausrichten */
    width: 20px;
    height: 20px;
    background: #bb86fc;
    border: 4px solid #3700b3;
    border-radius: 50%;
    transform: translateY(-50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Pfeile für die Einträge */
.timeline-item::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -10px; /* Pfeil an der Linie ausrichten */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #2a2a2a transparent transparent;
    transform: translateY(-50%);
}

/*Dark Mode preference */
@media (prefers-color-scheme: dark) {
    body {
        background: #0d0d0d !important;
        color: white !important;
    }
    h1, h2, h3, p {
        color: #bb86fc !important;
    }
    button {
        background-color: #3700b3 !important;
        color: white !important;
    }
    table {
        background-color: #1a1a1a !important;
    }
}

/* Responsive Design für die Timeline */
@media (min-width: 769px) {
    /* Desktop-Ansicht */
    .timeline::before {
        left: 50%; /* Linie in der Mitte */
        transform: translateX(-50%);
    }

    .timeline::after {
        left: 50%; /* Startlinie in der Mitte */
        transform: translateX(-50%);
    }

    .timeline-container::after {
        left: 50%; /* Pfeil in der Mitte */
        transform: translateX(-50%) translateY(-100%);
    }

    .timeline-item {
        width: 45%; /* Einträge nebeneinander */
        margin-left: 0;
    }

    .timeline-item:nth-child(odd) {
        left: 0;
    }

    .timeline-item:nth-child(even) {
        left: 55%;
    }

    .timeline-item::before {
        left: auto;
        right: -30px; /* Punkte rechts für ungerade Einträge */
    }

    .timeline-item:nth-child(even)::before {
        left: -30px; /* Punkte links für gerade Einträge */
        right: auto;
    }

    .timeline-item::after {
        left: auto;
        right: -10px; /* Pfeil rechts für ungerade Einträge */
        border-width: 10px 0 10px 10px;
        border-color: transparent transparent transparent #2a2a2a;
    }

    .timeline-item:nth-child(even)::after {
        left: -10px; /* Pfeil links für gerade Einträge */
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent #2a2a2a transparent transparent;
    }
}

/* Bilder in der Timeline */
.timeline-item img {
    width: 100%; /* Ursprüngliche Breite beibehalten */
    max-width: 300px; /* Maximale Breite für Bilder */
    border-radius: 8px;
    margin-top: 10px;
    transition: transform 0.3s ease;
}

.timeline-item img:hover {
    transform: scale(1.05);
}

/* Responsive Design für die Timeline */
@media (max-width: 768px) {
    .timeline-item img {
        width: 100%; /* Volle Breite auf mobilen Geräten */
        max-width: 100%; /* Maximale Breite auf mobilen Geräten */
    }
}

/* Add Button für Timeline */
/* Button-Stil */
.add-entry-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #bb86fc, #3700b3);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Hover-Effekt */
.add-entry-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #3700b3, #bb86fc);
}

/* Aktive Animation (beim Klicken) */
.add-entry-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .add-entry-button {
        width: 100%; /* Volle Breite auf mobilen Geräten */
        padding: 14px 28px; /* Etwas größerer Button für mobile Geräte */
        font-size: 18px;
    }
}

/* Galerie mit coolen Hover-Effekten */
.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    justify-content: center;
    align-items: center;
    max-width: 90%;
    margin: 20px auto;
}

.gallery img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.gallery img:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
}

/* Lightbox mit Animation */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-in-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    animation: zoomIn 0.5s ease-in-out;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox .close-btn:hover {
    color: #bb86fc;
}

/* Responsive Design */
@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }
    p, #timer {
        font-size: 1.2rem;
    }
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 400px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Index-Seite: Überschrift und Timer */
.index-container h1 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite, fadeIn 1.5s ease-in-out;
}

.index-container p {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Timer */
#timer {
    font-size: 2rem;
    text-align: center;
    line-height: 1.5;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 20px;
    animation: pulse 2s infinite;
    font-weight: bold;
    color: #bb86fc;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Med_Tracker Kalender CSS */

/* Kalender-Container */
table {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Kalender-Header (Wochentage) */
th {
    background-color: #bb86fc;
    color: #0d0d0d;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

/* Kalender-Zellen */
td {
    padding: 10px;
    text-align: center;
    color: #ffffff;
    border: 1px solid #333;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover-Effekt für Kalender-Zellen */
td:hover {
    transform: scale(1.1);
    background-color: #333;
}

/* Farben für Einnahme-Status */
td[style*="background-color: #8BC34A"] {
    background-color: #8BC34A !important; /* Vollständig eingenommen */
}

td[style*="background-color: #FFEB3B"] {
    background-color: #FFEB3B !important; /* Teilweise eingenommen */
    color: #0d0d0d;
}

td[style*="background-color: #F44336"] {
    background-color: #F44336 !important; /* Nicht eingenommen */
}

td[style*="background-color: #BBBBBB"] {
    background-color: #BBBBBB !important; /* Zukünftige Tage */
    color: #0d0d0d;
}

/* Buttons für Einnahme */
form button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #444;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px;
}

form button:hover {
    background-color: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

form button:disabled {
    background-color: #333 !important;
    color: #666 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Buttons für Monatsnavigation */
form[method="get"] button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #bb86fc;
    color: #0d0d0d;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px;
}

form[method="get"] button:hover {
    background-color: #3700b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

form[method="get"] button:disabled {
    background-color: #666 !important;
    color: #999 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Überschrift und Datum */
h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #bb86fc;
}

p {
    text-align: center;
    color: #ffffff;
    margin-bottom: 20px;
}

/*Unsichtbare Elemente entfernen*/
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
}

/* Responsive Design für kleinere Bildschirme */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    form button {
        width: 100%;
        margin: 5px 0;
    }

    form[method="get"] button {
        width: 100%;
        margin: 5px 0;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 8px;
    }
}

/* ======================== */
/* 📊 HRT-Tracker Styling */
/* ======================== */

#hrt-tracker {
    width: 90%;
    max-width: 850px;
    margin: 40px auto;
    padding: 25px;
    background: rgba(24, 24, 24, 0.85);
    color: white;
    border-radius: 12px;
    box-shadow: 0px 10px 20px rgba(255, 105, 180, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 105, 180, 0.3);
}

/* Fortschrittsanzeige */
.timelineee-item {
    background: rgba(34, 34, 34, 0.85);
    padding: 20px;
    margin: 12px 0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0px 4px 10px rgba(255, 105, 180, 0.1);
    border: 1px solid rgba(255, 105, 180, 0.2);
}

/* Symbol + Titel */
.effect-box {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #ff69b4;
}

/* ================================== */
/* 📏 Klassische, statische Fortschrittsbalken */
/* ================================== */

.progress-bar {
    width: 100%;
    height: 14px;
    background: #222;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0px 0px 5px rgba(255, 255, 255, 0.2);
}

/* Fortschrittsanzeige */
.progress {
    height: 100%;
    background: linear-gradient(90deg, #ff69b4, #ff1493);
    border-radius: 20px;
    position: relative;
    transition: width 1s ease-in-out;
}