/* css/style.css */
:root {
    --bg-gradient: linear-gradient(135deg, #0f0f12 0%, #1a1a2e 100%);
    --primary: #a855f7; /* Violett vom neuen Design */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.8);
}

/* WICHTIG: html Tag stylen für iOS Statusbar */
html {
    background-color: #0f0f12; 
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding-top: env(safe-area-inset-top); 
    padding-bottom: env(safe-area-inset-bottom);
}

[v-cloak] { display: none; }

/* --- Layouts --- */
.page {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto; /* Scroll container */
    overflow-x: hidden;
    padding-bottom: 110px; /* Platz für Nav */
    -webkit-overflow-scrolling: touch;
}

/* Fix für Scrolling in Reminders & Counter */
.content-wrapper {
    height: calc(100vh - 140px); 
    overflow-y: auto; 
    padding: 20px;
    padding-bottom: 100px; 
    -webkit-overflow-scrolling: touch; 
}

.login-container, .centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 20px;
    animation: fadeInUp 0.6s ease-out;
}
/* nö 
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
} */

/* --- NEU: UNIVERSAL STICKY HEADER --- */
.sticky-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px 20px;
    position: sticky; 
    top: 0; 
    z-index: 40; 
    background: rgba(15, 15, 18, 0.95); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

/* --- Components --- */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

/* Neues Card Design aus Mändy Games */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

input, textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: white;
    width: 100%;
    font-size: 16px;
    padding: 14px;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    margin-bottom: 15px;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

button {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    width: 100%;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
button:active { transform: scale(0.97); }

/* --- MEMORY ELEMENTS --- */
.view-slider {
    background: rgba(0,0,0,0.3); border-radius: 20px; display: flex; padding: 4px;
    position: relative; width: 200px;
}
.slider-bg {
    position: absolute; top: 4px; left: 4px; bottom: 4px; width: 50%;
    background: var(--primary); border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slider-bg.right { transform: translateX(96px); }
.slider-opt {
    flex: 1; text-align: center; padding: 8px 0; font-size: 14px; font-weight: bold; z-index: 2;
    cursor: pointer; color: rgba(255,255,255,0.6); transition: color 0.3s;
}
.slider-opt.active { color: white; }

.upload-btn-mini {
    background: rgba(255,255,255,0.1); width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--primary); padding: 0; box-shadow: none;
}

.date-header {
    font-size: 14px; font-weight: bold; color: rgba(255,255,255,0.6);
    margin: 20px 20px 10px 20px; text-transform: uppercase; letter-spacing: 1px;
}

/* Grid View */
.grid-view { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 0 2px; }
.grid-item { aspect-ratio: 1; overflow: hidden; position: relative; background: rgba(255,255,255,0.05); }
.grid-item img { width: 100%; height: 100%; object-fit: cover; }

/* Detail View */
.carousel-view {
    display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    height: calc(100vh - 160px); width: 100vw; align-items: center;
}
.carousel-view::-webkit-scrollbar { display: none; }
.carousel-card {
    min-width: 100vw; width: 100vw; height: 100%; scroll-snap-align: center; scroll-snap-stop: always;
    position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.card-header {
    width: 90%; display: flex; justify-content: space-between; font-size: 12px; color: #e9d5ff; margin-bottom: 10px;
}
.card-image-wrapper {
    width: 95%; height: 70vh; border-radius: 33px; overflow: hidden;
    background: black; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
}
.card-image { width: 100%; height: 100%; object-fit: contain; }
.card-footer {
    width: 90%; margin-top: 15px; display: flex; justify-content: space-between; align-items: flex-start;
}
.caption-text { font-size: 16px; color: rgba(255,255,255,0.9); line-height: 1.4; text-align: left; max-width: 80%; }
.trash-btn { background: transparent; color: #f87171; padding: 10px; width: auto; box-shadow: none; }

/* --- REMINDERS (NOTES) --- */
.big-add-btn { margin-bottom: 20px; }
.note-item {
    background: rgba(255,255,255,0.08); padding: 15px; border-radius: 16px;
    margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
}

/* --- NAV (NEUES SCHWEBENDES DESIGN) --- */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 15px;
  right: 15px;
  height: 70px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000;
}

.nav-item {
  flex: 1;
  text-decoration: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* --- MODALS --- */
.fullscreen-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 15, 18, 0.95); z-index: 200;
    padding: 20px; padding-top: 60px; display: flex; flex-direction: column; backdrop-filter: blur(10px);
}
.modal-header {
    position: absolute; top: 0; left: 0; right: 0; height: 60px;
    display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 10;
}
.close-btn {
    background: rgba(255,255,255,0.1); width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: none;
}

/* Container für die Detail-Ansicht (Snap) */
.carousel-view {
    height: calc(100vh - 140px); 
    overflow-y: scroll;
    scroll-snap-type: y mandatory; 
    padding-bottom: 80px;
}

/* Container für die TikTok-Ansicht (Seamless) */
.seamless-view {
    height: calc(100vh - 140px);
    overflow-y: scroll;
    padding-bottom: 80px;
}

.carousel-card {
    height: 80vh; 
    width: 100%;
    scroll-snap-align: start; 
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../stitch.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover; 
    opacity: 0.08; 
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
}