/* ============================
   style.css - Dark Mode Styles
   ============================ */

/* Global Variables */
:root {
    --primary-color: #1e88e5;       /* Deep blue */
    --secondary-color: #1a1a1a;     /* Dark background */
    --accent-color: #ff6f61;        /* Coral accent */
    --text-color: #eaeaea;          /* Light text */
    --bg-color: #121212;            /* Page background */
    --error-color: #ff6b6b;
    --success-color: #66bb6a;
    --font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

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

/* Base */
body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.navbar .logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.navbar nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .lead {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
}

.hero .btn-lg {
    background: #fff;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
}

.hero .btn-lg:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-color);
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: bold;
}

/* Cards */
.card {
    background: var(--secondary-color);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.card-subtitle {
    margin-bottom: 1rem;
    color: #aaa;
}

.card-text {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* Messages */
.error {
    background: #2a0000;
    color: var(--error-color);
    padding: 1rem;
    margin: 1rem auto;
    max-width: 600px;
    border: 1px solid var(--error-color);
    border-radius: 4px;
    text-align: center;
}

.error-text {
    font-weight: bold;
}

.info {
    background: #222;
    color: #ccc;
    padding: 1rem;
    margin: 1rem auto;
    max-width: 600px;
    border-radius: 4px;
    text-align: center;
}

/* Forms */
.form {
    max-width: 400px;
    margin: 2rem auto;
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #222;
    color: var(--text-color);
}

.form button {
    width: 100%;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

.footer-nav a {
    color: #fff;
    margin: 0 0.5rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--accent-color);
}

/* Responsive Tweaks */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero .lead {
        font-size: 1rem;
    }
    .navbar nav a {
        margin-left: 0.5rem;
    }
}
