/* ===== GENERAL STYLING ===== */
/* BOOKNEST - STUDENT FRIENDLY DESIGN */

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

:root {
    --primary: #7568d8;
    --primary-dark: #5d51bd;
    --lavender: #eeeaff;
    --mint: #e0f5eb;
    --peach: #ffe7dc;
    --yellow: #fff3cb;
    --dark: #292747;
    --text: #64627a;
    --white: #ffffff;
    --background: #faf9ff;
    --shadow: 0 8px 25px rgba(70, 60, 130, 0.09);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button,
.view-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.25s;
}

button:hover,
.view-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 7%;
    background: white;
    box-shadow: var(--shadow);
    gap: 20px;
    flex-wrap: wrap;
}

.navbar h1,
.navbar .logo {
    color: var(--primary);
    font-size: 27px;
    font-weight: 800;
}

.navbar a {
    color: var(--dark);
    margin: 0 10px;
    font-weight: 500;
}

.navbar a:hover {
    color: var(--primary);
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    padding: 65px 7%;
    background: linear-gradient(120deg, #eeeaff, #e0f5eb);
    border-radius: 0 0 35px 35px;
}

.hero-content {
    max-width: 570px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.2;
    margin-bottom: 18px;
    color: var(--dark);
}

.hero p {
    color: var(--text);
    margin-bottom: 25px;
    font-size: 16px;
}

.hero-image {
    max-width: 460px;
    width: 45%;
}

.hero-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: var(--shadow);
}

.books-section {
    padding: 55px 7%;
}

.books-section h1,
.books-section h2 {
    margin-bottom: 12px;
    color: var(--dark);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.book-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid #efedfa;
    transition: 0.25s;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(70, 60, 130, 0.14);
}

.book-info span {
    display: inline-block;
    background: var(--lavender);
    color: var(--primary-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

.book-info h3 {
    font-size: 19px;
    margin-bottom: 7px;
    color: var(--dark);
}

.book-info p {
    color: var(--text);
    font-size: 14px;
    margin-bottom: 5px;
}

.book-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
}

.book-bottom strong {
    color: var(--primary-dark);
    font-size: 19px;
    margin-right: auto;
}

.book-bottom button {
    padding: 8px 12px;
    font-size: 12px;
}

form {
    max-width: 550px;
    margin: 25px auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

form label {
    display: block;
    margin: 13px 0 6px;
    font-weight: 500;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dedbf0;
    border-radius: 10px;
    outline: none;
    background: #fcfbff;
}

form input:focus,
form select:focus,
form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(117, 104, 216, 0.12);
}

form button {
    margin-top: 20px;
}

footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 45px 6%;
    }

    .hero-image {
        width: 100%;
    }

    .navbar {
        justify-content: center;
    }

    .navbar a {
        margin: 5px;
    }

    .books-section {
        padding: 35px 5%;
    }

    form {
        margin: 20px 5%;
        padding: 22px;
    }
}
/* HOMEPAGE CATEGORY DESIGN */

#categories {
    padding: 65px 7%;
    background: #faf9ff;
}

.section-heading {
    text-align: center;
    margin-bottom: 35px;
}

.section-heading span {
    color: #7568d8;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}

.section-heading h2 {
    font-size: 32px;
    margin: 8px 0;
    color: #292747;
}

.section-heading p {
    color: #77748d;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 22px;
}

.category-card {
    padding: 30px 20px;
    border-radius: 20px;
    background: #eeeaff;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #e2defb;
}

.category-card:nth-child(2) {
    background: #e0f5eb;
}

.category-card:nth-child(3) {
    background: #ffe7dc;
}

.category-card:nth-child(4) {
    background: #fff3cb;
}

.category-card:nth-child(5) {
    background: #e3f0ff;
}

.category-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(70, 60, 130, 0.12);
}

.category-card span {
    font-size: 35px;
    display: block;
    margin-bottom: 12px;
}

.category-card h3 {
    color: #292747;
    font-size: 17px;
}
/* ===== BookNest Premium Book Cards ===== */

.book-card {
    background: #ffffff;
    border: 1px solid #e8eaf2;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 5px 20px rgba(40, 55, 90, 0.07);
    transition: all 0.3s ease;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 14px 30px rgba(40, 55, 90, 0.13);
    border-color: #aab8e8;
}

