/* CSS Custom Properties for Theme System */
:root {
    /* Light theme (default) */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-hero: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.9) 60%, #fff 80%);
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #666666;
    --text-hero: rgb(0, 0, 0);
    --accent-color: #4A90E2;
    --accent-hover: #357ABD;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.15);
    --phone-bg: #ffffff;
    --phone-accent: #f8f8f8;
    --footer-bg: #ffffff;
    --footer-text: rgb(0, 0, 0);
    --simple-header-bg: #333333;
    --simple-header-text: #ffffff;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #121212;
        --bg-secondary: #1e1e1e;
        --bg-hero: linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 0.3) 40%, rgba(18, 18, 18, 0.9) 60%, #1e1e1e 80%);
        --text-primary: #e0e0e0;
        --text-secondary: #b0b0b0;
        --text-muted: #999999;
        --text-hero: rgb(255, 255, 255);
        --accent-color: #64B5F6;
        --accent-hover: #90CAF9;
        --border-color: #333333;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --phone-bg: #2d2d2d;
        --phone-accent: #3d3d3d;
        --footer-bg: #1e1e1e;
        --footer-text: rgb(255, 255, 255);
        --simple-header-bg: #0d1117;
        --simple-header-text: #ffffff;
    }

    /* Dark theme hero background */
    .hero {
        background: var(--bg-hero), url('images/banner_dark.png') !important;
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }

    /* Dark theme image replacements */
    .phone-mockup img[src="images/empty.png"] {
        content: url('images/empty_dark.png');
    }
    
    .phone-mockup img[src="images/toc.png"] {
        content: url('images/toc_dark.png');
    }
    
    .phone-mockup img[src="images/read.png"] {
        content: url('images/read_dark.png');
    }
}

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

body {
    font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Typography */
h1, h2, h3 {
    font-weight: 400;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: var(--bg-hero), url('images/banner.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-hero);
    padding: 10px 0;
    text-align: center;
    min-height: 40vh;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.75rem;
    font-weight: 300;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* App Images */
.app-images {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero .app-store-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.phone-mockup {
    width: 330px;
    height: 700px;
    background-color: var(--phone-bg);
    border-radius: 50px;
    padding: 10px;
    box-shadow: 17px 20px 25px var(--shadow-color);
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background: var(--phone-bg);
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    top: 230px;
    right: -4px;
    width: 4px;
    height: 100px;
    background: var(--phone-accent);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 40px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Download Section */
.download-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    text-align: center;
    transition: background-color 0.3s ease;
}

.download-section h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.app-store-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.app-store-btn {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.app-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
    text-decoration: none;
}

.app-store-btn svg {
    display: block;
    transition: all 0.3s ease;
}

.google-play svg rect {
    fill: white
}

/* About Section */
.about-section {
    background: var(--bg-secondary);
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.about-section .container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0;
}

.about-icon {
    width: 180px;
    height: 180px;
    border-radius: 25px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 17px 20px 25px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.about-content {
    flex: 1;
}

.about-section h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: left;
    transition: color 0.3s ease;
}

.about-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: left;
    margin: 0;
    transition: color 0.3s ease;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-right {
    flex: 1;
    text-align: right;
}

.footer p {
    margin-bottom: 0rem;
}

.footer a {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-hover);
}

/* Simple Header for Privacy Policy */
.simple-header {
    background: var(--simple-header-bg);
    color: var(--simple-header-text);
    padding: 20px 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.simple-header h1 a {
    color: var(--simple-header-text);
    font-size: 1.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.simple-header h1 a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Privacy Policy Content */
.privacy-content {
    padding: 60px 0;
    background: var(--bg-secondary);
    min-height: 70vh;
    transition: background-color 0.3s ease;
}

.privacy-content h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.last-updated {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.privacy-content section {
    margin-bottom: 2.5rem;
}

.privacy-content h2 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.privacy-content h3 {
    color: var(--text-secondary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.privacy-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
        min-height: 60vh;
        background-attachment: scroll;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .app-images {
        gap: 1rem;
    }

    
    .download-section,
    .about-section {
        padding: 60px 0;
    }
    
    .about-section {
        background-attachment: scroll;
    }
    
    .about-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .about-icon {
        width: 80px;
        height: 80px;
        align-self: center;
    }
    
    .about-content {
        text-align: center;
    }
    
    .about-section h2 {
        text-align: center;
    }
    
    .about-section p {
        text-align: center;
    }
    
    .app-store-buttons {
        gap: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .about-section p {
        font-size: 1rem;
    }
    
    .privacy-content {
        padding: 40px 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .app-store-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .app-store-btn svg {
        width: 120px;
        height: auto;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

