/* Modern Research Landing Page - Aligned with System Theme (Rust/Brown) */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700;800&display=swap");

:root {
    /* System Theme Colors (Rust/Brown Palette) */
    --primary-color: #8B4513;
    /* SaddleBrown */
    --primary-dark: #7A3B10;
    /* Darker Brown */
    --primary-light: #9B5523;
    /* Lighter Brown */

    --accent-color: #A44A2A;
    /* Muted Orange */
    --accent-light: #B45535;

    /* Modern Palette Utils */
    --surface-0: #ffffff;
    --surface-50: #faf9f8;
    /* Warm off-white */
    --surface-100: #f5f2f0;
    /* Light beige gray */
    --surface-200: #e8e4e1;

    --text-main: #2D2D2D;
    /* Soft Black */
    --text-muted: #6C757D;

    /* Gradients (Warm/Earthy) */
    --hero-gradient: linear-gradient(135deg, #faf9f8 0%, #f5ece8 100%);
    --card-gradient: linear-gradient(145deg, #ffffff, #faf9f8);
    --primary-gradient: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    --accent-gradient: linear-gradient(135deg, var(--accent-color), var(--accent-light));

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(139, 69, 19, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(74, 42, 22, 0.05);
    --backdrop-blur: blur(12px);

    /* Box Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-color-primary: 0 10px 25px -5px rgba(139, 69, 19, 0.3);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--surface-50);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ================= Navigation / Header ================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 5%;
    /* Reduced padding slightly */
    border-bottom: 1px solid var(--surface-200);
}

.header .logo img {
    height: 2.5rem;
    /* Reduced from 3rem */
    width: auto;
}

.header .navbar a {
    font-size: 1rem;
    /* Reduced from 1.1rem */
    color: var(--text-main);
    margin: 0 0.75rem;
    text-transform: capitalize;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

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

.header .navbar .hover-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.header .navbar .hover-underline:hover::after {
    transform: scaleX(1);
}

.header .icons {
    display: flex;
    align-items: center;
}

.header .icons div {
    font-size: 1.25rem;
    /* Reduced from 1.5rem */
    margin-left: 1rem;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.3s;
}

.header .icons div:hover {
    color: var(--accent-color);
}

.header .login-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.4rem 1.25rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.header .login-btn:hover {
    background: var(--primary-color);
    color: white;
}

#menu-btn {
    display: none;
}

/* Dropdown / Login Form */
.login-form {
    position: absolute;
    top: 110%;
    right: 2rem;
    background: white;
    width: 20rem;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border-radius: 10px;
    display: none;
    /* Hidden by default, toggled by JS */
    border: 1px solid var(--surface-200);
}

.login-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.login-form h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    text-align: center;
}

.login-form .box {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--surface-200);
    border-radius: 5px;
    background: var(--surface-50);
}

.login-form .remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-form .btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

.login-form .btn:hover {
    background: var(--primary-dark);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= Dropdowns ================= */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    z-index: 1000;
    min-width: 14rem;
    padding: 0.5rem 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid var(--surface-200);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: none;
    list-style: none;
}

/* Bootstrap requires .show to display, or we can toggle it manually */
.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    clear: both;
    font-weight: 500;
    color: var(--text-main);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: var(--surface-50);
    color: var(--primary-color);
    padding-left: 1.75rem;
    /* Slight slide effect */
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--surface-200);
}

/* Specific overrides for Navbar Dropdowns (if any) */
.header .navbar .dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header .navbar .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* User Profile Styles */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background: var(--surface-50);
    border: 1px solid var(--surface-200);
    cursor: pointer;
    transition: all 0.3s;
}

.user-profile-btn:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ================= Browse Page Specifics (COMPACTED) ================= */

/* Browse Layout - Aggressively Reduced */
.browse-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    /* Reduced sidebar width further */
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    /* Reduced top padding significantly */
    position: relative;
    z-index: 10;
}

/* Sidebar Filters - Compacted */
.sidebar {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--surface-200);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 5rem;
    /* Adjusted for smaller header */
    height: fit-content;
    align-self: start;
    /* FIXED: Prevent grid item from stretching */
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 0.875rem 1.25rem;
    /* Compact padding */
    border-bottom: 1px solid var(--surface-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.sidebar-content {
    padding: 1rem 1.25rem;
    /* Compact padding */
}

/* Form Elements (Shared Reuse) */
.form-group {
    margin-bottom: 0.85rem;
    /* Tighter spacing */
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    /* Compact inputs */
    border: 1px solid var(--surface-200);
    border-radius: 8px;
    background-color: var(--surface-50);
    color: var(--text-main);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition-base);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.1);
    background-color: white;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.8rem;
}

.search-input {
    padding-left: 2rem;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-200);
}

.btn-sm {
    padding: 0.4rem 0.875rem;
    font-size: 0.85rem;
}

/* Badges (Shared Reuse + New) */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.badge-field {
    background-color: var(--surface-200);
    color: var(--text-muted);
}

.badge-engineering {
    background-color: #e0f2fe;
    color: #0284c7;
}

