:root {
    --brand-pink: #FF005A;
    --brand-cyan: #25F4EE;
    --bottom-nav-height: 90px;
    --background-color: #000;
    --background-color-light: #121212;
    --background-color-grey: #2a2a2a;
    --text-color: #fff;
    --text-color-secondary: #aaa;
}

/* === GENERAL & SETUP === */
html, body { height: 100%; width: 100%; overflow: hidden; margin: 0; background-color: var(--background-color); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--text-color); }
#app-container { height: 100%; width: 100%; position: relative; box-sizing: border-box; }
.profile-view #app-container, .feed-view #app-container { padding-bottom: var(--bottom-nav-height); }
a { text-decoration: none; color: inherit; }

/* === PRELOADER SPINNER === */
#preloader { position: fixed; left: 0; top: 0; z-index: 9999; width: 100%; height: 100%; background: #000; display: flex; justify-content: center; align-items: center; transition: opacity 0.3s ease; }
.loader { width: 50px; height: 50px; border: 5px solid var(--background-color-grey); border-top-color: var(--brand-pink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === FEED VIEW === */
#discovery-feed { height: 100%; width: 100%; position: relative; scroll-snap-type: y mandatory; overflow-y: scroll; scroll-behavior: smooth; }
.feed-item {
    width: 100%; height: 100%;
    position: relative; scroll-snap-align: start;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--background-color-light);
    cursor: pointer; /* Cursor zeigt Klickbarkeit des gesamten Bereichs an */
}
.feed-video { width: 100%; height: 100%; object-fit: cover; }
.top-center-text-container { position: absolute; top: 15vh; left: 5%; width: 90%; text-align: center; pointer-events: none; z-index: 5; }
.social-text { font-size: 1.8rem; font-weight: 800; line-height: 1.3; color: #fff; text-shadow: 2px 2px 5px rgba(0,0,0,0.8); margin: 0; }
.video-overlay { position: absolute; bottom: 0; left: 0; width: 100%; color: var(--text-color); padding: 15px; padding-bottom: 20px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.0) 60%); opacity: 0; transition: opacity 0.3s ease-in-out; pointer-events: none; }
.feed-item.is-visible .video-overlay { opacity: 1; }
.video-ui-container { display: flex; align-items: flex-end; width: 100%; gap: 15px; }
.video-ui-left { flex-grow: 1; pointer-events: auto; }
.video-ui-right { display: flex; flex-direction: column; gap: 28px; align-items: center; pointer-events: auto; flex-shrink: 0; }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-info img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.user-info .username { font-weight: 700; }
.experience-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.experience-location { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 500; opacity: 0.9; }
.experience-location i { color: var(--brand-cyan); font-size: 1rem; }
.action-icon { display: flex; flex-direction: column; align-items: center; cursor: pointer; background: none; border: none; color: white; padding: 0; text-decoration: none; }
.action-icon .fa-solid, .action-icon .fa-regular { font-size: 32px; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.action-icon.saved .fa-star { color: var(--brand-pink); transform: scale(1.1); font-weight: 900; }
.action-icon span { font-size: 13px; font-weight: 600; margin-top: 5px; }

/* === MODALE PANELS (Kommentare & Share) === */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; }
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-panel { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #181818; color: white; z-index: 1001; border-radius: 16px 16px 0 0; transform: translateY(100%); transition: transform 0.3s ease-in-out; display: flex; flex-direction: column; }
.modal-panel.visible { transform: translateY(0); }
#comments-panel { height: 60vh; max-height: 500px; }
.comments-header { display: flex; justify-content: center; align-items: center; padding: 15px; border-bottom: 1px solid #333; position: relative; flex-shrink: 0; }
.comments-header h4 { margin: 0; font-size: 1rem; font-weight: 600; }
#close-comments { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
#comments-list { flex-grow: 1; overflow-y: auto; padding: 15px; }
.comment-item { display: flex; gap: 12px; margin-bottom: 20px; }
.comment-item img { width: 35px; height: 35px; border-radius: 50%; flex-shrink: 0; }
.comment-content span { font-size: 0.8rem; font-weight: 600; color: var(--text-color-secondary); }
.comment-content p { margin: 4px 0 0 0; font-size: 0.9rem; line-height: 1.4; }
.comment-input-box { display: flex; gap: 10px; align-items: center; padding: 10px 15px; border-top: 1px solid #333; flex-shrink: 0; }
.comment-input-box img { width: 35px; height: 35px; border-radius: 50%; }
.comment-input-box input { flex-grow: 1; background: #333; border: 1px solid #444; border-radius: 20px; padding: 8px 15px; color: white; font-size: 0.9rem; }
.comment-input-box input::placeholder { color: #888; }
.comment-input-box button { background: none; border: none; color: var(--brand-pink); font-weight: 600; cursor: pointer; }
#share-panel { padding: 20px; box-sizing: border-box; }
#share-panel h4 { text-align: center; margin: 0 0 25px 0; font-size: 1rem; font-weight: 600; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 25px; }
.share-option { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.share-option i { font-size: 2.5rem; width: 60px; height: 60px; border-radius: 50%; background-color: var(--background-color-grey); display: flex; justify-content: center; align-items: center; }
.share-option span { font-size: 0.8rem; color: var(--text-color-secondary); }
.share-link-box { display: flex; align-items: center; background-color: var(--background-color-grey); border-radius: 8px; padding: 5px; }
.share-link-box i { padding: 0 10px; color: var(--text-color-secondary); }
.share-link-box input { flex-grow: 1; background: none; border: none; color: white; font-size: 0.9rem; }
#copy-link-btn { background-color: var(--brand-pink); color: white; border: none; border-radius: 5px; padding: 8px 15px; font-weight: 600; cursor: pointer; }

/* === PROFILE VIEW === */
body.profile-view { overflow-y: auto; }
.profile-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; position: fixed; top: 0; width: 100%; z-index: 10; background-color: var(--background-color); box-sizing: border-box; }
.profile-header h3 { margin: 0; font-weight: 700; }
.profile-header .back-button, .profile-header .header-placeholder { color: white; font-size: 1.2rem; width: 30px; }
.profile-content { padding: 70px 0 100px 0; }
.profile-info-box { display: flex; flex-direction: column; align-items: center; padding: 0 15px 20px 15px; }
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; }
.profile-stats { display: flex; justify-content: space-around; width: 100%; max-width: 300px; text-align: center; margin-bottom: 20px; }
.profile-stats span { font-size: 1.1rem; font-weight: 700; }
.profile-stats p { font-size: 0.9rem; color: var(--text-color-secondary); margin: 4px 0 0 0;}
.profile-bio { text-align: center; margin-bottom: 20px; line-height: 1.5; font-size: 0.95rem; }
.profile-action-btn { width: 100%; max-width: 250px; padding: 12px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; font-size: 1rem; background-color: var(--background-color-grey); color: white; }
.profile-action-btn.primary { background: var(--brand-pink); }
.profile-tabs { display: flex; border-bottom: 1px solid var(--background-color-grey); }
.tab-item { flex: 1; text-align: center; padding: 15px; font-size: 1.5rem; color: var(--text-color-secondary); cursor: pointer; position: relative; }
.tab-item.active { color: var(--text-color); }
.tab-item.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background-color: var(--text-color); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.post-grid-item { position: relative; aspect-ratio: 1 / 1.3; }
.post-grid-placeholder { width: 100%; height: 100%; background-color: var(--background-color-grey); display: flex; justify-content: center; align-items: center; color: rgba(255, 255, 255, 0.5); font-size: 2rem; }
.grid-empty-message { text-align: center; color: #aaa; grid-column: 1 / -1; padding: 20px; }
.bucket-list { padding: 15px; }
.bucket-list-item { display: flex; align-items: center; gap: 15px; background-color: var(--background-color-light); padding: 15px; border-radius: 12px; margin-bottom: 10px; }
.item-icon { font-size: 1.5rem; color: var(--brand-cyan); width: 30px; text-align: center; }
.item-info { flex-grow: 1; }
.item-info h4 { font-size: 1rem; font-weight: 600; margin: 0 0 4px 0; }
.item-info p { font-size: 0.85rem; margin: 0; color: var(--text-color-secondary); }
.item-action { font-size: 1rem; color: var(--text-color-secondary); cursor: pointer; }

/* === BOTTOM NAVIGATION === */
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--bottom-nav-height); background-color: var(--background-color); color: #fff; display: flex; justify-content: space-around; align-items: center; z-index: 100; padding: 10px 10px 25px 10px; border-top: 1px solid #222; box-sizing: border-box; }
.nav-item { display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-color-secondary); text-decoration: none; transition: color 0.2s; }
.nav-item i { font-size: 24px; margin-bottom: 5px; }
.nav-item.active { color: var(--text-color); }
.nav-item.create-btn { width: 50px; height: 34px; border-radius: 10px; display: flex; justify-content: center; align-items: center; background: linear-gradient(to right, var(--brand-cyan), var(--brand-pink)); }
.nav-item.create-btn i { font-size: 20px; color: #fff; margin: 0; }