/* style.css - Chronos Mobil (Complete) */

/* Globales Box-Sizing für korrekte Breitenberechnung */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    
    background-color: #1d1d1d;
    background-image: url('icon-chronos.png'); /* Falls vorhanden */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 80%;
    background-attachment: fixed;
    
    color: #333;
    min-height: 100vh;
    
    display: flex;
    flex-direction: column;
    align-items: stretch; 
    
    padding-top: 0; 
    padding-bottom: 90px; /* Platz für Nav */
}

/* --- CONTAINER & LAYOUT --- */
.container {
    width: 100%;
    max-width: none;
    margin: 0; 
    margin-bottom: 1px; 
    
    background-color: rgba(255, 255, 255, 0.98);
    padding: 20px 20px; 
    
    border-radius: 0; 
    box-shadow: none; 
    border-bottom: 1px solid #e0e0e0;
}

.hidden {
    display: none !important;
}

/* --- HEADER --- */
.header-bar {
    background-color: #f0f8ff;
    border-bottom: 1px solid #b8daff;
    color: #004085;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-size: 1.2rem;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
}

/* --- LISTENANZEIGE (KARTEN) --- */
#stempel-display {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-top: 10px;
}

.stempel-zeile {
    background-color: rgba(255, 255, 255, 0.98);
    width: 100%;
    margin-bottom: 12px;
    padding: 22px 20px;
    
    border-radius: 12px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.3rem;
}

.stempel-zeile span:nth-child(2) { 
    font-weight: bold; 
    color: #222; 
    text-align: right; 
}

.stempel-zeile span:nth-child(1) {
    color: #555;
}

/* --- BUTTONS --- */
.button {
    width: 100%;
    height: 70px; /* Groß und klickbar */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.1s;
    text-decoration: none; /* Für Links, die wie Buttons aussehen */
}
.button:active { transform: scale(0.98); }

.btn-green { background-color: #4CAF50; }
.btn-red   { background-color: #f44336; }
.btn-blue  { background-color: #007aff; }
.btn-orange{ background-color: #FF9800; }
.btn-grey  { background-color: #757575; }

/* --- ACTION WRAPPER (UNTEN FIXIERT) --- */
.action-wrapper {
    position: fixed;
    bottom: 60px; /* Über der Nav */
    left: 0;
    width: 100%;
    background: rgba(30, 30, 30, 0.95);
    padding: 15px 15px 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 90;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
}

.button-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* --- STATUS & TEXTE --- */
.status-msg {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: #fff;
    width: 100%;
    font-size: 1.1rem;
}

h3, h4 { margin-top: 0; margin-bottom: 15px; color: #333; font-size: 1.3rem; }

/* --- INPUTS --- */
.input-field {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    border-bottom: 3px solid #007aff;
    background-color: #f9f9f9;
    font-size: 1.2rem;
}
.small-input {
    padding: 10px;
    font-size: 1rem;
}

/* --- NAVIGATION (TABS) --- */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #222;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    border-top: 1px solid #444;
}

.nav-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0;
    flex-grow: 1;
    height: 100%;
    text-transform: uppercase;
    cursor: pointer;
}
.nav-btn.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border-top: 4px solid #00e5ff;
}

/* --- MENÜ / OVERLAY --- */
.overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000; /* Sehr hoch, damit es über allem liegt */
    
    /* Flexbox für Positionierung */
    display: flex; 
    justify-content: center;
    align-items: flex-start; /* WICHTIG: Nicht 'center', sonst wird oben abgeschnitten! */
    
    /* Scrolling aktivieren */
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* WICHTIG für iOS: Weiches Scrollen */
    
    /* Platz schaffen */
    padding: 20px 10px; 
    
    /* Blureffekt */
    backdrop-filter: blur(4px);
}

.overlay-content {
    background: white; 
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    padding: 20px;
    
    /* Trick für Zentrierung bei kurzem Inhalt, aber Scrollen bei langem Inhalt */
    margin: auto; 
    
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 15px;
    border-top: 1px solid #eee;
}

.menu-link {
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    padding: 18px 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    color: #333;
    font-weight: 500;
    transition: background 0.2s;
}
.menu-link:active { background-color: #f0f0f0; }

.btn-back {
    background: none;
    border: none;
    color: #007aff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 15px;
    display: inline-block;
}

/* Modus Switcher (Radio Buttons Optik) */
.mode-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.mode-option {
    flex: 1;
    position: relative;
}
.mode-option input {
    position: absolute;
    opacity: 0;
}
.mode-label {
    display: block;
    padding: 12px;
    text-align: center;
    background: #eee;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    font-weight: bold;
}
.mode-option input:checked + .mode-label {
    background: #e3f2fd;
    border-color: #007aff;
    color: #007aff;
}

/* Settings Rows */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: bold;
}
.setting-input-group {
    margin-bottom: 12px;
}
.setting-input-group label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

/* --- REISE TIMELINE --- */
.timeline-container {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    position: relative;
    padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px; top: 30px; bottom: 0;
    width: 2px; background: #ddd;
}
.timeline-item:last-child::before { display: none; }

.timeline-icon {
    width: 30px; height: 30px;
    background: #007aff; color: white;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    z-index: 1; margin-right: 15px; flex-shrink: 0;
}

.timeline-content {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    flex-grow: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.timeline-label { font-size: 0.75rem; text-transform: uppercase; color: #007aff; display: block; margin-bottom: 2px; }
.timeline-time { font-size: 0.85rem; color: #888; display: block; }
.timeline-loc { font-weight: bold; font-size: 1.1rem; color: #333; }

/* --- IN-APP HILFE (ACCORDION) --- */
.help-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.help-item summary {
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    background-color: #f9f9f9;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.help-item summary::-webkit-details-marker { display: none; }

.help-item summary::after {
    content: '+'; 
    font-size: 1.5rem;
    font-weight: bold;
    color: #007aff;
    line-height: 1;
}
.help-item[open] summary::after {
    content: '−';
    color: #555;
}

.help-content {
    padding: 15px;
    border-top: 1px solid #eee;
    font-size: 0.95rem;
    color: #444;
    background: #fff;
    line-height: 1.5;
}
.help-content ul, .help-content ol {
    margin-top: 5px; margin-bottom: 5px; padding-left: 20px;
}

/* --- DESKTOP ANPASSUNG --- */
@media (min-width: 600px) {
    body { align-items: center; padding-top: 30px; }
    .container, .action-wrapper, .status-msg, .overlay-content {
        width: 100%; max-width: 500px; border-radius: 12px;
    }
    .action-wrapper { 
        position: static; background: transparent; box-shadow: none; padding: 0; margin-bottom: 20px;
    }
    .header-bar { border-radius: 12px; margin-bottom: 20px; }
}

.btn-ghost {
    background-color: transparent;
    border: 1px dashed #ccc;
    color: #999;
    box-shadow: none;
    height: 40px; /* Deutlich flacher */
    font-size: 0.9rem; /* Kleinere Schrift */
    margin-top: 15px;
    transition: all 0.2s;
}

.btn-ghost:active {
    background-color: #f5f5f5;
    transform: scale(0.98);
}

