body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #0f0f0f; /* Sehr dunkles Grau statt tiefschwarz */
    background: radial-gradient(circle at top, #1c1c1c 0%, #0f0f0f 100%);
    font-family: 'Inter', Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    color: white;
}

/* Container für das gesamte Layout */
.main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    padding: 40px 20px;
    box-sizing: border-box;
    gap: 40px;
}

/* Zeit Sektion */
.time-section {
    text-align: center;
    margin-top: 5vh;
}

.current-time {
    font-size: 5rem;
    font-weight: 500;
    letter-spacing: -2px;
}

.current-date {
    font-size: 1.2rem;
    opacity: 0.6;
    margin-top: 10px;
}

/* Sektion für Widgets (Wetter, etc.) - Modular aufgebaut */
.widgets-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin-top: 2vh;
}

/* Zentrale Sektion für die Suche */
.search-section {
    width: 100%;
    max-width: 650px;
    margin: 5vh auto 0 auto;
    transition: all 0.3s ease;
}

/* Favoriten Styling */
.favorites-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 50px;
    width: 100%;
}

.favorite-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    width: 80px;
    gap: 12px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.favorite-item:hover {
    transform: translateY(-8px);
}

.favorite-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.favorite-item:hover .favorite-icon {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.favorite-icon span {
    font-size: 30px;
}

.favorite-label {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
    text-align: center;
    white-space: nowrap;
}

/* Wetter Card Styling - Kompakter & Horizontal */
.weather-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 12px 20px;
    color: white;
    width: fit-content;
    max-width: 900px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

.weather-content-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.weather-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 20px;
}

.weather-temp {
    font-size: 24px;
    font-weight: 500;
}

.weather-details-horizontal {
    display: flex;
    gap: 20px;
    align-items: center;
}

.weather-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.weather-detail-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-detail-value {
    font-size: 13px;
    font-weight: 500;
}

.weather-condition {
    font-size: 13px;
    opacity: 0.8;
}

/* Restliche Styles beibehalten und aufräumen */
.search-container {
    position: relative;
    width: 100%;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .widgets-section {
        justify-content: center;
    }
    
    .weather-details-horizontal {
        gap: 10px;
        justify-content: center;
    }

    .search-section {
        margin-top: 5vh;
    }

    .weather-card {
        width: 100%;
        max-width: 100%;
    }

    .favorites-container {
        gap: 15px;
        margin-top: 30px;
    }

    .favorite-item {
        width: 70px;
    }

    .favorite-icon {
        width: 50px;
        height: 50px;
    }

    .favorite-icon span {
        font-size: 24px;
    }
}

.weather-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.weather-temp {
    font-size: 32px;
    font-weight: 500;
}

.weather-condition {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weather-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.weather-detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
}

.search-container {
    width: 100%;
    margin-top: 0;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    background: white;
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    /* overflow: hidden; entfernt, damit Liste absolut positioniert werden kann */
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%; /* Zentriert innerhalb des Inputs */
    transform: translateY(-50%);
    color: #5f6368;
    pointer-events: none;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.search-box {
    width: 100%;
    padding: 14px 20px 14px 56px;
    font-size: 16px;
    border: none;
    outline: none;
    background: transparent;
    box-sizing: border-box;
    height: 48px; /* Feste Höhe für bessere Zentrierung des Icons */
}

.suggestions-list {
    position: absolute; /* Absolut positioniert, damit sie über dem Layout schwebt */
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 24px 24px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    display: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border-top: 1px solid #f1f3f4;
}

/* Anpassung der Suchleiste, wenn Vorschläge da sind */
.search-input-wrapper.has-suggestions {
    border-radius: 24px 24px 0 0;
}

.suggestions-list li {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestions-list li:hover {
    background-color: #f1f3f4;
}

.suggestion-icon {
    margin-right: 16px;
    color: #70757a;
    font-size: 20px;
}

.suggestion-content {
    display: flex;
    flex-direction: column;
}

.suggestion-text {
    color: #202124;
    font-size: 16px;
    font-weight: 400;
}

.suggestion-subtitle {
    font-size: 12px;
    color: #70757a;
    margin-top: 2px;
}
/* User Overlay & Login */
.user-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.login-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 5px 15px 5px 5px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(40, 40, 40, 0.95); /* Helleres Grau statt fast Schwarz */
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    color: white;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: modalAppear 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.modal-header {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 { 
    margin: 0; 
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
}

.close-modal {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 24px;
    color: white;
}

.close-modal:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.settings-group {
    margin-bottom: 25px;
}

.settings-group h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4a90e2; /* Schindler Blau oder Standard Blau */
    margin-bottom: 15px;
    opacity: 1;
}

.input-row {
    display: flex;
    flex-direction: column; /* Label über Input */
    gap: 8px;
    margin-bottom: 20px;
}

.input-row label { 
    font-size: 0.85rem; 
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.input-row input[type="text"],
.input-row input[type="email"],
.input-row input[type="password"],
.input-row input[type="number"] {
    background: white; /* Weiß für hohen Kontrast */
    border: 1px solid #ccc;
    border-radius: 12px;
    color: #333; /* Dunkler Text auf weißem Grund */
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.input-row input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
}

#auth-error {
    color: #ffffff;
    background: #d32f2f; /* Kräftiges Rot */
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-top: 15px;
    display: none;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.input-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4a90e2;
}

/* Favorites Edit List */
.favorites-edit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.fav-edit-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.fav-edit-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.fav-edit-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 30px;
}

.fav-edit-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2px 8px;
    flex: 1.2;
}

.icon-preview-display {
    font-size: 20px;
    color: #4a90e2;
    min-width: 24px;
    text-align: center;
}

.fav-edit-item input {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    color: white !important;
    font-size: 0.85rem !important;
    padding: 6px 10px !important;
    width: 100% !important;
    outline: none;
    transition: border-color 0.2s;
}

.fav-edit-icon {
    border: none !important;
    background: transparent !important;
    padding: 4px !important;
    font-size: 0.8rem !important;
}

.fav-edit-item input:focus {
    border-color: #4a90e2 !important;
}

.remove-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    color: rgba(255, 77, 77, 0.6);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.remove-fav-btn:hover {
    color: #ff4d4d;
    transform: scale(1.1);
}

.add-btn {
    background: rgba(74, 144, 226, 0.1);
    border: 1px dashed rgba(74, 144, 226, 0.4);
    color: #4a90e2;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.add-btn:hover {
    background: rgba(74, 144, 226, 0.15);
    border-color: #4a90e2;
}

.settings-note {
    font-size: 0.7rem;
    opacity: 0.4;
    font-style: italic;
}

.modal-footer {
    padding: 15px 20px;
    background: rgba(0,0,0,0.2);
    display: flex;
    justify-content: flex-end;
}

.save-button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.save-button:hover { background: #357abd; }

.favorites-edit-list::-webkit-scrollbar { width: 4px; }
.favorites-edit-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* Scrollbar styling for modal body */
.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* Logout Button */
.logout-btn {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    background: rgba(255, 77, 77, 0.05);
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    transition: 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 77, 77, 0.1);
}
