/* ============================================================
   USER FAVORITES
   Novel Archive — Saved Novels
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --burgundy: #6f1d3a;
    --burgundy-dark: #4a1026;
    --burgundy-soft: #f1e4e8;

    --ivory: #f7f1e7;
    --paper: #fffdf8;

    --charcoal: #292525;
    --muted: #756c67;
    --gold: #b18a52;

    --border: #ded4c8;
    --sidebar-bg: #292525;
    --sidebar-text: #ffffff;
    --sidebar-text-soft: #c5bdb8;
    --sidebar-text-muted: #8f8782;
    --sidebar-border: rgba(255, 255, 255, 0.10);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: #6f1d3a;
    --sidebar-active-border: #b18a52;
}

/* ============================================================
   RESET
   ============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--ivory);
    color: var(--charcoal);
    font-family: "Manrope", sans-serif;
}

a {
    color: inherit;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

.user-layout {
    min-height: 100vh;
    display: flex;
    background: var(--ivory);
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.user-sidebar {
    width: 255px;
    min-width: 255px;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}

/* ============================================================
   BRAND
   ============================================================ */

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 25px 21px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
    width: 43px;
    height: 43px;
    min-width: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--burgundy);
    color: #ffffff;

    font-family: "Cormorant Garamond", serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text strong {
    color: #ffffff;

    font-family: "Cormorant Garamond", serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.brand-text span {
    color: var(--sidebar-muted);

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.user-navigation {
    padding: 27px 12px;
}

.navigation-section {
    margin-bottom: 24px;
}

.navigation-label {
    display: block;

    margin: 0 11px 10px;

    color: #8d8580;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

.user-nav-link {
    min-height: 43px;

    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 4px;
    padding: 0 12px;

    color: var(--sidebar-text-soft);

    border-radius: 5px;

    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.user-nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
}

.user-nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-text);
    border-left: 3px solid var(--sidebar-active-border);
    padding-left: 9px;
}

.nav-icon {
    width: 21px;
    min-width: 21px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: currentColor;

    font-size: 15px;
}

/* ============================================================
   SIDEBAR USER
   ============================================================ */

.sidebar-bottom {
    margin-top: auto;
    padding: 17px 19px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 37px;
    height: 37px;
    min-width: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--burgundy);
    color: #ffffff;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 700;
}

