/* CSS Variables for theming */
:root {
    /* Light theme colors (matching app) */
    --bg-light: #FAF8F5;
    --fg-light: #2C2C2C;
    --card-light: #FFFFFF;
    --card-fg-light: #2C2C2C;
    --primary-light: #2C2C2C;
    --primary-fg-light: #FFFFFF;
    --secondary-light: #E8E3DC;
    --secondary-fg-light: #2C2C2C;
    --muted-light: #E8E3DC;
    --muted-fg-light: #8B8680;
    --accent-light: #D4CFC7;
    --input-bg-light: #F5F1EC;
    --border-light: rgba(139, 134, 128, 0.15);
    
    /* Dark theme colors (matching app) */
    --bg-dark: #1A1A1A;
    --fg-dark: #E8E3DC;
    --card-dark: #252525;
    --card-fg-dark: #E8E3DC;
    --primary-dark: #E8E3DC;
    --primary-fg-dark: #1A1A1A;
    --secondary-dark: #2C2C2C;
    --secondary-fg-dark: #E8E3DC;
    --muted-dark: #2C2C2C;
    --muted-fg-dark: #8B8680;
    --accent-dark: #3D3D3D;
    --input-bg-dark: #2C2C2C;
    --border-dark: rgba(232, 227, 220, 0.1);
    
    /* Current theme (defaults to light) */
    --bg: var(--bg-light);
    --fg: var(--fg-light);
    --card: var(--card-light);
    --card-fg: var(--card-fg-light);
    --primary: var(--primary-light);
    --primary-fg: var(--primary-fg-light);
    --secondary: var(--secondary-light);
    --secondary-fg: var(--secondary-fg-light);
    --muted: var(--muted-light);
    --muted-fg: var(--muted-fg-light);
    --accent: var(--accent-light);
    --input-bg: var(--input-bg-light);
    --border: var(--border-light);
}

/* Dark theme */
[data-theme="dark"] {
    --bg: var(--bg-dark);
    --fg: var(--fg-dark);
    --card: var(--card-dark);
    --card-fg: var(--card-fg-dark);
    --primary: var(--primary-dark);
    --primary-fg: var(--primary-fg-dark);
    --secondary: var(--secondary-dark);
    --secondary-fg: var(--secondary-fg-dark);
    --muted: var(--muted-dark);
    --muted-fg: var(--muted-fg-dark);
    --accent: var(--accent-dark);
    --input-bg: var(--input-bg-dark);
    --border: var(--border-dark);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.header-controls {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
}

.icon-button {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    padding: 0;
}

.lang-flag {
    width: 24px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}


.icon-button:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.icon-button:active {
    transform: scale(0.95);
}

.app-name {
    font-family: 'Cookie', cursive;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.tagline {
    font-size: 1.25rem;
    color: var(--muted-fg);
    font-weight: 500;
    margin-bottom: 2rem;
}

.app-icon-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    transition: opacity 0.3s ease;
}

.app-icon-light {
    display: block;
}

.app-icon-dark {
    display: none;
}

[data-theme="dark"] .app-icon-light {
    display: none;
}

[data-theme="dark"] .app-icon-dark {
    display: block;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

/* Content pages (Privacy Policy, Contact) */
.content-page {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.content-page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.content-page-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--card-fg);
}

.content-page-body {
    color: var(--card-fg);
    line-height: 1.8;
}

.content-page-body h1,
.content-page-body h2,
.content-page-body h3 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-page-body h1 {
    font-size: 1.75rem;
}

.content-page-body h2 {
    font-size: 1.5rem;
}

.content-page-body h3 {
    font-size: 1.25rem;
}

.content-page-body p {
    margin-bottom: 1rem;
}

.content-page-body ul,
.content-page-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-page-body li {
    margin-bottom: 0.5rem;
}

.contact-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.contact-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.contact-email {
    margin-top: 1rem;
}

.email-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.email-link:hover {
    color: var(--muted-fg);
    text-decoration: underline;
}

.description {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.description-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--card-fg);
}

.features-list {
    list-style: none;
    padding-left: 0;
}

.features-list li {
    padding: 0.75rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--card-fg);
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
}

/* Screenshots */
.screenshots h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 600;
}

.screenshots-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.screenshots-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--muted-fg) transparent;
    flex: 1;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
}

.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: transparent;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background: var(--muted-fg);
    border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.screenshot-item {
    flex: 0 0 auto;
    width: 200px;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: none;
}

.screenshot-item.active {
    display: block;
}

.screenshot-item:hover {
    transform: scale(1.05);
}

.screenshot-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    aspect-ratio: 9 / 16;
    object-fit: cover;
    display: block;
}

.screenshot-placeholder {
    aspect-ratio: 9 / 16;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-fg);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
    flex: 0 0 auto;
    width: 200px;
}

.carousel-btn {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--fg);
    flex-shrink: 0;
    padding: 0;
}

.carousel-btn:hover {
    background: var(--secondary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

/* Signup form */
.signup {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.signup h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 600;
}

.signup-text {
    margin-bottom: 2rem;
    color: var(--card-fg);
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--card-fg);
}

input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--fg);
    transition: all 0.2s ease;
}

input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 44, 44, 0.1);
}

[data-theme="dark"] input[type="email"]:focus,
[data-theme="dark"] textarea:focus {
    box-shadow: 0 0 0 3px rgba(232, 227, 220, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.char-count {
    text-align: right;
    font-size: 0.875rem;
    color: var(--muted-fg);
    margin-top: 0.25rem;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
}

.radio-label:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.radio-text {
    color: var(--card-fg);
    font-weight: 500;
}

.radio-label input[type="radio"]:checked ~ .radio-text {
    color: var(--primary);
    font-weight: 600;
}

/* Submit button */
.submit-button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary);
    color: var(--primary-fg);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    position: relative;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-loading {
    display: none;
}

.submit-button.loading .submit-text {
    display: none;
}

.submit-button.loading .submit-loading {
    display: inline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .app-name {
        font-size: 2.5rem;
    }
    
    .header-controls {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .signup {
        padding: 1.5rem;
    }
    
    .content-page {
        padding: 1.5rem;
    }
    
    .content-page-title {
        font-size: 1.75rem;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .radio-label {
        width: 100%;
    }
    
    .screenshot-item {
        width: 150px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
}

/* Print styles */
@media print {
    .header-controls,
    .signup {
        display: none;
    }
}
