/* ============================================================
   UNIVERSE REDESIGN — full-section scroll layout
   ============================================================ */

/* Kill any backdrop-filter bleed from old styles.css inside our sections */
.full-section,
.full-section * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Scroll Progress Bar */
.scroll-bar {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #f093fb, #4ecdc4, #f6d365);
    background-size: 300% 100%;
    animation: barShimmer 3s linear infinite;
    z-index: 9999;
    width: 0%;
    transition: width 0.15s linear;
}
@keyframes barShimmer {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Side Dot Navigation */
.dot-nav {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1000;
}
.dot-link {
    display: block;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: 2px solid rgba(255,255,255,0.55);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    text-decoration: none;
}
.dot-link::after {
    content: attr(data-label);
    position: absolute;
    right: 20px; top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.dot-link:hover::after,
.dot-link.active::after { opacity: 1; }
.dot-link.active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(255,255,255,0.6);
}
.dot-link:hover { background: rgba(255,255,255,0.75); transform: scale(1.25); }

/* Full Section Base */
.full-section {
    position: relative;
    min-height: 100vh;
    padding: 90px 0 130px;
    overflow: hidden;
}
.sec-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Wave Divider */
.wave-div {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    line-height: 0;
    z-index: 1;
}
.wave-div svg { display: block; width: 100%; height: 80px; }

/* Section Header */
.sec-header { text-align: center; margin-bottom: 3rem; }
.sec-header h2 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.sec-header p { font-size: 1.05rem; color: rgba(255,255,255,0.7); font-weight: 300; }
.sec-header-dark h2 { color: #1a1a2e !important; text-shadow: none !important; }
.sec-header-dark p  { color: rgba(0,0,0,0.55) !important; }

/* Shared Add Row */
.add-row {
    display: flex;
    gap: 1rem;
    max-width: 580px;
    margin: 2rem auto 0;
}
.add-input {
    flex: 1;
    padding: 0.85rem 1.4rem;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    transition: all 0.3s ease;
}
.add-input::placeholder { color: rgba(255,255,255,0.5); }
.add-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.22);
}
.add-btn {
    padding: 0.85rem 1.6rem;
    border-radius: 50px;
    border: none;
    background: rgba(255,255,255,0.22);
    color: #fff;
    font-size: 0.9rem; font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    white-space: nowrap;
}
.add-btn:hover { background: rgba(255,255,255,0.38); transform: scale(1.05); }
.add-btn:active { transform: scale(0.97); }

