/* ========================================
   CSS VARIABLES - THEME COLORS
   ======================================== */
:root {
    /* Primary Colors */
    --primary: #6c3b9e;
    --primary-dark: #4a1a7a;
    --primary-light: #9b6fc0;
    --primary-gradient: linear-gradient(135deg, #6c3b9e, #9b6fc0);
    
    /* Secondary Colors */
    --secondary: #ff6b6b;
    --secondary-light: #ff8a8a;
    --secondary-gradient: linear-gradient(135deg, #ff6b6b, #ee5a24);
    
    /* Neutral Colors */
    --text-dark: #2d1b3c;
    --text-medium: #5a3d7a;
    --text-light: #8a7a9a;
    --white: #ffffff;
    --off-white: #faf5ff;
    --gray: #f0edf5;
    --border-color: #e8e0f0;
    
    /* Backgrounds */
    --bg-light: #f8f4ff;
    --bg-gradient: linear-gradient(135deg, #f5efff 0%, #e9dffa 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(108, 59, 158, 0.1);
    --shadow-md: 0 8px 30px rgba(108, 59, 158, 0.15);
    --shadow-lg: 0 15px 50px rgba(108, 59, 158, 0.25);
    --shadow-hover: 0 20px 60px rgba(108, 59, 158, 0.3);
    
    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 20px;
    --container-max: 1200px;
    
    /* Border Radius */
    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 50px;
    
    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* ========================================
   HEADER / NAVBAR
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 15px 0;
    background: transparent;
    transition: var(--transition-slow);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.header-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo i {
    font-size: 2rem;
    color: var(--primary);
}

.logo h1 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.header.scrolled .logo h1 {
    color: var(--text-dark);
}

.logo span {
    color: var(--secondary);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.header.scrolled .nav-menu a {
    color: var(--text-dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--secondary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 3px;
}

.header.scrolled .hamburger span {
    background: var(--text-dark);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 20px 60px;
    position: relative;
    background: var(--primary-gradient);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    color: var(--white);
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    animation: fadeInDown 0.8s ease;
}

.hero-text h1 {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-text h1 span {
    color: var(--secondary);
}

.hero-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 500px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--secondary);
    color: var(--white);
    padding: 14px 32px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--white);
    padding: 14px 32px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-3px);
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 5px 18px;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: var(--font-primary);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header h2 span {
    color: var(--primary);
}

.section-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   AUTHORS SECTION
   ======================================== */
.authors {
    padding: var(--section-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.author-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.author-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.author-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.author-card:hover .author-image img {
    transform: scale(1.05);
}

.author-social {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    transform: translateY(20px);
    opacity: 0;
}

.author-card:hover .author-social a {
    transform: translateY(0);
    opacity: 1;
}

.author-social a:hover {
    background: var(--primary);
    color: var(--white);
}

.author-info {
    padding: 25px;
    flex: 1;
}

.author-info h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.author-badge {
    display: inline-block;
    background: #fef3c7;
    color: #b45309;
    padding: 2px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.author-info p {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.author-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.author-stats span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.author-stats i {
    color: var(--primary);
    margin-right: 5px;
}

/* ========================================
   AUTHOR BOOKS SECTION
   ======================================== */
.author-books-section {
    max-width: var(--container-max);
    margin: 0 auto 50px auto;
}

.author-books-title {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-light);
    position: relative;
}

.author-books-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.author-books-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

/* ========================================
   BOOKS SECTION
   ======================================== */
.books {
    padding: var(--section-padding);
    background: var(--off-white);
}

.books-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.book-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.book-cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
}

/* Book cover icons */
.book-cover .fa-fang,
.book-cover .fa-crown,
.book-cover .fa-moon,
.book-cover .fa-heart,
.book-cover .fa-sugar,
.book-cover .fa-wave-square,
.book-cover .fa-eye {
    font-size: 4rem;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.book-info {
    padding: 20px;
}

.book-author {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.book-info h4 {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    margin: 8px 0 10px;
}

.book-info p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.book-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.book-meta i {
    color: var(--secondary);
    margin-right: 3px;
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats {
    background: var(--primary-gradient);
    padding: 60px 20px;
    color: var(--white);
}

.stats-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.8;
}

.stat-number {
    display: block;
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */
.testimonials {
    padding: var(--section-padding);
    max-width: var(--container-max);
    margin: 0 auto;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-rating {
    color: #f59e0b;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 15px;
    line-height: 1.7;
}

.testimonial-author strong {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
}

.testimonial-author span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.newsletter {
    padding: 80px 20px;
    background: var(--bg-light);
}

.newsletter-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.newsletter-content h2 span {
    color: var(--primary);
}

.newsletter-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 59, 158, 0.1);
}

.newsletter-form button {
    padding: 14px 30px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(108, 59, 158, 0.3);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 60px 20px 0;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-section .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-section .logo i {
    font-size: 1.8rem;
    color: var(--secondary);
}

.footer-section .logo h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin: 0;
}

.footer-section .logo h3 span {
    color: var(--secondary);
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
    color: #aaa;
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: #aaa;
    text-decoration: none;
    padding: 5px 0;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 8px;
}

.footer-section p i {
    width: 20px;
    margin-right: 8px;
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    font-size: 0.85rem;
    color: #666;
}

/* ========================================
   RESPONSIVE - FOOTER
   ======================================== */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section .logo {
        justify-content: center;
    }
    
    .footer-section a {
        text-align: center;
    }
    
    .footer-section a:hover {
        padding-left: 0;
    }
}

/* Tablet Small (768px) */
@media (max-width: 768px) {
    .header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 12px 0;
    }
    
    .header .logo h1 {
        color: var(--text-dark);
    }
    
    .header .hamburger span {
        background: var(--text-dark);
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        transition: var(--transition-slow);
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-menu a {
        color: var(--text-dark) !important;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-text p {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image img {
        max-height: 300px;
        object-fit: cover;
    }
    
    .authors-grid {
        grid-template-columns: 1fr;
    }
    
    .books-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-section .logo {
        justify-content: flex-start;
    }
    
    .social-links {
        justify-content: flex-start;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .author-books-title {
        font-size: 1.6rem;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-text p {
        font-size: 0.95rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section .logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .author-info h3 {
        font-size: 1.4rem;
    }
    
    .book-cover {
        height: 150px;
        font-size: 3rem;
    }
    
    .footer-section a {
        text-align: center;
    }
    
    .footer-section a:hover {
        padding-left: 0;
    }
    
    .author-books-title {
        font-size: 1.3rem;
    }
    
    .author-books-title::after {
        width: 60px;
    }
}

/* Extra Small (360px) */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-item i {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .author-books-title {
        font-size: 1.1rem;
    }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   SELECTION STYLING
   ======================================== */
::selection {
    background: var(--primary);
    color: var(--white);
}