/* CSS Variables for Color Scheme */
:root {
    --primary-blue: #3b82f6;
    --primary-purple: #8b5cf6;
    --secondary-blue: #1e40af;
    --secondary-purple: #7c3aed;
    --light-blue: #dbeafe;
    --light-purple: #e9d5ff;
    --cream: #fef7ed;
    --dark-text: #1f2937;
    --light-text: #6b7280;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
.navbar {
    background: var(--gradient);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
}

.nav-logo {
    display: block;
}

.logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

#username-display {
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: 0.3s;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-tertiary {
    background: var(--light-purple);
    color: var(--secondary-purple);
}

.btn-tertiary:hover {
    background: var(--secondary-purple);
    color: var(--white);
}

.btn-nav {
    background: var(--light-blue);
    color: var(--secondary-blue);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-nav:hover:not(:disabled) {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Enhanced Homepage Hero Section */
.hero {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-purple) 50%, #f8fafc 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 75%;
    height: 200%;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 50%;
    z-index: 0;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo-img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: lowercase;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--light-text);
    font-weight: 600;
}

/* Hero Visual Elements */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-gradient-circle {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    border-radius: 50%;
    position: absolute;
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

.floating-books {
    position: relative;
    width: 400px;
    height: 400px;
}

.book {
    position: absolute;
    font-size: 3rem;
    animation: float 6s ease-in-out infinite;
}

.book-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.book-2 {
    top: 10%;
    right: 20%;
    animation-delay: -1s;
}

.book-3 {
    bottom: 30%;
    left: 10%;
    animation-delay: -2s;
}

.book-5 {
    top: 35%;
    left: 35%;
    /*transform: scale(1.5);*/
    animation-delay: -4s;
    font-size: 5rem;
}

.book-6 {
    top: 70%;
    left: 60%;
    transform: translate(-50%, -50%);
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
    75% { transform: translateY(-30px) rotate(-5deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.2; }
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-illustration {
    font-size: 8rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Enhanced Features Section */
.features {
    padding: 6rem 0;
    background: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    font-weight: 800;
}

.features-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    text-align: left;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    font-weight: 700;
}

.feature-card p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--light-text);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
}

/* Enhanced feature card sections */
.publishing-problems {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fef7ed, #fdf2f8);
    border-radius: 12px;
    border-left: 4px solid var(--primary-purple);
}

.byouk-solution {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--light-blue), var(--light-purple));
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
}

.publishing-problems h4,
.byouk-solution h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--dark-text);
    font-weight: 600;
}

.publishing-problems p,
.byouk-solution p {
    margin-bottom: 1rem;
    color: var(--light-text);
    line-height: 1.6;
}

.byouk-solution p {
    color: var(--dark-text);
}

.highlight {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-blue) !important;
    text-align: center;
    margin: 0 !important;
    padding: 1rem 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--light-blue), var(--light-purple));
}

.how-it-works h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--dark-text);
    font-weight: 800;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    background: var(--white);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    background: var(--gradient);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 2rem;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    font-weight: 700;
}

.step-content p {
    color: var(--light-text);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--gradient);
    text-align: center;
    color: var(--white);
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Enhanced Footer */
footer {
    background: var(--dark-text);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    align-items: center;
    text-align: center;
}

.footer-logo{
    margin-bottom: 2rem;
}

.footer-logo-img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}
/*
.footer-logo-img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
    max-width: 100%;
    object-fit: contain;
}*/

/* Fallback for logo display issues */
/*.footer-logo img {
    
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
    max-width: 100%;
    object-fit: contain;
}*/

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-text p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-visual {
        height: 300px;
    }
    
    .floating-books {
        width: 300px;
        height: 300px;
    }
    
    .book {
        font-size: 2rem;
    }
    
    .book-5 {
        font-size: 3rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
}

/* Book Editor Styles */
.book-editor {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    background: var(--light-blue);
}

.editor-sidebar {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.editor-sidebar h3 {
    color: var(--dark-text);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.book-info {
    margin-bottom: 2rem;
}

.book-title-input,
.author-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-blue);
    border-radius: 0.5rem;
    font-family: inherit;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.book-title-input:focus,
.author-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.editor-controls {
    margin-bottom: 2rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--light-blue);
    border-radius: 0.5rem;
    font-family: inherit;
}

.slider {
    width: 100%;
    margin-bottom: 0.5rem;
}

.book-actions {
    margin-bottom: 2rem;
}

.book-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
}

.page-info {
    background: var(--light-purple);
    padding: 1rem;
    border-radius: 0.5rem;
}

.page-info p {
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

/* Book Content Area */
.book-content {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.book-pages {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.book-page {
    width: 8.5in;
    height: 11in;
    background: var(--cream);
    box-shadow: var(--shadow-lg);
    padding: 1in;
    border-radius: 0.5rem;
    display: none;
    position: relative;
    overflow: hidden;
}

.book-page.active {
    display: block;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-text);
}

.page-number {
    font-size: 1.2rem;
    color: var(--light-text);
    font-weight: bold;
}

.page-content {
    height: 9in;
    font-family: Georgia, serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    outline: none;
    padding: 1rem 0;
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
}

.page-content:empty:before {
    content: attr(data-placeholder);
    color: var(--light-text);
    font-style: italic;
}

.page-content:focus:empty:before {
    content: '';
}

/* Animations for automatic page notifications */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.page-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* My Books Page */
.my-books {
    padding: 2rem 0;
    min-height: calc(100vh - 160px);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.book-card {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: transform 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--light-blue);
    border-radius: 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 2rem;
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--light-text);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Submit Book Page */
.submit-book {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--light-blue), var(--light-purple));
    min-height: calc(100vh - 160px);
}

.submission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.info-card,
.form-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.info-card h2,
.form-card h2 {
    color: var(--dark-text);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.features-list {
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

.feature-text h3 {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.feature-text p {
    color: var(--light-text);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--light-blue);
    border-radius: 0.5rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submission-cost {
    background: var(--light-purple);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.submission-cost h3 {
    color: var(--secondary-purple);
    margin-bottom: 0.5rem;
}

.submission-guidelines {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.submission-guidelines h2 {
    text-align: center;
    color: var(--dark-text);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guideline {
    background: var(--light-blue);
    padding: 2rem;
    border-radius: 1rem;
}

.guideline h3 {
    color: var(--dark-text);
    margin-bottom: 1rem;
}

.guideline ul {
    list-style: none;
}

.guideline li {
    margin-bottom: 0.5rem;
    color: var(--light-text);
    position: relative;
    padding-left: 1.5rem;
}

.guideline li:before {
    content: '•';
    color: var(--primary-blue);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Footer */
footer {
    background: var(--dark-text);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .book-editor {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar {
        position: static;
    }
    
    .book-page {
        width: 100%;
        height: 70vh;
        padding: 2rem;
        overflow: hidden;
    }
    
    .page-content {
        height: calc(70vh - 8rem); /* Account for padding and header */
        overflow: hidden;
    }
    
    .submission-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .guidelines-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .book-page {
        padding: 1rem;
        height: 60vh;
        overflow: hidden;
    }
    
    .page-content {
        height: calc(60vh - 6rem); /* Account for padding and header */
        overflow: hidden;
    }
}
