/* Global Reset */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: #0f172a; color: #fff; line-height: 1.6; }

/* Navigation */
nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: #1e293b; position: sticky; top: 0; z-index: 1000; }
.logo { font-size: 1.5rem; font-weight: bold; color: #fca311; }
nav ul { display: flex; list-style: none; gap: 25px; }
nav ul li a { color: #fff; text-decoration: none; font-weight: 500; }
.cta-button { border: 2px solid #fca311; padding: 6px 15px; border-radius: 8px; color: #fca311 !important; }

/* Home Page Hero Section - Updated with dynamic background */
.hero-section {
    height: 80vh; 
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)), 
                url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Scroll කරන විට ලස්සන cinematic effect එකක් ලබා දෙයි */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero-section h1 { 
    font-size: 3.5rem; 
    margin-bottom: 10px; 
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5); /* අකුරු කැපී පෙනීමට */
}

/* Home Search Box - Modern Glassmorphism Style */
.search-box-container {
    background: rgba(255, 255, 255, 0.15); /* වීදුරුවක් වැනි පෙනුමක් */
    backdrop-filter: blur(10px); /* පසුබිම බොඳ කිරීම */
    padding: 8px;
    border-radius: 50px;
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box-container input {
    flex: 1;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    outline: none;
    color: #fff; /* අකුරු සුදු පාට */
    background: transparent; /* input එක ඇතුල පේන විදියට */
}

.search-box-container input::placeholder {
    color: #cbd5e1; /* placeholder එක ලස්සන පැහැයකට */
}

.search-box-container button {
    background: #fca311;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.search-box-container button:hover {
    background: #ffb740;
    transform: scale(1.05);
}

.explore-btn { background: #fca311; color: #000; padding: 12px 30px; border-radius: 8px; text-decoration: none; font-weight: bold; transition: 0.3s; }
.explore-btn:hover { background: #ffb740; }

/* Section Title & Container */
.container { max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.section-title { text-align: center; color: #fca311; margin-bottom: 40px; font-size: 2.2rem; }

/* Features & Book Grid */
.features-grid, .book-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

/* Feature & Book Cards */
.feature-card, .book-card {
    background: #1e293b;
    padding: 30px;
    border-radius: 15px;
    width: 320px;
    text-align: center;
    border-bottom: 5px solid #fca311;
    transition: 0.3s;
}
.book-card:hover, .feature-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Books Page Header */
.library-header { text-align: center; padding: 80px 20px; background: #0f172a; }
.library-header h1 { font-size: 3rem; margin-bottom: 15px; }
.library-header p { max-width: 750px; margin: 0 auto; color: #94a3b8; }

.price { font-size: 1.5rem; color: #fca311; font-weight: bold; margin: 15px 0; }
.btn { background: #fca311; border: none; padding: 10px 20px; border-radius: 5px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn:hover { background: #ffb740; }

footer { text-align: center; padding: 40px; background: #1e293b; margin-top: 50px; }

/* --- Authentication Page Styles --- */
.auth-page-bg {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), 
                url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 50px;
}

.form-container {
    width: 400px;
    height: 550px;
    position: relative;
    background: rgba(30, 41, 59, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    overflow: hidden;
}

.toggle-box {
    width: 220px;
    margin: 20px auto;
    position: relative;
    border-radius: 30px;
    background: #0f172a;
}

.toggle-btn {
    padding: 10px 30px;
    cursor: pointer;
    background: transparent;
    border: 0;
    outline: none;
    position: relative;
    color: white;
    font-weight: bold;
    width: 110px;
}

#btn-active {
    top: 0;
    left: 0;
    position: absolute;
    width: 110px;
    height: 100%;
    background: #fca311;
    border-radius: 30px;
    transition: .5s;
}

.social-auth {
    text-align: center;
    margin: 20px 0;
}

.social-auth i {
    font-size: 1.5rem;
    margin: 0 15px;
    color: #fca311;
    cursor: pointer;
    transition: 0.3s;
}

.social-auth i:hover { transform: scale(1.2); }

.auth-form {
    top: 180px;
    position: absolute;
    width: 300px;
    transition: .5s;
}

#login-form { left: 50px; }
#register-form { left: 450px; }

.input-field {
    width: 100%;
    padding: 12px 10px;
    margin: 10px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #475569;
    color: white;
    outline: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 15px 0;
}

.form-options a { color: #fca311; text-decoration: none; }

.auth-submit {
    width: 100%;
    padding: 12px;
    background: #fca311;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

.auth-submit:hover { background: #e59400; }
/* Login Page Specific Styles */
.login-banner {
    width: 100%;
    height: 120px;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), 
                url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?q=80&w=2000');
    background-size: cover;
    background-position: center;
    border-bottom: 3px solid #fca311;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.login-card {
    background: #1e293b;
    padding: 40px;
    border-radius: 25px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-card h2 { color: #fca311; margin-bottom: 10px; }
.login-card p { color: #94a3b8; margin-bottom: 30px; }

.login-card input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
    outline: none;
    box-sizing: border-box; /* Input එක Card එකෙන් එළියට යන එක නවත්තන්න */
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #fca311;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.login-btn:hover { background: #e59400; transform: scale(1.02); }

.new-user { margin-top: 20px; font-size: 0.9rem; }
.new-user a { color: #fca311; text-decoration: none; }