.book-info span {
    background: #eef0ff;
    color: #5266a5;
    padding: 6px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.book-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #263653;
    margin: 14px 0 9px;
}

.book-info p {
    color: #737d91;
    font-size: 14px;
    line-height: 1.6;
}

.book-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.book-bottom strong {
    color: #344f91;
    font-size: 21px;
    margin-right: auto;
}

.book-bottom button {
    background: #526fc1;
    color: white;
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.book-bottom button:hover {
    background: #344f91;
    transform: translateY(-2px);
}
/* Book image size improvement */
.book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin-bottom: 15px;
}
/* Uniform book grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* Equal card sizes */
.book-card {
    width: 100%;
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
}

/* Equal image sizes */
.book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 12px;
}

/* Mobile layout */
@media (max-width: 650px) {
    .book-grid {
        grid-template-columns: 1fr;
    }
}
/* Bigger and centered search bar */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 750px;
    margin: 30px auto;
}

#searchInput {
    flex: 1;
    height: 55px;
    padding: 0 22px;
    font-size: 17px;
    border: 2px solid #dcd6f7;
    border-radius: 12px;
    outline: none;
    box-sizing: border-box;
}

#searchInput:focus {
    border-color: #8b7be8;
}

#searchBtn {
    height: 55px;
    padding: 0 28px;
    font-size: 16px;
    border-radius: 12px;
}
/* Sell Book Page Design */

.sell-page {
    text-align: center;
    padding: 55px 20px;
}

.sell-page h1 {
    font-size: 36px;
    color: #292747;
    margin-bottom: 12px;
}

.sell-page p {
    font-size: 16px;
    color: #77748d;
    margin-bottom: 30px;
}

.sell-form {
    max-width: 650px;
    width: 90%;
    margin: 30px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(80, 65, 140, 0.10);
    text-align: left;
    box-sizing: border-box;
}

.sell-form input,
.sell-form select,
.sell-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    margin-bottom: 16px;
    border: 1px solid #e2def2;
    border-radius: 10px;
    font-size: 15px;
}
.image-upload-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f6ff;
    border: 2px dashed #b9aceb;
    border-radius: 14px;
}

.image-upload-section label {
    display: block;
    font-weight: 700;
    color: #51418f;
    margin-bottom: 8px;
}

.image-upload-section p {
    color: #77748d;
    font-size: 13px;
    margin-bottom: 12px;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.image-preview img {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #ddd;
}
/* BOOK DETAILS PAGE */

.book-details-card {
    max-width: 1000px;
    margin: 50px auto 25px;
    padding: 30px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e8e5f5;
    border-radius: 22px;
    box-shadow: 0 10px 35px rgba(70, 55, 120, 0.10);
}

.details-image {
    width: 100%;
    height: 420px;
    background: #f3f0ff;
    border-radius: 16px;
    overflow: hidden;
}

.details-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.details-content h2 {
    font-size: 32px;
    color: #292747;
    margin: 15px 0 25px;
}

.details-label {
    display: inline-block;
    background: #eeeaff;
    color: #7568d8;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.details-info {
    margin-bottom: 25px;
}

.details-info p {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid #eeeef4;
    color: #666477;
}

.details-info strong {
    color: #292747;
}

.details-price {
    color: #26865b;
    font-weight: 700;
}

.back-link {
    display: block;
    max-width: 1000px;
    margin: 20px auto 50px;
    color: #7568d8;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .book-details-card {
        grid-template-columns: 1fr;
        margin: 20px 15px;
        padding: 20px;
        gap: 25px;
    }

    .details-image {
        height: 300px;
    }

    .details-content h2 {
        font-size: 25px;
    }

    .back-link {
        margin: 20px 15px;
    }
}
/* BOOKNEST NAVIGATION BAR */

