/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: var(--bg-primary);
}

/* Header and Navigation */
.main-header {
    background: var(--header-gradient);
    padding: 1.5rem 0;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #007AFF;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Only apply gradient in light mode */
[data-theme="light"] .hero-content h1,
:root:not([data-theme="dark"]) .hero-content h1 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-content h1 {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Override for purchase info text */
.hero-content .purchase-info {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
    opacity: 0.8;
    width: 100%;
}

.cta {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
}

.download-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 240px; /* Width of the App Store button */
}

.app-store-button {
    display: block;
    width: 100%;
}

.app-store-button img {
    height: 40px;
    width: 100%;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.app-store-button:hover img {
    transform: scale(1.05);
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: -0.5rem;
}

.original-price {
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.7;
}

.promotional-price {
    font-size: 2rem;
    font-weight: 600;
    color: #007AFF;
    background: linear-gradient(135deg, #007AFF 0%, #00C6FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-top: -0.25rem;
}

.promo-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.feature-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #007AFF;
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    text-align: center;
}

/* Why BookExt Section */
.why-bookext {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.why-bookext h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.benefit {
    text-align: center;
    padding: 2rem;
}

.benefit h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #007AFF;
}

/* FAQ Section */
.faq {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.faq-item {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #007AFF;
}

.contact-info {
    text-align: center;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-top: 2rem;
    padding: 0 2rem;
}

.contact-info a {
    color: #007AFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Testimonials Section */
.testimonials {
    padding: 6rem 2rem;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.testimonial-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

blockquote {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

blockquote p {
    font-style: italic;
    margin-bottom: 1rem;
}

blockquote cite {
    color: #666;
    font-style: normal;
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 4rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007AFF;
}

.footer-copyright {
    color: #666;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .benefits,
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .feature-grid,
    .benefits,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Privacy Policy Page */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.privacy-header {
    padding: 2rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.privacy-header .back-to-home {
    text-decoration: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
    display: inline-block;
}

.privacy-header .header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.privacy-header .back-to-home span {
    font-size: 2rem;
    font-weight: 600;
}

.privacy-header .back-to-home:hover {
    color: var(--accent-color);
}

.privacy-header img {
    border-radius: 24px;
}

.privacy-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.privacy-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.privacy-content h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.privacy-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.privacy-content ul {
    margin: 1rem 0 2rem 2rem;
    color: var(--text-secondary);
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

.privacy-content a {
    color: #007AFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-content a:hover {
    text-decoration: underline;
}

.privacy-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Responsive adjustments for privacy page */
@media (max-width: 768px) {
    .privacy-container {
        padding: 1rem;
    }

    .privacy-content h1 {
        font-size: 2rem;
    }

    .privacy-content h2 {
        font-size: 1.25rem;
    }

    .privacy-intro {
        font-size: 1.1rem;
    }
}

/* Color Variables */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #666;
    --accent-color: #007AFF;
    --accent-gradient: linear-gradient(135deg, #007AFF 0%, #00C6FF 100%);
    --card-bg: #ffffff;
    --card-shadow: 0 10px 20px rgba(0,0,0,0.05);
    --header-gradient: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
}

/* Dark mode styles */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --card-bg: #2a2a2a;
    --card-shadow: 0 10px 20px rgba(0,0,0,0.2);
    --header-gradient: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
}

/* System preference dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #1a1a1a;
        --bg-secondary: #242424;
        --text-primary: #e0e0e0;
        --text-secondary: #a0a0a0;
        --card-bg: #2a2a2a;
        --card-shadow: 0 10px 20px rgba(0,0,0,0.2);
        --header-gradient: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
    }
}

/* Theme Selector Styles */
.theme-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
}

.theme-toggle:hover {
    background: rgba(128, 128, 128, 0.1);
    color: var(--accent-color);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

[data-theme="dark"] .sun-icon,
:root:not([data-theme="light"]) .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .moon-icon,
:root:not([data-theme="light"]) .moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .sun-icon,
:root:not([data-theme="dark"]) .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .moon-icon,
:root:not([data-theme="dark"]) .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

/* Privacy Page Dark Mode */
.privacy-content {
    color: var(--text-primary);
}

.privacy-content h1,
.privacy-content h2 {
    color: var(--text-primary);
}

.privacy-intro,
.privacy-content ul {
    color: var(--text-secondary);
}

.back-to-home {
    color: var(--text-primary);
}

.back-to-home:hover {
    color: var(--accent-color);
}

/* Apply variables to existing styles */
body {
    color: var(--text-primary);
}

.main-header {
    background: var(--header-gradient);
}

nav a {
    color: var(--text-primary);
}

.hero-content h1 {
    background: var(--accent-gradient);
}

.hero-content p {
    color: var(--text-secondary);
}

.feature-item, .faq-item, blockquote {
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.feature-item p, .benefit p {
    color: var(--text-secondary);
}

.features, .faq {
    background: var(--bg-secondary);
}

footer {
    background: var(--bg-secondary);
}

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

.important-notice {
    display: block;
    font-size: 1.3rem;
    margin: 1.5rem 0;
    color: var(--text-primary);
    font-weight: 700;
}

.purchase-info {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
    text-align: left;
}

/* Support Page Styles */
.support-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.support-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.support-header .back-to-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.support-header .back-to-home:hover {
    color: var(--accent-color);
}

.support-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.support-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.support-content #faq {
    padding: 0;
    background: none;
    margin-bottom: 4rem;
}

.support-content #faq h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* Feedback Form Styles */
.feedback-form {
    padding: 3rem 0;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.feedback-form h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.feedback-form p {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.feedback-form form {
    max-width: 600px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.submit-button {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 122, 255, 0.2);
}

/* Accordion Styles */
.accordion {
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.accordion-item {
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.accordion-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-question::after {
    transform: rotate(45deg);
}

.accordion-item.active .accordion-question {
    /* Optional: Add a subtle background for active question */
    /* background-color: rgba(128, 128, 128, 0.05); */
}

.accordion-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: rgba(128, 128, 128, 0.03);
}

.accordion-answer p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.accordion-item.active .accordion-answer {
    max-height: 500px; /* Adjust as needed for longest answer */
    padding-top: 0; /* Adjust padding directly in p if needed */
}

/* Remove default FAQ item styles if they exist */
.faq-grid .faq-item {
  display: none; /* Hide old grid items if selector still exists */
}

/* Compliance Page Styles */
.compliance-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.compliance-header {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.compliance-header .back-to-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.3s ease;
}

.compliance-header .back-to-home:hover {
    color: var(--accent-color);
}

.compliance-content {
    color: var(--text-primary);
    line-height: 1.7;
}

.compliance-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.compliance-content h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.compliance-content ul {
    list-style: disc;
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.compliance-content p {
    margin-bottom: 1rem;
}

.compliance-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.compliance-content a:hover {
    text-decoration: underline;
    opacity: 0.8;
} 