:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-bottom: 70px;
}

header {
    background-color: var(--primary);
    color: #fff;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    margin: 0 auto;
}

.menu-button {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.4rem;
    width: auto;
    padding: 0 4px;
    line-height: 1;
    cursor: pointer;
}

.menu-panel {
    position: absolute;
    right: 12px;
    top: 58px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
    min-width: 190px;
    overflow: hidden;
    display: none;
    z-index: 120;
}

.menu-panel.open {
    display: block;
}

.menu-link {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    color: #1f1f1f;
    border: 0;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-weight: 600;
}

.menu-link:last-child {
    border-bottom: 0;
}

.menu-link:hover {
    background: #f3f6f5;
}

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

.view {
    display: none;
    animation: fadeIn 0.3s;
}

.view.active {
    display: block;
}

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

.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary);
}

.card.route {
    border-left-color: #1565c0;
}

.card h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.card .time-loc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card p {
    margin: 0;
    font-size: 0.95rem;
}

.day-group {
    margin-bottom: 18px;
}

.day-group-title {
    margin: 14px 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4b5563;
    text-transform: capitalize;
}

.card.time-past {
    opacity: 0.52;
    filter: grayscale(0.25);
}

.card.time-past h3,
.card.time-past p,
.card.time-past .time-loc {
    text-decoration: line-through;
}

.card.time-current {
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.25), 0 4px 14px rgba(0, 0, 0, 0.08);
}

.card.time-next {
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2), 0 4px 14px rgba(0, 0, 0, 0.08);
}

.section-title {
    margin: 22px 0 10px;
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.muted-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.status-planmaessig { background: #e8f5e9; color: #1b5e20; }
.status-verschoben { background: #fff8e1; color: #ef6c00; }
.status-abgesagt { background: #ffebee; color: #b71c1c; }

.meta-note {
    margin-top: 8px;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.external-link {
    margin-top: 10px;
}

.external-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--primary-dark);
}

button:disabled {
    background-color: #9e9e9e;
}

.btn-secondary {
    margin-bottom: 15px;
    background-color: #1976d2;
}

.btn-danger {
    background-color: #d32f2f;
}

.alert {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
}

.alert.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    text-align: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    flex: 1;
    padding: 5px;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary);
    font-weight: bold;
}

.nav-icon {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 2px;
}

.details-btn {
    margin-top: 10px;
    width: auto;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal-panel {
    position: relative;
    margin: 30px auto;
    width: min(92vw, 640px);
    max-height: calc(100vh - 60px);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    padding: 14px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-close {
    width: auto;
    padding: 6px 10px;
    font-size: 0.9rem;
}

.detail-map {
    height: 280px;
    border-radius: 8px;
    margin-top: 10px;
}

.modal-actions {
    margin-top: 12px;
}
