/* GENERAL SETTINGS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #fbf7ef;
    --white: #ffffff;
    --brown: #573c30;
    --dark: #352820;
    --orange: #bd704b;
    --light-orange: #f5e6d9;
    --muted: #938477;
    --border: #eadfd2;
    --green: #63896c;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--cream);
    color: var(--dark);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.app-container {
    max-width: 1440px;
    margin: auto;
    padding: 0 7%;
}

/* NAVIGATION */

.navbar {
    min-height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    height: 45px;
    width: 45px;
    display: grid;
    place-items: center;
    background: var(--orange);
    color: white;
    font-size: 27px;
    border-radius: 13px;
}

.brand h2 {
    font-family: Georgia, serif;
    font-size: 21px;
    color: var(--brown);
}

.brand span {
    color: var(--muted);
    font-size: 12px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.privacy-label,
.ai-status {
    font-size: 12px;
    color: var(--muted);
}

.ai-status {
    display: flex;
    gap: 7px;
    align-items: center;
}

.status-dot {
    height: 9px;
    width: 9px;
    border-radius: 50%;
    background: #d7a44b;
}

.status-dot.online {
    background: #65a276;
}

.status-dot.offline {
    background: #c66b5c;
}

/* HERO SECTION */

.hero {
    padding: 85px 0 75px;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    max-width: 600px;
}

.eyebrow {
    color: var(--orange);
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: 700;
}

.hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 500;
    line-height: 1.15;
    margin: 18px 0;
    color: var(--brown);
}

.hero h1 em {
    color: var(--orange);
    font-weight: 400;
}

.hero-content>p {
    max-width: 520px;
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 28px;
}

.primary-btn {
    background: var(--brown);
    color: white;
    border: none;
    border-radius: 7px;
    padding: 14px 25px;
    font-weight: 600;
    transition: 0.3s;
}

.primary-btn:hover {
    background: var(--orange);
    transform: translateY(-2px);
}

.hero-decoration {
    text-align: center;
    min-width: 230px;
}

.lantern-circle {
    height: 225px;
    width: 225px;
    border-radius: 50%;
    background: #f3e8da;
    display: grid;
    place-items: center;
    position: relative;
    margin: auto;
    box-shadow: 0 15px 45px #b28c6330;
}

.lantern {
    font-size: 105px;
    animation: glow 3s infinite ease-in-out;
}

.spark {
    position: absolute;
    color: var(--orange);
    font-size: 24px;
}

.spark-one {
    top: 35px;
    left: 25px;
}

.spark-two {
    right: 25px;
    top: 65px;
}

.spark-three {
    bottom: 28px;
    left: 45px;
}

.hero-decoration>p {
    color: var(--muted);
    font-family: Georgia, serif;
    font-style: italic;
    margin-top: 20px;
}

@keyframes glow {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

/* STATISTICS */

.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 45px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 23px;
}

.stat-card>span {
    height: 45px;
    width: 45px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--light-orange);
    font-size: 23px;
}

.stat-card h2 {
    font-size: 25px;
    color: var(--brown);
}

.stat-card p {
    font-size: 12px;
    color: var(--muted);
}

/* MAIN WORKSPACE */

.workspace {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 25px;
    align-items: start;
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 30px;
    min-width: 0;
}

.section-number {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--orange);
    font-weight: 700;
    margin-bottom: 8px;
}

.section-heading h2,
.ai-heading h2 {
    font-family: Georgia, serif;
    color: var(--brown);
    font-size: 27px;
    font-weight: 500;
    margin-bottom: 5px;
}

.section-heading p,
.ai-heading>p {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 25px;
}

/* FORM */

label {
    display: block;
    color: var(--brown);
    font-weight: 600;
    font-size: 12px;
    margin: 17px 0 7px;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    background: #fdfbf8;
    padding: 12px;
    border-radius: 7px;
    color: var(--dark);
    font-size: 13px;
    outline: none;
    transition: 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px #bd704b15;
}

textarea {
    resize: vertical;
    min-height: 125px;
}

input::placeholder,
textarea::placeholder {
    color: #b1a49a;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ai-tip {
    margin: 16px 0;
    padding: 10px;
    background: #f9f2e9;
    color: #8c725a;
    border-radius: 7px;
    font-size: 11px;
}

.ai-tip span {
    color: var(--orange);
    font-size: 15px;
    margin-right: 5px;
}