.badge-construction {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-technology {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-open {
    background-color: #dcfce7;
    color: #16a34a;
}

.badge-restricted {
    background-color: #fee2e2;
    color: #dc2626;
}


/* ================= Hero Section (Global) ================= */
.hero-section {
    position: relative;
    padding: 10rem 2rem 6rem;
    /* Keeps home page same */
    overflow: hidden;
    background: radial-gradient(circle at top right, #f5ece8 0%, transparent 40%),
        radial-gradient(circle at bottom left, #fcf5f2 0%, transparent 40%);
}

/* Mini Hero for Browse Page - COMPACTED */
.hero-section-sm {
    padding: 6rem 2rem 1.5rem;
    /* Drastically reduced vertical padding */
    background: var(--surface-50);
    text-align: center;
    border-bottom: 1px solid var(--surface-200);
}

.hero-bg-shape {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(45deg, var(--primary-light), var(--accent-color));
    filter: blur(90px);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
    animation: floatShape 20s infinite alternate ease-in-out;
}

.shape-1 {
    top: -100px;
    right: -100px;
}

.shape-2 {
    bottom: -100px;
    left: -100px;
    background: linear-gradient(45deg, #A44A2A, #8B4513);
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(15deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.25rem;
    /* Reduced from 4rem */
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-dark);
    /* Gradient text option */
    background: linear-gradient(to right, var(--primary-dark), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-text .lead {
    font-size: 1rem;
    /* Reduced from 1.25rem */
    color: var(--text-muted);
    margin-bottom: 0;
    /* Removed margin */
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Button style aligned with 'pill' shape but system colors */
.btn-modern {
    padding: 0.6rem 1.5rem;
    /* Reduced */
    border-radius: 50px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.btn-modern-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-color-primary);
}

.btn-modern-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(139, 69, 19, 0.4);
    color: white;
}

.btn-modern-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-modern-outline:hover {
    background: var(--primary-color);
    color: white;
}

.hero-illustration-container {
    position: relative;
    perspective: 1000px;
}

.floating-card {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

.card-main {
    position: relative;
    width: 100%;
    z-index: 2;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-1 {
    top: -20px;
    right: -20px;
    z-index: 1;
    animation-delay: 1s;
}

.card-2 {
    bottom: -30px;
    left: -20px;
    z-index: 3;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ================= Features Section ================= */
.features-section {
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    transition: var(--transition-base);
    border: 1px solid var(--surface-200);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--surface-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: var(--transition-bounce);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--primary-color);
    color: white;
    transform: rotate(10deg) scale(1.1);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ================= Stats Section ================= */
.stats-section {
    padding: 4rem 2rem;
    background: white;
    margin: 4rem 0;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--primary-gradient);
    border-radius: 30px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-color-primary);
}

.stats-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    color: white;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ================= Recent Papers ================= */
.recent-section {
    padding: 6rem 2rem;
    background: var(--surface-50);
}

.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.paper-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    transition: var(--transition-base);
    border: 1px solid var(--surface-200);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.paper-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.paper-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.paper-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.paper-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    line-height: 1.4;
}

.paper-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.paper-title a:hover {
    color: var(--accent-color);
}

.paper-abstract {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.paper-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--surface-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.read-more:hover {
    gap: 0.75rem;
    color: var(--accent-color);
}

/* ================= CTA Section ================= */
.cta-section {
    padding: 8rem 2rem;
    text-align: center;
    background: white;
}

.cta-box {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 4rem;
    border-radius: 40px;
    background: var(--primary-dark);
    color: white;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(122, 59, 16, 0.4);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.4;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 800;
}

.cta-desc {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ================= Animations ================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

/* Responsive adjustments for other sections */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-illustration-container {
        margin-top: 4rem;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
}

/* ================= Mobile Sidebar Toggle (For Browse Page) ================= */
.sidebar-toggle-btn {
    display: none;
    /* Hidden on desktop */
}

@media (max-width: 900px) {

    /* Tablet/Mobile Breakpoint */
    .browse-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        z-index: 2000;
        border-radius: 0;
        transform: translateX(-100%);
    }

    .sidebar.show-mobile {
        transform: translateX(0);
    }

    .sidebar-toggle-btn {
        display: flex;
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        z-index: 900;
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-lg);
        border: none;
    }
}

.truncated-abstract {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6em;
    /* Fallback for browsers that don't support line-clamp */
}

/*
 ================= Login & Signup Forms ================= */
.login-form,
.signup-form {
    position: fixed;
    top: 100%;
    right: 2rem;
    width: 35rem;
    max-width: 90vw;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    border: var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    z-index: 1001;
    transition: var(--transition-base);
    transform: translateY(0);
}

.signup-form {
    width: 45rem;
    max-width: 95vw;
}

.login-form.active,
.signup-form.active {
    top: 5rem;
    transform: translateY(0);
}

.login-form h3,
.signup-form h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-form .box,
.signup-form .box {
    width: 100%;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border: 2px solid var(--surface-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--surface-0);
    transition: var(--transition-base);
    font-family: 'DM Sans', sans-serif;
}

.login-form .box:focus,
.signup-form .box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.signup-form .row {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.signup-form .col-md-6 {
    flex: 1;
}

.signup-form .col-md-6 .box {
    margin: 0;
}

.login-form .remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.login-form .remember input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.login-form .remember label {
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.login-form .btn,
.signup-form .btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.login-form .btn:hover,
.signup-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-color-primary);
}

.login-form .btn:active,
.signup-form .btn:active {
    transform: translateY(0);
}

.login-form .btn .text,
.signup-form .btn .text {
    transition: var(--transition-base);
}

.login-form .btn:hover .text-1,
.signup-form .btn:hover .text-1 {
    transform: translateY(-100%);
}

.login-form .btn:hover .text-2,
.signup-form .btn:hover .text-2 {
    transform: translateY(-100%);
}

.login-btn,
.signup-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 0.9rem;
}

.signup-btn {
    background: var(--accent-gradient);
}

.login-btn:hover,
.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design for Forms */
@media (max-width: 768px) {

    .login-form,
    .signup-form {
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }

    .signup-form .row {
        flex-direction: column;
        gap: 0;
    }

    .signup-form .col-md-6 .box {
        margin: 0.5rem 0;
    }
}