* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --text-primary: #2D3436;
    --text-secondary: #636E72;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #FFF5E4 0%, #FFE3E3 50%, #E8F5E9 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   BUBBLES
============================================ */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: floatBubble linear infinite;
}

@keyframes floatBubble {
    0% {
        transform: translateY(100vh) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-10vh) scale(1) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   LANDING PAGE
============================================ */
.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #FFECD2 0%, #FCB69F 50%, #FF9A9E 100%);
    animation: gradientShift 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.glass-card {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 28px;
    padding: 50px 45px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(255,107,157,0.15);
    text-align: center;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.logo-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 5px;
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #FF6B9D, #C44DFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-glass {
    width: 100%;
    padding: 16px 22px;
    border: 2px solid rgba(255,107,157,0.2);
    border-radius: 16px;
    background: rgba(255,255,255,0.5);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.input-glass::placeholder {
    color: rgba(0,0,0,0.3);
}

.input-glass:focus {
    border-color: #FF6B9D;
    box-shadow: 0 0 0 4px rgba(255,107,157,0.1);
    background: rgba(255,255,255,0.8);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #FF6B9D, #C44DFF);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 25px rgba(255,107,157,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255,107,157,0.4);
}

.error-msg {
    background: rgba(255,107,107,0.1);
    border: 2px solid rgba(255,107,107,0.2);
    color: #FF6B6B;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 16px;
    opacity: 0.6;
}

.footer-note {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ============================================
   DASHBOARD
============================================ */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #FFF5E4 0%, #FFE3E3 50%, #E8F5E9 100%);
}

.sidebar {
    width: 250px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(20px);
    border-right: 2px solid rgba(255,255,255,0.3);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px;
}

.brand-icon {
    font-size: 2.2rem;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #FF6B9D, #C44DFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: rgba(255,107,157,0.08);
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(255,107,157,0.12);
    color: #FF6B9D;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.3rem;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

.visitor-badge {
    background: rgba(255,107,157,0.08);
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

.main-content {
    margin-left: 250px;
    padding: 30px 40px 60px;
    flex: 1;
    min-height: 100vh;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 20px 25px;
    background: rgba(255,255,255,0.4);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.content-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.date-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-icon {
    background: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.btn-icon:hover {
    background: rgba(255,255,255,0.8);
    transform: rotate(20deg);
}

.card-glass {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 28px;
    padding: 30px 35px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.card-glass:hover {
    box-shadow: 0 20px 60px rgba(255,107,157,0.15);
    transform: translateY(-3px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.badge {
    background: linear-gradient(135deg, #FF6B9D, #C44DFF);
    color: #fff;
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.mood-btn {
    background: rgba(255,255,255,0.4);
    border: 3px solid transparent;
    border-radius: 18px;
    padding: 14px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mood-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255,255,255,0.7);
    box-shadow: 0 10px 25px rgba(255,107,157,0.15);
}

.mood-btn.active {
    border-color: #FF6B9D;
    background: rgba(255,107,157,0.1);
    box-shadow: 0 10px 25px rgba(255,107,157,0.2);
}

.mood-btn .mood-emoji {
    font-size: 2.2rem;
    display: block;
}

.mood-btn .mood-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.mood-note-input {
    margin-top: 15px;
}

.mood-note-input .input-glass {
    padding: 12px 18px;
    font-size: 0.9rem;
}

.chart-container {
    margin-top: 25px;
    height: 200px;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 500;
    padding: 15px 25px;
    border-left: 4px solid #FF6B9D;
    background: rgba(255,255,255,0.3);
    border-radius: 16px;
    margin-bottom: 20px;
}

.question-answer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.memory-card {
    background: rgba(255,255,255,0.4);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.memory-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255,107,157,0.15);
}

.memory-placeholder {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: rgba(255,255,255,0.2);
}

.memory-caption {
    padding: 12px 16px 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.memory-date {
    display: block;
    padding: 0 16px 16px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    .glass-card {
        padding: 35px 25px;
    }
    .title {
        font-size: 2rem;
    }
    .mood-grid {
        gap: 8px;
    }
    .mood-btn .mood-emoji {
        font-size: 1.8rem;
    }
    .mood-btn .mood-label {
        font-size: 0.5rem;
    }
    .memories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .content-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .content-header h1 {
        font-size: 1.3rem;
    }
    .card-glass {
        padding: 20px;
    }
    .question-text {
        font-size: 1.1rem;
        padding: 12px 16px;
    }
}

/* ============================================
   DARK MODE
============================================ */
body.light-mode {
    background: linear-gradient(135deg, #2D3436 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
}

body.light-mode .hero-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #2D3436 50%, #16213e 100%);
}

body.light-mode .glass-card {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

body.light-mode .dashboard-container {
    background: linear-gradient(135deg, #2D3436 0%, #1a1a2e 50%, #16213e 100%);
}

body.light-mode .sidebar {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.05);
}

body.light-mode .card-glass {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

body.light-mode .content-header {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

body.light-mode .input-glass {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #fff;
}

body.light-mode .input-glass::placeholder {
    color: rgba(255,255,255,0.3);
}

body.light-mode .input-glass:focus {
    background: rgba(255,255,255,0.08);
}

body.light-mode .mood-btn {
    background: rgba(255,255,255,0.03);
}

body.light-mode .mood-btn:hover {
    background: rgba(255,255,255,0.08);
}

body.light-mode .memory-card {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

body.light-mode .btn-icon {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    color: #fff;
}

body.light-mode .question-text {
    background: rgba(255,255,255,0.03);
}

body.light-mode .visitor-badge {
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.6);
}

body.light-mode .brand-name {
    -webkit-text-fill-color: #fff;
}

body.light-mode .error-msg {
    background: rgba(255,107,107,0.1);
    border-color: rgba(255,107,107,0.2);
    color: #FF6B6B;
}

body.light-mode .answer-item {
    background: rgba(255,255,255,0.05);
}

body.light-mode .answer-item:hover {
    background: rgba(255,255,255,0.1);
}

body.light-mode .today-answer-box {
    background: rgba(255,107,157,0.05);
    border-color: rgba(255,107,157,0.1);
}

body.light-mode .footer-note {
    color: rgba(255,255,255,0.3);
}

body.light-mode .hint {
    color: rgba(255,255,255,0.4);
}