:root {
    --primary: #6d28d9;
    /* Deep Purple */
    --primary-hover: #5b21b6;
    --accent: #8b5cf6;
    --bg-dark: #0f0f11;
    --bg-card: #18181b;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --gradient: linear-gradient(135deg, #6d28d9 0%, #ec4899 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navbar --- */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 15, 17, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: transform 0.3s ease, background 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo img {
    height: 32px;
    /* Glow effect to make purple pop on black */
    filter: drop-shadow(0 0 8px rgba(109, 40, 217, 0.6));
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:not(.btn-primary):not(.btn-login) {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:not(.btn-primary):not(.btn-login):hover {
    color: var(--text-main);
}

.btn-login {
    color: var(--text-main);
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    padding: 160px 0 100px;
    background: radial-gradient(circle at top center, rgba(109, 40, 217, 0.15) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.btn-primary.large,
.btn-secondary.large {
    padding: 14px 30px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.small-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Slider Demo --- */
.hero-demo {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1/1;
    /* Square for manga panel */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.img-comp-container {
    position: relative;
    height: 100%;
    width: 100%;
}

.img-comp-img {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.img-comp-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.label {
    position: absolute;
    top: 20px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    font-weight: 600;
}

.label.after {
    right: 20px;
}

.label.before {
    left: 20px;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle::after {
    content: '\f337';
    /* FontAwesome arrows */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary);
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* --- Features --- */
.features {
    padding: 100px 0;
    background: #131316;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(109, 40, 217, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

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

/* --- How it Works --- */
.how-it-works {
    padding: 100px 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 auto 20px;
}

/* --- Footer --- */
footer {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-brand img {
    height: 24px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

/* --- Responsive --- */
/* --- Login Page --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(109, 40, 217, 0.1) 0%, transparent 70%);
}

.login-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.login-card h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
}

.divider {
    margin: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.divider span {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.switch-auth {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.switch-auth a {
    color: var(--primary);
    font-weight: 600;
}

/* --- Dashboard --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-muted);
    border-radius: 8px;
    margin-bottom: 5px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(109, 40, 217, 0.1);
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.main-content {
    padding: 40px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recent-section h2 {
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* --- Success Page --- */
.success-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    /* Green */
    margin-bottom: 20px;
}

/* --- Responsive Dashboard --- */
@media (max-width: 768px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        /* TODO: Mobile menu */
    }

    .main-content {
        padding: 20px;
    }
}