.main-navbar {
    width: 100%;
    min-height: 78px;
    padding: 15px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    box-shadow: 0 3px 18px rgba(40, 35, 80, 0.08);
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    font-size: 25px;
    font-weight: 800;
    color: #7568d8;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a,
.login-link {
    color: #39364f;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.nav-links a:hover,
.login-link:hover {
    color: #7568d8;
}

.signup-btn {
    background: #7568d8;
    color: white;
    padding: 11px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
}

.signup-btn:hover {
    background: #5e52bd;
}

@media (max-width: 800px) {
    .main-navbar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 15px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .nav-actions {
        gap: 15px;
    }
}
/* CENTER BOOK DETAILS PAGE */

.auth-container {
    width: 100%;
    max-width: 1150px;
    margin: 35px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.auth-container > h1 {
    text-align: center;
    margin-bottom: 25px;
}

.book-details-card {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    box-sizing: border-box;
}

.back-link {
    max-width: 1000px;
    margin: 20px auto 40px;
}
/* FINAL BOOK DETAILS LAYOUT FIX */

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.main-navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 75px;
    margin: 0;
    padding: 15px 5%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    background: #fff;
    z-index: 1000;
}

.auth-container {
    display: block !important;
    width: 100%;
    max-width: 1150px;
    min-height: 0 !important;
    margin: 35px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.book-details-card {
    width: 100%;
    max-width: 1000px;
    margin: 25px auto;
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    box-sizing: border-box;
}

.details-image {
    width: 100%;
    height: 420px;
}

.details-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 22px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 700px) {
    .book-details-card {
        grid-template-columns: 1fr;
    }

    .details-image {
        height: 300px;
    }

    .main-navbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
.auth-container {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
}

.book-details-card {
    width: 100%;
    max-width: 1000px;
    margin: 30px auto;
    box-sizing: border-box;
}

#bookDetails {
    width: 100%;
}
/* BookNest navigation alignment */
.main-navbar {
    width: 100%;
    min-height: 75px;
    padding: 12px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 25px;
}

/* Center book details below navigation */
.auth-container {
    width: 100%;
    max-width: 1100px;
    margin: 45px auto;
    padding: 20px;
    box-sizing: border-box;
}

.book-details-card {
    width: 100%;
    max-width: 1000px;
    margin: 25px auto;
    box-sizing: border-box;
}

#bookDetails {
    width: 100%;
}
/* Fix Book Details page layout */
body.book-details-page {
    display: block !important;
    width: 100%;
    min-height: 100vh;
    margin: 0;
}

/* Navigation at the top */
.book-details-page .main-navbar {
    position: relative;
    top: 0;
    width: 100%;
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Book details centered below navigation */
.book-details-page .auth-container {
    display: block;
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

.book-details-page .book-details-card {
    margin: 25px auto;
    text-align: left;
}
/* BookNest Sell Banner Redesign */
.sell-banner {
    display: flex;
    align-items: center;
    gap: 45px;
    width: 90%;
    max-width: 1350px;
    margin: 60px auto;
    padding: 35px 45px;
    background: linear-gradient(120deg, #eee5ff, #f9f5ff, #e7d8ff);
    border-radius: 28px;
    box-shadow: 0 12px 35px rgba(91, 40, 160, 0.12);
    overflow: hidden;
}

.sell-banner-image {
    flex: 0 0 42%;
}

.sell-banner-image img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    display: block;
}

.sell-banner-content {
    flex: 1;
    border-left: 2px solid #c4a6ed;
    padding-left: 40px;
}

.sell-banner-content span {
    display: inline-block;
    background: #dfccff;
    color: #5921a5;
    padding: 8px 18px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
}

.sell-banner-content h2 {
    font-size: 32px;
    color: #21143d;
    margin: 18px 0 12px;
}

.sell-banner-content h2 strong {
    color: #6726b5;
}

.sell-banner-content p {
    color: #5b5369;
    font-size: 17px;
    margin-bottom: 22px;
}

.sell-banner-content .primary-btn {
    display: inline-block;
    background: #6421b5;
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.sell-banner-content .primary-btn:hover {
    background: #48118c;
    transform: translateY(-3px);
}

@media (max-width: 700px) {
    .sell-banner {
        flex-direction: column;
        padding: 25px;
        gap: 20px;
    }

    .sell-banner-image {
        width: 100%;
    }

    .sell-banner-image img {
        height: 200px;
    }

    .sell-banner-content {
        border-left: none;
        border-top: 2px solid #c4a6ed;
        padding: 20px 0 0;
    }

    .sell-banner-content h2 {
        font-size: 25px;
    }
}
/* Dashboard Heading */
.dashboard-heading {
    text-align: center;
    padding: 45px 20px 25px;
}

.dashboard-tag {
    display: inline-block;
    color: #8064a2;
    background: #eee7f7;
    padding: 7px 18px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.dashboard-heading h1 {
    color: #35264a;
    font-size: 34px;
    margin: 15px 0 10px;
}

.dashboard-heading p {
    color: #777;
    font-size: 16px;
    margin: 0;
}
/* Dashboard Statistics Card */
.dashboard-stats {
    display: flex;
    justify-content: center;
    margin: 10px auto 35px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #f1eaff, #ffffff);
    border: 1px solid #e5d9f5;
    border-radius: 18px;
    padding: 22px 40px;
    min-width: 230px;
    box-shadow: 0 5px 18px rgba(70, 40, 100, 0.08);
}

.stat-icon {
    font-size: 35px;
}

.stat-card h2 {
    color: #7652a5;
    font-size: 30px;
    margin: 0;
}

.stat-card p {
    color: #777;
    margin: 4px 0 0;
}
/* Buy Books Page Heading and Search */
.books-section:has(#buyBookGrid) {
    max-width: 1250px;
    margin: 50px auto;
    padding: 25px;
}

.books-section:has(#buyBookGrid) h1 {
    text-align: center;
    font-size: 42px;
    color: #35264a;
    margin-bottom: 15px;
}

.books-section:has(#buyBookGrid) > p {
    text-align: center;
    font-size: 19px;
    margin-bottom: 25px;
}

#buySearchInput {
    width: 450px;
    max-width: 90%;
    padding: 16px 20px;
    font-size: 17px;
    border: 1px solid #d8c9eb;
    border-radius: 12px;
}

.books-section:has(#buyBookGrid) button {
    padding: 16px 28px;
    font-size: 16px;
    border-radius: 12px;
}
/* Center Buy Books Search Bar */
#buySearchInput {
    display: block;
    margin: 0 auto 25px;
}

.books-section:has(#buyBookGrid) button {
    display: inline-block;
}

.books-section:has(#buyBookGrid) input {
    text-align: left;
}
/* Center Search Input and Button Together */
.books-section:has(#buyBookGrid) {
    text-align: center;
}

.books-section:has(#buyBookGrid) #buySearchInput {
    display: inline-block;
    width: 450px;
    max-width: 70%;
    margin: 0 10px 25px 0;
    vertical-align: middle;
}

.books-section:has(#buyBookGrid) button {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 25px;
}
/* Buy Books Card Layout */
#buyBookGrid {
    max-width: 1150px;
    margin: 35px auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

#buyBookGrid .book-card {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    #buyBookGrid {
        grid-template-columns: 1fr;
    }
}
/* Equal height Buy Book cards */
#buyBookGrid .book-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

#buyBookGrid .book-card img {
    height: 220px;
    object-fit: cover;
}

