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

:root {
    --primary-color: #E53935;
    --secondary-color: #1F2937;
    --accent-color: #F59E0B;
    --bg-color: #FFFFFF;
    --section-bg: #F8F9FA;
    --text-color: #111827;
    --border-color: #E5E7EB;
    --success-color: #22C55E;
    --danger-color: #EF4444;
    --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);
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Outfit', 'Hind Siliguri', 'Poppins', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ==========================================
   Global Inputs & Placeholders
   ========================================== */
::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}
:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}
::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary-custom, .btn-secondary-custom {
    font-family: 'Outfit', 'Hind Siliguri', 'Poppins', sans-serif;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 10px 24px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    color: #FFF;
}
.btn-primary-custom:hover, .btn-primary-custom:active {
    background-color: #c62828;
    color: #FFF;
    box-shadow: var(--shadow-md);
}

.btn-secondary-custom {
    background-color: #FFF;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-secondary-custom:hover, .btn-secondary-custom:active {
    background-color: var(--primary-color);
    color: #FFF;
    box-shadow: var(--shadow-md);
}

.btn-primary-custom:disabled, .btn-secondary-custom:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}
.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ==========================================
   Header (Sticky & Premium)
   ========================================== */
.main-header {
    background-color: #1F2937; /* Premium Dark Background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    will-change: transform;
}
.main-header.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    background-color: #111827; /* Darker on scroll */
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: #FFFFFF !important;
    letter-spacing: 0.5px;
}
.navbar-brand span {
    color: var(--primary-color);
}
.nav-link {
    font-weight: 500;
    color: #D1D5DB !important;
    padding: 10px 18px !important;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem;
}
.nav-link:hover, .nav-link.active {
    color: #FFFFFF !important;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 70%;
}

/* ==========================================
   Mobile Menu (Slide Menu)
   ========================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #1F2937; /* Dark Mobile Menu */
    z-index: 1050;
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
    overflow-y: auto;
}
.mobile-menu.active {
    left: 0;
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-menu-header .navbar-brand {
    color: #FFFFFF !important;
}
.mobile-menu-body .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px !important;
    color: #D1D5DB !important;
}
.mobile-menu-body .nav-link:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.02);
}
.mobile-menu-body .nav-link::after {
    display: none;
}

/* ==========================================
   Footer
   ========================================== */
.main-footer {
    background-color: #111827; /* Dark background */
    color: #FFFFFF; /* White text */
    padding-top: 60px;
    border-top: 1px solid #1F2937;
}
.main-footer p, .main-footer .text-muted {
    color: #D1D5DB !important; /* Secondary text */
    line-height: 1.8;
}
.footer-title {
    color: #FFFFFF;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}
.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 45px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Divider */
}
.footer-links li:last-child {
    border-bottom: none;
}
.footer-links a {
    color: #FFFFFF; /* Footer link color white */
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}
.footer-links a:hover {
    color: var(--primary-color); /* Hover primary red */
    transform: translateX(5px);
}
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: #1F2937;
    color: #FFFFFF; /* White icon */
    border-radius: 50%;
    margin-right: 12px;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid #374151; /* Premium border */
}
.social-icons a:hover {
    background-color: var(--primary-color); /* Hover Red */
    color: #FFFFFF;
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}
.footer-bottom {
    background-color: #030712; /* Darker bottom bar */
    padding: 24px 0;
    margin-top: 50px;
    border-top: 1px solid #1F2937;
}
.footer-bottom p {
    color: #9CA3AF !important;
}

/* Utility Classes */
.rounded-premium {
    border-radius: var(--radius-lg);
}
.shadow-premium {
    box-shadow: var(--shadow-md);
}

/* ==========================================
   Authentication Pages (Login/Register)
   ========================================== */
.auth-wrapper {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.7) 0%, rgba(17, 24, 39, 0.9) 100%);
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.05) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.auth-card {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    z-index: 1;
    transform: translateZ(0); /* Hardware acceleration */
    width: 100%;
}

.auth-card-body {
    padding: 3rem !important;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #D1D5DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: #9CA3AF;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.auth-input {
    background: rgba(17, 24, 39, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff !important;
    padding: 0.8rem 1rem;
    height: auto;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input:focus {
    background: rgba(17, 24, 39, 0.9) !important;
    border-color: #6366f1;
    color: #fff !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Scroll Optimization to fix jitter */
html {
    scroll-behavior: auto !important; /* Overrides Bootstrap default smooth scroll which causes lag */
}
body {
    overscroll-behavior-y: none;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.auth-label {
    color: #E5E7EB;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #c62828;
    text-decoration: underline;
}

.auth-btn {
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}
