/* Variablen */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #e8f0fe;
    --secondary-color: #4285f4;
    --accent-color: #ea4335;
    --background-color: #f5f5f5;
    --card-color: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --success-color: #34a853;
    --warning-color: #fbbc04;
    --error-color: #ea4335;
    --shadow-small: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.14);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-large: 0 10px 15px rgba(0, 0, 0, 0.12), 0 4px 6px rgba(0, 0, 0, 0.08);
    --border-radius-small: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 16px;
    --header-height: 56px;
    --bottom-nav-height: 60px;
    --page-padding: 16px;
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/* Reset und Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body, html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, 
                 Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* App-Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    background-color: var(--background-color);
}

/* App-Header */
.app-header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    background-color: var(--primary-color);
    color: white;
    z-index: 100;
    box-shadow: var(--shadow-small);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--page-padding);
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 500;
}

.header-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
}

.header-button:active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content Area */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--page-padding);
    padding-bottom: calc(var(--bottom-nav-height) + var(--page-padding) + var(--safe-area-inset-bottom));
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Page System */
.page {
    display: none;
    padding-bottom: 20px;
}

.page.active {
    display: block;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Cards */
.card {
    background-color: var(--card-color);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-small);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 16px;
}

/* City Selector */
.city-selector {
    display: flex;
    gap: 10px;
    padding: 16px;
}

.city-option {
    flex: 1;
    cursor: pointer;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--shadow-small);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.city-option.active {
    box-shadow: 0 0 0 3px var(--primary-color), var(--shadow-medium);
}

.city-option:active {
    transform: scale(0.97);
}

.city-image {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    position: relative;
}

.city-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px;
    font-weight: 500;
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
    padding: 0 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.travel-details {
    padding: 16px 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input, select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background-color: var(--card-color);
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.hotel-select {
    margin: 16px;
    width: calc(100% - 32px);
}

/* Touch-optimierte Eingabe */
.touch-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.touch-button {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    cursor: pointer;
    box-shadow: var(--shadow-small);
    transition: all 0.2s ease;
}

.touch-button:active {
    transform: scale(0.92);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.touch-input-container input {
    text-align: center;
    flex: 1;
    padding-right: 5px;
}

.input-suffix {
    font-size: 16px;
    color: var(--text-secondary);
    padding-right: 10px;
}

/* Interessen */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px;
}

.interest-button {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.interest-button i {
    font-size: 24px;
    color: var(--primary-color);
}

.interest-button span {
    font-size: 14px;
    text-align: center;
}

.interest-button.active {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.interest-button:active {
    transform: scale(0.95);
}

/* Buttons */
.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-small);
    transition: all 0.2s ease;
    width: calc(100% - 32px);
    margin: 0 16px 16px 16px;
}

.primary-button:active {
    background-color: var(--primary-dark);
    transform: scale(0.98);
    box-shadow: var(--shadow-small);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-inset-bottom));
    background-color: var(--card-color);
    display: flex;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-bottom: var(--safe-area-inset-bottom);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 10px;
    cursor: pointer;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

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

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 1.5px;
}

/* Explore Tabs */
.explore-tabs {
    display: flex;
    background-color: var(--card-color);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-small);
    margin-bottom: 16px;
    overflow: hidden;
}

.explore-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.explore-tab.active {
    color: var(--primary-color);
    background-color: var(--primary-light);
    font-weight: 500;
}

.explore-tab i {
    font-size: 16px;
}

.explore-content {
    display: none;
}

.explore-content.active {
    display: block;
}

/* Mobilfreundliche Tages-Tabs */
.day-tabs {
    display: flex;
    overflow-x: auto;
    width: 100%;
    background-color: var(--card-color);
    border-radius: var(--border-radius-medium);
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE und Edge */
}

.day-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.day-tab {
    flex: 0 0 auto;
    padding: 12px 20px;
    background-color: var(--card-color);
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    scroll-snap-align: start;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.day-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.day-tab:active {
    background-color: var(--primary-light);
}

/* Tagesinhalte */
.day-tab-contents {
    position: relative;
}

.day-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.day-tab-content.active {
    display: block;
}

/* Tag Header in den Inhalten */
.day-header {
    padding: 12px 16px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    text-align: center;
    border-radius: var(--border-radius-small);
    margin-bottom: 16px;
}

/* Activities */
.activity {
    position: relative;
    background-color: var(--primary-light);
    border-radius: var(--border-radius-small);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-small);
    border-left: 3px solid var(--primary-color);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 8px;
}

.activity-time {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.activity-address {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 5px 0;
}

.activity-price {
    font-weight: 500;
    margin-top: 8px;
    text-align: right;
    font-size: 0.9rem;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding-left: 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--primary-color);
    opacity: 0.3;
}

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 15px;
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Holiday Notice */
.holiday-notice {
    background-color: var(--warning-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-small);
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.holiday-notice i {
    font-size: 18px;
    color: white;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Attractions List */
.attractions-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 4px 0;
}

.attraction-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-small);
}

.attraction-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.attraction-details {
    padding: 16px;
}

.attraction-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.attraction-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.attraction-location i {
    margin-right: 5px;
    font-size: 14px;
}

.attraction-description {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.attraction-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.attraction-price, .attraction-duration {
    display: flex;
    align-items: center;
}

.attraction-price i, .attraction-duration i {
    margin-right: 4px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-color);
    border-radius: var(--border-radius-medium);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    box-shadow: var(--shadow-large);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    border: none;
    background: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-button:active {
    background-color: var(--border-color);
}

/* Zusammenfassung */
.summary-container {
    background-color: var(--card-color);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-small);
    padding: 16px;
    margin-bottom: 16px;
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.summary-content ul {
    list-style-type: none;
    margin-bottom: 16px;
}

.summary-content li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-content li:last-child {
    border-bottom: none;
}

.summary-total {
    font-size: 1.1rem;
    border-top: 2px solid var(--border-color);
    padding-top: 12px;
}

/* Entfernungs-Badge */
.distance-badge {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Animation für den Seitenwechsel */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Media Queries für responsive Design */
@media (min-width: 768px) {
    .attractions-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .interests-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .primary-button {
        max-width: 300px;
        margin: 0 auto 16px auto;
    }
    
    .city-selector {
        padding: 16px 32px;
    }
}