#buyBookGrid .book-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
/* My Profile Card */
.profile-card {
    width: 90%;
    max-width: 850px;
    margin: 30px auto;
    padding: 25px 35px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-info h2 {
    color: #263b63;
    font-size: 25px;
    margin-bottom: 8px;
}

.profile-info p {
    color: #68758a;
    font-size: 15px;
}

.profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#profileImage,
#defaultProfileIcon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dce5ff;
}

#defaultProfileIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf1ff;
    font-size: 42px;
}

#addPhotoLabel {
    color: #2875d9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#addPhotoLabel:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .profile-card {
        padding: 20px;
        width: 95%;
    }
}
/* Profile Logout Button */
.logout-btn {
    margin-top: 15px;
    padding: 10px 22px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}
.back-home-btn {
    display: inline-block;
    margin: 15px 5%;
    padding: 10px 20px;
    background: #e9e4ff;
    color: #51458c;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
}

.back-home-btn:hover {
    background: #d8ceff;
    transform: translateX(-3px);
}
.view-all-featured-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 22px;
    background: #e9e4ff;
    color: #51458c;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.view-all-featured-btn:hover {
    background: #d8ceff;
}
/* Messages layout */
#messagesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    align-items: stretch;
}

.message-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #ddd6f5;
    border-radius: 12px;
    padding: 20px;
    min-height: 170px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow-wrap: anywhere;
}

.message-card h3 {
    color: #51458c;
    margin-bottom: 10px;
}

.message-card p {
    margin: 8px 0;
}

.new-message-badge {
    display: inline-block;
    background: #e9f7ef;
    color: #16834a;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 10px;
}

.message-date {
    color: #888;
    font-size: 12px;
    margin-top: 15px;
}