/* ==========================================================================
   App Styles — A Note For You
   Note cards, time-of-day palettes, animations
   ========================================================================== */

/* ==========================================================================
   Time-of-Day Palette Shifts
   ========================================================================== */

body.time-morning {
    --bg-primary: #FFFCF5;
    background-color: var(--bg-primary);
}

body.time-afternoon {
    --bg-primary: #F8FAFF;
    background-color: var(--bg-primary);
}

body.time-evening {
    --bg-primary: #FDF8F3;
    background-color: var(--bg-primary);
}

body.time-night {
    --bg-primary: #111118;
    --bg-secondary: #1A1A24;
    --bg-card: #1E1E2A;
    --text-primary: #E8E8F0;
    --text-secondary: #8888A0;
    --border: #2A2A3A;
    --border-hover: #3A3A4A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.time-night .navbar {
    background: rgba(30,30,42,0.85) !important;
    border-bottom-color: var(--border);
}

body.time-night .navbar-brand {
    color: var(--text-primary) !important;
}

body.time-night .nav-link {
    color: var(--text-secondary) !important;
}

body.time-night .nav-link:hover {
    color: var(--text-primary) !important;
}

body.time-night .note-card {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: var(--shadow-md);
}

body.time-night .note-card .note-text {
    color: var(--text-primary);
}

body.time-night .btn-outline-dark {
    border-color: var(--border);
    color: var(--text-primary);
}

body.time-night .btn-outline-dark:hover {
    background-color: var(--border);
    color: #fff;
}

/* ==========================================================================
   Hero / Landing Section
   ========================================================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

.hero-logo {
    text-decoration: none;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.hero-logo img {
    height: 48px;
    width: auto;
}

.hero-logo:hover {
    opacity: 0.8;
}

.navbar-logo {
    height: 32px;
    width: auto;
}

.whisper {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.2s;
}

/* ==========================================================================
   Note Card
   ========================================================================== */

.note-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 2rem 1rem;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    animation: slideUp 0.5s ease forwards;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.note-card.note-exit {
    animation: slideOut 0.3s ease forwards;
}

.note-card .note-accent {
    display: none;
}

.note-accent-coral   { background: linear-gradient(180deg, #FF6363, #FF8A8A); }
.note-accent-mint    { background: linear-gradient(180deg, #34C77B, #6FE0A8); }
.note-accent-lavender{ background: linear-gradient(180deg, #A78BFA, #C4B5FD); }
.note-accent-gold    { background: linear-gradient(180deg, #F5A623, #FDCB6E); }
.note-accent-sky     { background: linear-gradient(180deg, #3B82F6, #60A5FA); }

.note-card .note-text {
    font-family: var(--font-note);
    font-size: 1.5rem;
    line-height: 1.75;
    color: var(--text-primary);
    margin: 0;
    word-wrap: break-word;
    font-weight: 400;
    text-align: center;
}

.note-card .note-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1rem;
}

.note-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.note-action-btn:hover {
    color: var(--accent-coral);
    background: rgba(255, 99, 99, 0.06);
    transform: scale(1.05);
}

.note-action-btn.hearted {
    color: var(--accent-coral);
}

.note-action-btn .heart-count {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================================================
   Below Note Actions
   ========================================================================== */

.note-controls {
    max-width: 640px;
    margin: 2rem auto 0;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-another {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: opacity 0.2s, border-color 0.2s;
    padding: 0;
}

.btn-another:hover {
    opacity: 0.8;
    border-color: rgba(0, 0, 0, 0.3);
}

.btn-another:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

body.time-night .btn-another {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
}

body.time-night .btn-another:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.footer-leave-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-button);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0.7;
    text-decoration: none;
    margin-bottom: 0.75rem;
    padding: 0.4rem 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 100px;
    transition: opacity 0.2s, border-color 0.2s;
}

.footer-leave-note:hover {
    opacity: 1;
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.4);
}

body.time-night .footer-leave-note {
    border-color: rgba(255, 255, 255, 0.15);
}

body.time-night .footer-leave-note:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Category Badge
   ========================================================================== */

.category-badge {
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Submit Page
   ========================================================================== */

.submit-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.char-counter {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 0.5rem;
}

.char-counter.over-limit {
    color: var(--accent-coral);
    font-weight: 600;
}

.submit-note-textarea {
    font-family: var(--font-note);
    font-size: 1.2rem;
    line-height: 1.7;
    min-height: 200px;
}

/* ==========================================================================
   Single Note Page (Shared)
   ========================================================================== */

.shared-note-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.shared-note-intro {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0.6;
}

.shared-note-outro {
    margin-top: 2.5rem;
}

.shared-note-outro a {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.8rem;
}

.shared-note-more {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Share Modal
   ========================================================================== */

.share-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.share-option-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.share-option-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.share-option-btn:active {
    transform: scale(0.98);
}

.share-copied {
    color: var(--accent-mint);
    font-weight: 600;
}

/* ==========================================================================
   Login Page
   ========================================================================== */

.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    max-width: 420px;
    width: 100%;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes heartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.heart-pop {
    animation: heartPop 0.3s ease;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .note-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg);
    }

    .note-card .note-text {
        font-size: 1.25rem;
    }

    .hero-section {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .note-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius);
    }

    .note-card .note-text {
        font-size: 1.15rem;
    }

    .note-controls {
        flex-direction: column;
        align-items: stretch;
    }
}