/* ---- THEMES: CSS custom properties ---- */
:root {
    --sec-friends-grad:     linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --sec-oneliners-grad:   linear-gradient(135deg, #c0392b 0%, #e91e8c 100%);
    --sec-birthday-grad:    linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --sec-suggestions-grad: linear-gradient(135deg, #0d7377 0%, #38ef7d 100%);
    --sec-routine-grad:     linear-gradient(135deg, #2c3e8c 0%, #8e54e9 100%);
    --sec-workouts-grad:    linear-gradient(135deg, #c0392b 0%, #f39c12 100%);
    --sec-food-grad:        linear-gradient(135deg, #0a3d62 0%, #30cfd0 100%);
    --sec-galaxy-grad:      linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}
[data-theme="ocean"] {
    --sec-friends-grad:     linear-gradient(135deg, #1a6891 0%, #00b4db 100%);
    --sec-oneliners-grad:   linear-gradient(135deg, #0052d4 0%, #4364f7 100%);
    --sec-birthday-grad:    linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    --sec-suggestions-grad: linear-gradient(135deg, #005c97 0%, #363795 100%);
    --sec-routine-grad:     linear-gradient(135deg, #0093e9 0%, #80d0c7 100%);
    --sec-workouts-grad:    linear-gradient(135deg, #1cb5e0 0%, #000851 100%);
    --sec-food-grad:        linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --sec-galaxy-grad:      linear-gradient(135deg, #000428 0%, #004e92 100%);
}
[data-theme="forest"] {
    --sec-friends-grad:     linear-gradient(135deg, #2d6a4f 0%, #74c69d 100%);
    --sec-oneliners-grad:   linear-gradient(135deg, #1b4332 0%, #52b788 100%);
    --sec-birthday-grad:    linear-gradient(135deg, #a8dadc 0%, #457b9d 100%);
    --sec-suggestions-grad: linear-gradient(135deg, #40916c 0%, #d8f3dc 100%);
    --sec-routine-grad:     linear-gradient(135deg, #2d6a4f 0%, #95d5b2 100%);
    --sec-workouts-grad:    linear-gradient(135deg, #1b4332 0%, #40916c 100%);
    --sec-food-grad:        linear-gradient(135deg, #52b788 0%, #b7e4c7 100%);
    --sec-galaxy-grad:      linear-gradient(135deg, #081c15 0%, #1b4332 50%, #2d6a4f 100%);
}
[data-theme="sunset"] {
    --sec-friends-grad:     linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --sec-oneliners-grad:   linear-gradient(135deg, #f953c6 0%, #b91d73 100%);
    --sec-birthday-grad:    linear-gradient(135deg, #f6d365 0%, #f093fb 100%);
    --sec-suggestions-grad: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --sec-routine-grad:     linear-gradient(135deg, #fc4a1a 0%, #f7b733 100%);
    --sec-workouts-grad:    linear-gradient(135deg, #8e0e00 0%, #1f1f1f 100%);
    --sec-food-grad:        linear-gradient(135deg, #ee9ca7 0%, #ffdde1 100%);
    --sec-galaxy-grad:      linear-gradient(135deg, #1c0a00 0%, #6b3fa0 50%, #24243e 100%);
}
[data-theme="minimal"] {
    --sec-friends-grad:     linear-gradient(135deg, #2c2c2c 0%, #4a4a4a 100%);
    --sec-oneliners-grad:   linear-gradient(135deg, #1a1a1a 0%, #3d3d3d 100%);
    --sec-birthday-grad:    linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    --sec-suggestions-grad: linear-gradient(135deg, #37474f 0%, #546e7a 100%);
    --sec-routine-grad:     linear-gradient(135deg, #212121 0%, #484848 100%);
    --sec-workouts-grad:    linear-gradient(135deg, #263238 0%, #37474f 100%);
    --sec-food-grad:        linear-gradient(135deg, #424242 0%, #616161 100%);
    --sec-galaxy-grad:      linear-gradient(135deg, #0a0a0a 0%, #1c1c1c 50%, #0a0a0a 100%);
}

/* ---- SECTION BACKGROUNDS ---- */
.sec-friends     { background: var(--sec-friends-grad); }
.sec-oneliners   { background: var(--sec-oneliners-grad); }
.sec-birthday    { background: var(--sec-birthday-grad); }
.sec-suggestions { background: var(--sec-suggestions-grad); }
.sec-routine     { background: var(--sec-routine-grad); }
.sec-workouts    { background: var(--sec-workouts-grad); }
.sec-food        { background: var(--sec-food-grad); }
.sec-galaxy      { background: var(--sec-galaxy-grad); }

/* ---- FRIENDS ---- */
.sec-friends .friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}
.sec-friends .friend-card {
    background: rgba(255,255,255,0.2) !important;
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.25) !important;
    border-radius: 20px !important;
    padding: 1.6rem !important;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    color: #fff;
    box-shadow: none !important;
}
.sec-friends .friend-card:hover { transform: translateY(-6px) !important; background: rgba(255,255,255,0.22) !important; }
.sec-friends .friend-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; color: #fff !important; }
.sec-friends .think-count {
    font-size: 2.5rem; font-weight: 800;
    color: rgba(255,255,255,0.95) !important;
    margin-bottom: 0.8rem;
    font-family: 'Space Mono', monospace;
    display: block;
}
.sec-friends .think-btn {
    background: rgba(255,255,255,0.3) !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
    color: #fff !important;
    padding: 0.55rem 1.2rem !important;
    border-radius: 30px !important;
    cursor: pointer;
    font-size: 0.85rem; font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    width: 100%;
    text-transform: none !important;
}
.sec-friends .think-btn:hover { background: rgba(255,255,255,0.35) !important; transform: scale(1.04); }
@keyframes countPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.sec-friends .delete-btn {
    position: absolute; top: 10px; right: 12px;
    background: none !important; border: none !important;
    color: rgba(255,255,255,0.35) !important; cursor: pointer;
    font-size: 0.9rem; transition: color 0.2s;
}
.sec-friends .delete-btn:hover { color: rgba(255,100,100,0.8) !important; }

/* ---- ONE-LINERS ---- */
.oneliners-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    min-height: 80px;
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}
.oneliner-card {
    background: rgba(255,255,255,0.2);
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 18px;
    padding: 1.1rem 1.4rem;
    max-width: 380px;
    position: relative;
    transition: all 0.3s ease;
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.oneliner-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.2); }
.oneliner-text {
    font-size: 0.95rem; color: #fff; font-weight: 500;
    line-height: 1.5; font-style: italic; margin-bottom: 0.8rem;
}
.oneliner-text::before { content: '\201C'; font-size: 1.4rem; vertical-align: -0.3rem; opacity: 0.5; margin-right: 1px; }
.oneliner-text::after  { content: '\201D'; font-size: 1.4rem; vertical-align: -0.3rem; opacity: 0.5; margin-left: 1px; }
.card-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
}
.like-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.25rem 0.7rem;
    border-radius: 30px;
    cursor: pointer; font-size: 0.82rem;
    display: flex; align-items: center; gap: 4px;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}
.like-btn:hover { background: rgba(255,255,255,0.18); transform: scale(1.1); }
.like-btn.liked { background: rgba(255,80,80,0.35); border-color: #ff6b6b; }
.del-x {
    background: none; border: none;
    color: rgba(255,255,255,0.3); cursor: pointer;
    font-size: 0.95rem; padding: 0 4px;
    transition: color 0.2s;
}
.del-x:hover { color: rgba(255,100,100,0.8); }

/* ---- BIRTHDAY / OCCASIONS ---- */
.occasions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.4rem;
}
.occasion-card {
    background: rgba(255,255,255,0.32);
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #1a1a2e;
    transition: all 0.3s ease;
}
.occasion-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,0.46);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.occ-icon { font-size: 3rem; margin-bottom: 0.8rem; }
.occasion-card h3 { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; margin-bottom: 0.3rem; }
.occ-date {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(0,0,0,0.45); margin-bottom: 0.5rem;
}
.occasion-card p { font-size: 0.88rem; color: rgba(0,0,0,0.6); }

/* ---- SUGGESTIONS ---- */
.suggestions-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
    min-height: 80px;
}
.suggestion-card {
    background: rgba(255,255,255,0.22);
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 0.75rem 1.4rem;
    display: flex; align-items: center; gap: 0.75rem;
    color: #fff;
    transition: all 0.3s ease;
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.suggestion-card:hover { transform: scale(1.05); background: rgba(255,255,255,0.26); }
.sug-text { font-size: 0.92rem; font-weight: 500; }
.sug-like-btn {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff; border-radius: 30px;
    padding: 0.2rem 0.65rem; cursor: pointer;
    font-size: 0.78rem; transition: all 0.2s;
    display: flex; align-items: center; gap: 3px;
    font-family: 'Poppins', sans-serif;
}
.sug-like-btn:hover { background: rgba(255,255,255,0.35); transform: scale(1.12); }
.sug-like-btn.liked { background: rgba(255,220,0,0.35); border-color: #fee140; }

/* ---- ROUTINE TIMELINE ---- */
.new-timeline {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}
.new-timeline::before {
    content: '';
    position: absolute;
    left: 90px; top: 0; bottom: 0;
    width: 2px;
    background: rgba(255,255,255,0.25);
}
.tl-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    position: relative;
}
.tl-time {
    min-width: 80px;
    font-size: 0.75rem; font-weight: 700;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
}
.tl-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 12px rgba(255,255,255,0.5);
    flex-shrink: 0;
    margin: 0 16px;
    z-index: 1;
}
.tl-content {
    flex: 1;
    background: rgba(255,255,255,0.18);
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 0.85rem 1.2rem;
    transition: all 0.3s ease;
}
.tl-content:hover { background: rgba(255,255,255,0.2); transform: translateX(6px); }
.tl-content h4 { color: #fff; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.15rem; }
.tl-content p  { color: rgba(255,255,255,0.6); font-size: 0.82rem; }

/* ---- WORKOUT GRID ---- */
.new-workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.3rem;
}
.wo-card {
    background: rgba(255,255,255,0.2);
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 20px;
    padding: 1.6rem;
    text-align: center;
    color: #fff;
    transition: all 0.3s ease;
}
.wo-card:hover { transform: translateY(-8px); background: rgba(255,255,255,0.22); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.wo-day {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    padding: 0.25rem 0.9rem;
    border-radius: 30px;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 0.9rem;
}
.wo-emoji { font-size: 2.4rem; margin-bottom: 0.7rem; }
.wo-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.9rem; }
.wo-card ul { list-style: none; padding: 0; text-align: left; margin-bottom: 1rem; }
.wo-card ul li {
    padding: 0.25rem 0 0.25rem 1.1rem;
    font-size: 0.85rem; color: rgba(255,255,255,0.8); position: relative;
}
.wo-card ul li::before { content: '›'; position: absolute; left: 0; opacity: 0.55; }
.wo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    padding: 0.22rem 0.75rem;
    border-radius: 30px;
    font-size: 0.78rem; font-weight: 600;
}

/* ---- FOOD GRID ---- */
.new-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.3rem;
}
.fo-card {
    background: rgba(255,255,255,0.18);
    /* backdrop-filter removed to prevent blur bleed-through during entrance animations */
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 1.8rem 1.3rem;
    text-align: center;
    color: #fff;
    transition: all 0.3s ease;
}
.fo-card:hover { transform: translateY(-8px) scale(1.03); background: rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.fo-emoji { font-size: 3rem; margin-bottom: 0.75rem; display: block; }
.fo-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.fo-card p  { font-size: 0.83rem; color: rgba(255,255,255,0.68); margin-bottom: 0.8rem; }
.fo-tag {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    padding: 0.18rem 0.75rem;
    border-radius: 30px;
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* ---- GALAXY ---- */
.galaxy-title {
    background: linear-gradient(90deg, #f093fb, #f5576c, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sec-galaxy .sec-header p { color: rgba(255,255,255,0.45); }
.sec-galaxy .category { margin-bottom: 3rem; }
.sec-galaxy .category-title { color: #fff !important; font-size: 1.4rem; font-weight: 700; }
.sec-galaxy .category-text  { color: rgba(255,255,255,0.55) !important; margin-bottom: 1.5rem; }

/* ---- SECTION ENTRANCE ANIMATIONS ---- */
/* opacity + transform only — no visibility:hidden (avoids bleed-through artifacts) */
.full-section .sec-header,
.full-section .friends-grid,
.full-section .oneliners-flow,
.full-section .occasions-grid,
.full-section .suggestions-flow,
.full-section .new-timeline,
.full-section .new-workout-grid,
.full-section .new-food-grid,
.full-section #gallery-container,
.full-section .add-row {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.full-section.in-view .sec-header         { opacity: 1; transform: none; transition-delay: 0.05s; }
.full-section.in-view .friends-grid,
.full-section.in-view .oneliners-flow,
.full-section.in-view .occasions-grid,
.full-section.in-view .suggestions-flow,
.full-section.in-view .new-timeline,
.full-section.in-view .new-workout-grid,
.full-section.in-view .new-food-grid,
.full-section.in-view #gallery-container  { opacity: 1; transform: none; transition-delay: 0.2s; }
.full-section.in-view .add-row            { opacity: 1; transform: none; transition-delay: 0.35s; }

/* ============================================================
   AUTH BAR + MODAL
   ============================================================ */

.auth-bar {
    position: fixed;
    top: 12px;
    right: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9998;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 30px;
    padding: 6px 14px;
}
.auth-username { color: #f6d365; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.03em; }

.auth-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}
.auth-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); }
.auth-btn-primary {
    background: linear-gradient(135deg, #f6d365, #fda085);
    border-color: transparent;
    color: #1a1a2e;
    font-weight: 700;
}
.auth-btn-primary:hover { opacity: 0.88; }
.auth-btn-full { width: 100%; margin-top: 4px; padding: 10px; font-size: 0.95rem; box-sizing: border-box; }

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-modal-box {
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 2rem 2.2rem 2.2rem;
    width: min(380px, 92vw);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
.auth-modal-box h3 { color: #f6d365; font-size: 1.4rem; margin: 0 0 4px; text-align: center; }
.auth-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.4rem; cursor: pointer;
    line-height: 1; transition: color 0.2s;
}
.auth-modal-close:hover { color: #fff; }

.auth-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.auth-input:focus { border-color: #f6d365; }
.auth-input::placeholder { color: rgba(255,255,255,0.35); }

.auth-error { color: #ff6b6b; font-size: 0.82rem; min-height: 18px; text-align: center; }

.auth-toggle { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.82rem; margin: 0; }
.auth-link {
    background: none; border: none;
    color: #f6d365; cursor: pointer;
    font-size: inherit; font-family: inherit;
    text-decoration: underline; padding: 0;
}
.auth-link:hover { color: #fda085; }

.login-prompt { text-align: center; padding: 1.2rem; color: rgba(255,255,255,0.55); font-size: 0.9rem; }
.prompt-login-btn {
    background: none; border: none;
    color: #f6d365; cursor: pointer;
    font-size: inherit; font-family: inherit;
    text-decoration: underline; padding: 0;
}
.prompt-login-btn:hover { color: #fda085; }

/* ---- SMALL ADD INPUT ---- */
.add-input-sm {
    flex: 0 0 auto;
    width: 120px;
    min-width: 80px;
}

/* ---- EDIT BUTTON ---- */
.edit-btn {
    display: none;
    background: rgba(246,211,101,0.15);
    border: 1px solid rgba(246,211,101,0.4);
    color: #f6d365;
    border-radius: 6px;
    padding: 3px 7px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    transition: background 0.2s;
}
.edit-btn:hover { background: rgba(246,211,101,0.3); }
body.edit-mode .edit-btn { display: inline-block; }

/* ---- INLINE EDIT FORM ---- */
.inline-edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.inline-edit-form .add-input {
    flex: 1 1 140px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
}
.inline-edit-form textarea.add-input { resize: vertical; }
.inline-edit-form .add-input:focus { border-color: #f6d365; }
.edit-form-actions { display: flex; gap: 8px; flex-basis: 100%; }

/* ---- GALLERY SLIDE OVERLAY ---- */
.carousel-slide { position: relative; }
.slide-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 0 12px 12px;
}
.slide-caption {
    color: #fff;
    font-size: 0.82rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}
.slide-delete-btn {
    display: none;
    background: rgba(220,50,50,0.8);
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.2s;
}
.slide-delete-btn:hover { background: rgba(220,50,50,1); }
body.edit-mode .slide-delete-btn { display: inline-block; }

/* ---- ROUTINE CURRENT TIME SLOT ---- */
.tl-item.tl-current .tl-content {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 18px rgba(246,211,101,0.2);
}
.tl-item.tl-current .tl-dot {
    background: #f6d365;
    box-shadow: 0 0 12px rgba(246,211,101,0.8);
    transform: scale(1.3);
}
.tl-item.tl-current .tl-time {
    color: #f6d365;
    font-weight: 800;
}

/* ---- THEME BUTTON ---- */
.theme-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 20px;
    padding: 4px 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}
.theme-btn:hover { background: rgba(255,255,255,0.15); transform: scale(1.12); }

/* ---- EDIT MODE ---- */
/* Delete buttons hidden in view mode, shown in edit mode */
.del-x { display: none; }
body.edit-mode .del-x { display: inline-block; }
.sec-friends .delete-btn { display: none; }
body.edit-mode .sec-friends .delete-btn { display: inline-block; }
.occasion-card .delete-btn { display: none; }
body.edit-mode .occasion-card .delete-btn { display: inline-block; }

/* Gallery upload button — only visible in edit mode */
.gallery-upload-btn { display: none; }
body.edit-mode .gallery-upload-btn { display: inline-flex; }

/* Add rows inside per-user dynamic containers — hidden in view mode */
#routineDynamic .add-row,
#workoutsDynamic .add-row,
#foodDynamic .add-row { display: none !important; }
body.edit-mode #routineDynamic .add-row,
body.edit-mode #workoutsDynamic .add-row,
body.edit-mode #foodDynamic .add-row { display: flex !important; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
    .auth-bar { right: 12px; top: 8px; padding: 5px 10px; }
    .auth-btn  { padding: 3px 10px; font-size: 0.75rem; }
    .theme-btn { padding: 3px 6px; font-size: 0.9rem; }
    .dot-nav { display: none; }
    .full-section { padding: 60px 0 110px; }
    .new-timeline::before { left: 70px; }
    .tl-time { min-width: 62px; font-size: 0.68rem; }
    .add-row { flex-direction: column; }
    .add-input-sm { width: 100%; }
    .sec-header h2 { font-size: 1.8rem; }
    .tl-content { padding: 0.7rem 1rem; }
}
