/* Comic Reader - Base Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

:root {
    --primary: #5aa2ff;
    --primary-dark: #2f6bff;
    --bg: #0a0e16;
    --bg-light: #1a202c;
    --surface: #151d2b;
    --border: #2d3f5f;
    --text: #e9eef7;
    --text-muted: #a7b0c2;
    --gold: #c5a35a;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Light Mode */
:root.light-mode {
    --bg: #ffffff;
    --bg-light: #f8f8f8;
    --surface: #f0f2f5;
    --border: #c0c5d0;
    --text: #0a0e16;
    --text-muted: #4a5568;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: rgba(10, 14, 22, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 40px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Fredoka One', sans-serif;
    color: #5aa2ff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text);
}

.username {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.admin-btn {
    font-size: 0.95rem;
    color: var(--primary);
    background: rgba(90, 162, 255, 0.1);
    border: 1px solid var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.admin-btn:hover {
    background: rgba(90, 162, 255, 0.2);
    color: #fff;
}

.logout-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
    text-decoration: none;
}

.logout-link:hover {
    color: #ffb4b4;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: color 0.2s ease;
    margin-left: auto;
}

#theme-toggle:hover {
    color: var(--text);
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.series-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.series-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(90, 162, 255, 0.15);
}

.series-card-cover {
    width: 100%;
    height: 260px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.series-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.series-card-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.series-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.series-card-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.series-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

.hero {
    background: linear-gradient(135deg, rgba(90, 162, 255, 0.15), rgba(197, 163, 90, 0.08));
    border-bottom: 1px solid var(--border);
    padding: 3rem 20px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

main {
    flex: 1;
    padding: 2rem 20px;
}

.footer {
    background: rgba(10, 14, 22, 0.5);
    border-top: 1px solid var(--border);
    padding: 2rem 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .series-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}
