:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --primary-color: #00ff88;
    /* Neon Green for DNA */
    --secondary-color: #00ccff;
    /* Cyber Blue */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
}

.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.6;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 90%;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px;
    z-index: 100;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.highlight {
    color: var(--primary-color);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glow {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--glass-border);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 1rem;
    transition: all 0.3s;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: #ccc;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 5rem 10%;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.demo-section {
    padding: 5rem 10%;
    text-align: center;
}

.demo-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.book-showcase {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.book-card {
    width: 300px;
    border-radius: 16px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.1);
}

.book-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.book-info {
    padding: 1.5rem;
}

.book-info h4 {
    margin: 0 0 0.5rem;
    font-family: var(--font-heading);
    color: var(--primary-color);
}

.dna-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #aaa;
}

.btn-sm {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.btn-sm:hover {
    background: var(--primary-color);
    color: #000;
}

footer {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    padding-top: 60px;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #111;
    margin: auto;
    padding: 40px;
    border: 1px solid var(--primary-color);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 16px;
    position: relative;
    color: #e0e0e0;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 20px;
    right: 30px;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

/* SEARCH & FILTER STYLES */
.search-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.search-container input {
    flex: 2;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-container select {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: var(--primary);
    padding: 0 1rem;
    border-radius: 40px;
    cursor: pointer;
    outline: none;
}

.book-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.2);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    opacity: 0.8;
}

.stat {
    text-align: center;
}

.stat .number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loading,
.no-results,
.error {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    grid-column: 1 / -1;
}

/* Markdown Content Styles */
#reader-body h1 {
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

#reader-body h2 {
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-top: 30px;
}

#reader-body ul {
    padding-left: 20px;
}

#reader-body li {
    margin-bottom: 10px;
    line-height: 1.6;
}

#reader-body strong {
    color: #fff;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links a {
        margin: 0;
    }

    .modal-content {
        width: 90%;
        padding: 20px;
    }
}

/* LOCKED STATE */
.book-card.locked {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.8;
    cursor: not-allowed;
    position: relative;
}

.book-card.locked::after {
    content: "🔒";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.book-card.locked:hover {
    transform: none;
    box-shadow: none;
}