/* 
  Nhật Dạ Vũ Phong Miên V3 - Wattpad Minimalist 
  Colors: Black & Orange 
*/

:root {
    --bg-color: #000000;
    --bg-secondary: #0a0a0a;
    --card-bg: #121212;
    --primary: #ff9600; /* Wattpad Orange */
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #222222;
    --font-ui: 'Be Vietnam Pro', sans-serif;
    --font-heading: 'Teko', sans-serif;
    --font-hand: 'Dancing Script', cursive;
    --font-read: 'Merriweather', serif;
    --nav-height: 72px;
    --transition: all 0.2s ease-in-out;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --bg-secondary: #f4f4f4;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --border-color: #eeeeee;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-ui);
    line-height: 1.6;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    height: var(--nav-height);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.nav-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
}

.logo {
    font-family: var(--font-hand);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    text-shadow: 0 0 20px rgba(255,150,0,0.3);
    transition: text-shadow 0.2s;
}

.logo:hover {
    text-shadow: 0 0 30px rgba(255,150,0,0.6);
}

/* Nav Search */
.nav-search-wrap {
    flex: 1;
    max-width: 380px;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.nav-search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.4rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,150,0,0.15);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

/* Mobile navbar */
@media (max-width: 600px) {
    .navbar {
        height: auto;
    }
    .nav-content {
        flex-wrap: wrap;
        padding: 0.6rem 1rem;
        gap: 0.6rem;
    }
    .logo {
        font-size: 1.55rem;
        order: 1;
    }
    .nav-search-wrap {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    .nav-search-input {
        width: 100%;
    }
    div[style*="flex-shrink: 0"] {
        order: 2;
    }
}

/* Hero / Welcome Tagline */
.welcome-section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    text-align: center;
}

.welcome-tagline {
    font-family: var(--font-hand);
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    letter-spacing: 0.01em;
    opacity: 0;
    animation: fadeSlideUp 0.9s ease forwards;
    animation-delay: 0.2s;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .welcome-tagline { font-size: 1.1rem; }
}

/* Multi-column Novel Grid */
.novel-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .novel-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.novel-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.novel-item:hover {
    box-shadow: 0 4px 20px rgba(255, 150, 0, 0.1);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.novel-cover-wrap {
    width: 90px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    margin-bottom: 0;
}

.novel-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.novel-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
}

.novel-rank {
    display: none;
}

.novel-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.novel-author-wrap {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.novel-author-wrap i {
    font-size: 0.9em;
}

.novel-meta {
    display: none;
}

.novel-description, .novel-desc-preview {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Reader & Anti-copy */
.chapter-content {
    user-select: none; /* Basic anti-copy */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Utility */
.btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-ui);
    transition: var(--transition);
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    font-weight: 700;
}

.btn-primary:hover {
    background: #e68a00;
    color: #000;
}

/* About Page Styles */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.about-section p {
    margin-bottom: 1.2rem;
    color: var(--text-color);
}

.about-quote {
    padding: 2rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary);
    font-style: italic;
    font-size: 1.1rem;
    margin: 2rem 0;
    color: var(--text-muted);
    border-radius: 4px;
}