.ai-btn,
.save-btn {
    width: 100%;
    border-radius: 7px;
    padding: 13px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    transition: 0.2s;
}

.ai-btn {
    background: white;
    color: var(--orange);
    border: 1px solid var(--orange);
}

.ai-btn:hover {
    background: var(--light-orange);
}

.save-btn {
    background: var(--brown);
    color: white;
    border: none;
}

.save-btn:hover {
    background: var(--orange);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message {
    font-size: 12px;
    margin-top: 10px;
    color: var(--green);
    min-height: 18px;
}

/* MEMORY ARCHIVE */

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding-left: 12px;
    background: #fdfbf8;
}

.search-box>span {
    font-size: 23px;
    color: var(--orange);
}

.search-box input {
    border: none;
    background: transparent;
    box-shadow: none;
}

.search-box input:focus {
    box-shadow: none;
}

.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 20px 0;
}

.filter-row span {
    color: var(--muted);
    font-size: 12px;
}

.filter-row select {
    width: auto;
    max-width: 145px;
    padding: 8px;
    font-size: 11px;
}

.memory-list {
    display: grid;
    gap: 15px;
}

.memory-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    transition: 0.2s;
    background: #fffdfa;
}

.memory-card:hover {
    border-color: #d7a48a;
    transform: translateY(-2px);
}

.card-top,
.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.category-pill {
    background: var(--light-orange);
    color: var(--orange);
    border-radius: 30px;
    padding: 5px 11px;
    font-size: 10px;
    font-weight: 600;
}

.delete-btn {
    border: none;
    background: transparent;
    color: #b67a70;
    font-size: 11px;
}

.delete-btn:hover {
    color: #a83232;
}

.memory-card h3 {
    font-family: Georgia, serif;
    font-weight: 500;
    color: var(--brown);
    font-size: 19px;
    margin: 12px 0 3px;
}

.memory-meta {
    color: var(--muted);
    font-size: 11px;
}

.card-story {
    color: #786c60;
    font-size: 13px;
    line-height: 1.7;
    margin: 12px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.card-bottom {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    color: var(--muted);
    font-size: 10px;
}

.empty-state {
    text-align: center;
    padding: 45px 15px;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

.empty-state span {
    font-size: 35px;
}

.empty-state h3 {
    font-family: Georgia, serif;
    color: var(--brown);
    margin: 12px 0 5px;
}

.empty-state p {
    color: var(--muted);
    font-size: 12px;
}

/* AI ASSISTANT */

.ai-section {
    margin: 65px 0;
}

.ai-heading {
    margin-bottom: 20px;
}

.assistant-box {
    background: #f0e7da;
    border-radius: 13px;
    padding: 30px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.assistant-icon {
    height: 50px;
    min-width: 50px;
    background: var(--brown);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 27px;
}

.assistant-content {
    flex: 1;
    min-width: 0;
}

.assistant-content h3 {
    font-family: Georgia, serif;
    font-size: 21px;
    color: var(--brown);
}

.assistant-description {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 18px;
}

.question-box {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 5px;
    gap: 5px;
}

.question-box input {
    border: none;
    background: transparent;
    box-shadow: none;
}

.question-box button {
    border: none;
    background: var(--brown);
    color: white;
    border-radius: 6px;
    padding: 10px 18px;
    white-space: nowrap;
}

.question-box button:hover {
    background: var(--orange);
}

.ai-answer {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 18px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--brown);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.8;
}

/* FOOTER */

footer {
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
}

.footer-brand {
    color: var(--brown);
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 600;
}

footer p {
    font-size: 12px;
    color: var(--muted);
    margin: 5px 0;
}

footer>span {
    font-size: 10px;
    color: #b1a49a;
}

/* RESPONSIVE DESIGN */

@media (max-width: 950px) {

    .app-container {
        padding: 0 4%;
    }

    .workspace {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-decoration {
        min-width: 180px;
    }

    .lantern-circle {
        height: 180px;
        width: 180px;
    }
}

@media (max-width: 650px) {

    .navbar {
        padding: 18px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-right {
        gap: 10px;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 50px 0;
    }

    .hero-decoration {
        align-self: center;
        margin-top: 10px;
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .panel {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .assistant-box {
        flex-direction: column;
        padding: 20px;
    }

    .question-box {
        flex-direction: column;
    }

    .question-box button {
        padding: 12px;
    }

    .filter-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-row select {
        width: 100%;
        max-width: none;
    }

}