/* Reset & Core */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0f0f0f;
    --bg-card: #141414;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent-gold: #d4af37;
    --accent-gold-dark: #aa8c2c;
    --accent-glow: rgba(212, 175, 55, 0.2);
    --border-light: #2a2a2a;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.2rem;
    color: var(--accent-gold);
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-gold);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(45deg, #d4af37, #f1c40f, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-gold);
    border-bottom: 1px solid var(--accent-gold);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent-gold);
    background: transparent;
    color: var(--accent-gold);
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 2px;
}

.btn:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary {
    background: var(--accent-gold);
    color: #000;
}

.btn-primary:hover {
    background: #fff;
    border-color: #fff;
    color: #000;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.book-cover {
    width: 100%;
    height: 400px;
    background-color: #222;
    background-size: cover;
    background-position: center;
    filter: grayscale(20%);
    transition: var(--transition);
}

.book-card:hover .book-cover {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.book-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, var(--bg-card), transparent);
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.book-info h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.book-info h3 a {
    color: #fff;
}

.book-price {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    display: block;
}

/* Forms */
.form-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-secondary);
}

/* Tables (Admin) */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--bg-secondary);
    color: var(--accent-gold);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a real app, use a hamburger menu */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }
}