.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-user-info strong {
    overflow: hidden;

    color: #ffffff;

    font-size: 11px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-info span {
    margin-top: 2px;

    color: var(--sidebar-muted);

    font-size: 9px;
}

/* ============================================================
   LOGOUT
   ============================================================ */

.logout-button {
    width: 100%;

    margin-top: 12px;
    padding: 9px 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    background: transparent;
    color: #bdb5b0;

    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 4px;

    font-size: 9px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

/* ============================================================
   MAIN
   ============================================================ */

.user-main {
    flex: 1;
    min-width: 0;

    padding: 40px 46px;
}

/* ============================================================
   HEADER
   ============================================================ */

.user-header {
    width: 100%;
    max-width: 1350px;

    margin: 0 auto 31px;

    padding-bottom: 25px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;

    border-bottom: 1px solid var(--border);
}

.header-heading {
    min-width: 0;
}

.header-label {
    display: block;

    margin-bottom: 5px;

    color: var(--burgundy);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.header-heading h1 {
    margin: 0;

    color: var(--charcoal);

    font-family: "Cormorant Garamond", serif;
    font-size: 46px;
    font-weight: 700;
    line-height: 1.05;
}

.header-heading p {
    max-width: 610px;

    margin: 8px 0 0;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.6;
}

.header-date {
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;

    text-align: right;
}

.header-date span {
    color: var(--muted);

    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.4px;
}

.header-date strong {
    color: var(--gold);

    font-family: "Cormorant Garamond", serif;
    font-size: 15px;
    font-weight: 600;
}

/* ============================================================
   SUMMARY
   ============================================================ */

.saved-summary {
    width: 100%;
    max-width: 1350px;

    margin: 0 auto 39px;
    padding: 27px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    background:
        linear-gradient(
            135deg,
            var(--paper) 0%,
            #f4e9df 100%
        );

    border: 1px solid var(--border);
    border-radius: 6px;
}

.saved-summary-content {
    min-width: 0;
}

.section-label {
    display: block;

    margin-bottom: 5px;

    color: var(--burgundy);

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.saved-summary-content h2 {
    margin: 0;

    color: var(--charcoal);

    font-family: "Cormorant Garamond", serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.saved-summary-content p {
    max-width: 600px;

    margin: 6px 0 0;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.6;
}

.saved-count-box {
    width: 105px;
    min-width: 105px;
    height: 92px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: var(--paper);

    border: 1px solid var(--border);
    border-radius: 5px;
}

.saved-count-box span {
    color: var(--burgundy);

    font-family: "Manrope", sans-serif;
    font-size: 27px;
    font-weight: 600;
    line-height: 1;
}

.saved-count-box small {
    margin-top: 7px;

    color: var(--muted);

    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ============================================================
   SAVED SECTION
   ============================================================ */

.saved-section {
    width: 100%;
    max-width: 1350px;

    margin: 0 auto 39px;
}

.section-heading {
    margin-bottom: 17px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2 {
    margin: 0;

    color: var(--charcoal);

    font-family: "Cormorant Garamond", serif;
    font-size: 29px;
    font-weight: 700;
    line-height: 1.1;
}

.section-link {
    flex-shrink: 0;

    color: var(--burgundy);

    text-decoration: none;

    font-size: 10px;
    font-weight: 700;
}

.section-link:hover {
    color: var(--burgundy-dark);
}

/* ============================================================
   SAVED NOVELS AREA
   ============================================================ */

.saved-novels {
    width: 100%;
}

.saved-novel-card { display: flex; gap: 18px; padding: 16px; margin-bottom: 12px; background: var(--paper); border: 1px solid var(--border); }
.saved-novel-cover { width: 72px; height: 104px; flex: 0 0 72px; display: grid; place-items: center; overflow: hidden; background: var(--burgundy-soft); color: var(--burgundy); font-family: "Cormorant Garamond", serif; font-weight: 700; }
.saved-novel-cover img { width: 100%; height: 100%; object-fit: cover; }
.saved-novel-copy { min-width: 0; flex: 1; }
.saved-novel-copy h3 { margin: 0; font-family: "Cormorant Garamond", serif; font-size: 24px; }
.saved-novel-copy p, .saved-novel-copy small { display: block; margin: 4px 0; color: var(--muted); font-size: 11px; }
.saved-novel-copy div { display: flex; gap: 8px; margin-top: 12px; }
.remove-saved { border: 1px solid var(--border); background: transparent; color: var(--burgundy); padding: 0 13px; cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; }

.saved-empty-state {
    min-height: 245px;

    padding: 35px 30px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: var(--paper);

    border: 1px solid var(--border);
    border-radius: 6px;

    text-align: center;
}

.empty-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;

    background: var(--burgundy-soft);
    color: var(--burgundy);

    border-radius: 50%;

    font-size: 25px;
}

.saved-empty-state h3 {
    margin: 0;

    color: var(--charcoal);

    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    font-weight: 700;
}

.saved-empty-state p {
    max-width: 490px;

    margin: 7px 0 17px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.65;
}

.primary-action,
.secondary-action {
    min-height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 17px;

    border-radius: 4px;

    text-decoration: none;

    font-size: 9px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.primary-action {
    background: var(--burgundy);
    color: #ffffff;

    border: 1px solid var(--burgundy);
}

.primary-action:hover {
    background: var(--burgundy-dark);
    border-color: var(--burgundy-dark);
}

.secondary-action {
    background: transparent;
    color: var(--burgundy);

    border: 1px solid var(--burgundy);
}

.secondary-action:hover {
    background: var(--burgundy);
    color: #ffffff;
}

/* ============================================================
   READING CONNECTION
   ============================================================ */

.reading-connection {
    width: 100%;
    max-width: 1350px;

    margin: 0 auto 20px;
    padding: 25px 29px;

    background: var(--paper);

    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: 5px;
}

.connection-content {
    max-width: 700px;
}

.connection-content h2 {
    margin: 0;

    color: var(--charcoal);

    font-family: "Cormorant Garamond", serif;
    font-size: 26px;
    font-weight: 700;
}

.connection-content p {
    margin: 6px 0 14px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.6;
}

/* ============================================================
   DISCOVER
   ============================================================ */

.discover-card {
    width: 100%;
    max-width: 1350px;

    margin: 0 auto;

    padding: 29px 31px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    background: var(--charcoal);
    color: #ffffff;

    border-radius: 6px;
}

.discover-content {
    min-width: 0;
}

.discover-content .section-label {
    color: var(--gold);
}

.discover-content h2 {
    margin: 0;

    color: #ffffff;

    font-family: "Cormorant Garamond", serif;
    font-size: 28px;
    font-weight: 700;
}

.discover-content p {
    max-width: 600px;

    margin: 6px 0 15px;

    color: #bdb5b0;

    font-size: 10px;
    line-height: 1.6;
}

.discover-card .primary-action {
    background: var(--burgundy);
    border-color: var(--burgundy);
}

.discover-mark {
    width: 76px;
    height: 76px;
    min-width: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255, 255, 255, 0.75);

    border: 1px solid rgba(255, 255, 255, 0.15);

    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.user-footer {
    width: 100%;
    max-width: 1350px;

    margin: 45px auto 0;
    padding-top: 19px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    color: var(--muted);

    border-top: 1px solid var(--border);

    font-size: 9px;
}

.user-footer span:first-child {
    color: var(--charcoal);

    font-family: "Cormorant Garamond", serif;
    font-size: 16px;
    font-weight: 700;
}

/* ============================================================
   1000px
   ============================================================ */

@media (max-width: 1000px) {

    .user-sidebar {
        width: 225px;
        min-width: 225px;
    }

    .user-main {
        padding: 32px 26px;
    }

    .header-date {
        display: none;
    }

}

/* ============================================================
   800px
   ============================================================ */

@media (max-width: 800px) {

    .user-sidebar {
        width: 72px;
        min-width: 72px;
    }

    .sidebar-brand {
        justify-content: center;
        padding: 20px 10px;
    }

    .brand-text,
    .navigation-label,
    .sidebar-user-info {
        display: none;
    }

    .user-navigation {
        padding: 22px 9px;
    }

    .user-nav-link {
        justify-content: center;
        padding: 0;
    }

    .nav-icon {
        width: auto;
        min-width: auto;
    }

    .sidebar-bottom {
        padding: 14px 9px;
    }

    .sidebar-user {
        justify-content: center;
    }

    .logout-button {
        padding: 8px 3px;
        font-size: 0;
    }

    .logout-button span:first-child {
        font-size: 14px;
    }

    .user-main {
        padding: 30px 22px;
    }

}

/* ============================================================
   600px
   ============================================================ */

@media (max-width: 600px) {

    .user-sidebar {
        display: none;
    }

    .user-main {
        padding: 24px 16px;
    }

    .user-header {
        align-items: flex-start;
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    .header-heading h1 {
        font-size: 39px;
    }

    .saved-summary {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px;
    }

    .saved-count-box {
        width: 100%;
        height: 72px;
        min-width: 0;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .saved-empty-state {
        padding: 30px 20px;
    }

    .reading-connection {
        padding: 23px;
    }

    .discover-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 25px;
    }

    .discover-mark {
        width: 58px;
        height: 58px;
        min-width: 58px;
        font-size: 19px;
    }

}

/* ============================================================
   450px
   ============================================================ */

@media (max-width: 450px) {

    .user-main {
        padding: 20px 12px;
    }

    .header-heading h1 {
        font-size: 34px;
    }

    .saved-summary {
        padding: 20px;
    }

    .saved-summary-content h2 {
        font-size: 27px;
    }

    .saved-empty-state h3 {
        font-size: 22px;
    }

    .user-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

}
