:root {
    /* Light Theme Colors */
    --bg-gradient-start: #fafbfc;
    --bg-gradient-end: #f5f7fa;
    --overview-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --overview-text: #ffffff;
    --features-bg: #f5f7fa;
    --feature-card-1-bg: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    --feature-card-2-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --feature-card-3-bg: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --feature-card-4-bg: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --feature-card-5-bg: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --feature-card-6-bg: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --feature-card-7-bg: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --feature-card-8-bg: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --feature-card-9-bg: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    --feature-card-10-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --feature-card-11-bg: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --feature-card-12-bg: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --feature-card-13-bg: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --feature-card-14-bg: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --feature-card-15-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --feature-card-text: #ffffff;
    --privacy-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --privacy-text: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
}

body.dark-theme {
    /* Dark Theme Colors */
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --overview-bg: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --overview-text: #f1f5f9;
    --features-bg: #1a2332;
    --feature-card-1-bg: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --feature-card-2-bg: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --feature-card-3-bg: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --feature-card-4-bg: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --feature-card-5-bg: linear-gradient(135deg, #f97316 0%, #eab308 100%);
    --feature-card-6-bg: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    --feature-card-7-bg: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
    --feature-card-8-bg: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --feature-card-9-bg: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);
    --feature-card-10-bg: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --feature-card-11-bg: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --feature-card-12-bg: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --feature-card-13-bg: linear-gradient(135deg, #f97316 0%, #eab308 100%);
    --feature-card-14-bg: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    --feature-card-15-bg: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --feature-card-text: #f1f5f9;
    --privacy-bg: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --privacy-text: #f1f5f9;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Theme Toggle */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    background: var(--overview-bg);
    padding: 12px 16px;
    border-radius: 50px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.theme-icon {
    width: 20px;
    height: 20px;
    color: var(--overview-text);
    flex-shrink: 0;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(255, 255, 255, 0.5);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

@media (max-width: 768px) {
    .theme-toggle-container {
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        gap: 8px;
    }

    .theme-label {
        font-size: 10px;
    }

    .theme-switch {
        width: 40px;
        height: 22px;
    }

    .slider:before {
        height: 18px;
        width: 18px;
    }

    input:checked + .slider:before {
        transform: translateX(18px);
    }
}

/* Floating Home Button */
.floating-home-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 999;
    background: var(--overview-bg);
    color: var(--overview-text);
    padding: 14px 24px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
}

.floating-home-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.floating-home-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--overview-text);
    stroke-width: 2;
    fill: none;
}

@media (max-width: 768px) {
    .floating-home-btn {
        bottom: 20px;
        left: 20px;
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .floating-home-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease, transform 0.3s ease;
}

body.dark-theme .card {
    background: #1a2332;
}

/* Overview Card */
.overview-card {
    background: var(--overview-bg);
    color: var(--overview-text);
    animation: slideInDown 0.6s ease;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.app-icon {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.overview-card h1 {
    font-size: 3.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 30px;
    font-weight: 300;
}

.overview-details p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.95;
}

.key-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.platform-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.platform-icon-large {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.platform-icon-large:hover {
    transform: scale(1.15);
}

body.dark-theme .platform-icons img:first-child {
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Features Section */
.features-card {
    background: var(--overview-bg) !important;
    color: var(--overview-text) !important;
}

body.dark-theme .features-card {
    background: #1a2332 !important;
    color: var(--overview-text) !important;
}

.features-card h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
    animation: fadeIn 0.6s ease;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    animation: fadeIn 0.8s ease 0.2s both;
    margin-bottom: 20px;
}

.feature-card {
    border-radius: 16px;
    padding: 20px 18px;
    color: var(--feature-card-text) !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Individual Feature Card Colors */
.feature-card-1 {
    background: var(--feature-card-1-bg) !important;
}

.feature-card-2 {
    background: var(--feature-card-2-bg) !important;
}

.feature-card-3 {
    background: var(--feature-card-3-bg) !important;
}

.feature-card-4 {
    background: var(--feature-card-4-bg) !important;
}

.feature-card-5 {
    background: var(--feature-card-5-bg) !important;
}

.feature-card-6 {
    background: var(--feature-card-6-bg) !important;
}

.feature-card-7 {
    background: var(--feature-card-7-bg) !important;
}

.feature-card-8 {
    background: var(--feature-card-8-bg) !important;
}

.feature-card-9 {
    background: var(--feature-card-9-bg) !important;
}

.feature-card-10 {
    background: var(--feature-card-10-bg) !important;
}

.feature-card-11 {
    background: var(--feature-card-11-bg) !important;
}

.feature-card-12 {
    background: var(--feature-card-12-bg) !important;
}

.feature-card-13 {
    background: var(--feature-card-13-bg) !important;
}

.feature-card-14 {
    background: var(--feature-card-14-bg) !important;
}

.feature-card-15 {
    background: var(--feature-card-15-bg) !important;
}
/* TEST: Direct dark theme styles */
body.dark-theme .feature-card-1 {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

body.dark-theme .feature-card-2 {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%) !important;
}

body.dark-theme .feature-card-3 {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%) !important;
}

body.dark-theme .feature-card-4 {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%) !important;
}

body.dark-theme .feature-card-5 {
    background: linear-gradient(135deg, #f97316 0%, #eab308 100%) !important;
}

body.dark-theme .feature-card-6 {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%) !important;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 35px;
    height: 35px;
    stroke-width: 2;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Privacy Card */
.privacy-card {
    background: var(--privacy-bg);
    color: var(--privacy-text);
}

.privacy-card h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Policy content improvements for readability */
.policy-card {
    background: white;
    color: var(--text-primary);
    border-radius: 16px;
    padding: 48px 40px;
    margin: 40px auto 60px;
    box-shadow: var(--card-shadow);
    max-width: 900px;
}

.policy-card h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.policy-card .small {
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: block;
}

.policy-card h2 {
    font-size: 1.15rem;
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.policy-card p,
.policy-card li {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
}

.policy-card ul {
    margin-left: 1.2rem;
    margin-bottom: 0.8rem;
}

@media (max-width: 768px) {
    .policy-card {
        padding: 28px 20px;
        margin: 24px 16px 40px;
    }
}

.release-link {
    margin-top: 20px;
    text-align: center;
}

.release-link .privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.release-link .privacy-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Changelog Card */
.changelog-card {
    background: var(--features-bg);
    color: var(--text-primary);
}

.changelog-card h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
}

.changelog-content {
    max-width: 800px;
    margin: 0 auto;
}

.release-item {
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--overview-bg);
}

body.dark-theme .release-item {
    background: #0f172a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.release-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.release-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.release-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.release-changes h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 8px 0;
    color: var(--text-primary);
}

.release-changes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.release-changes li {
    padding: 4px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.release-changes li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--overview-bg);
    font-weight: bold;
}

@media (max-width: 768px) {
    .release-item {
        padding: 16px;
    }

    .release-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .release-header h3 {
        font-size: 1.3rem;
    }

    .release-date {
        font-size: 0.85rem;
    }
}

/* Policy header + icon */
.policy-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    text-align: center;
}

.policy-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--overview-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.policy-icon svg {
    width: 26px;
    height: 26px;
    stroke: white;
    stroke-width: 1.5;
    fill: none;
}

@media (max-width: 480px) {
    .policy-icon { width: 48px; height: 48px; }
    .policy-icon svg { width: 22px; height: 22px; }
}

/* Ensure smooth/native scrolling on mobile devices */
html {
    height: auto;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

html, body {
    height: auto;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* App modal also allows touch scrolling */
.app-modal {
    -webkit-overflow-scrolling: touch;
}

.privacy-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.privacy-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.privacy-section:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.privacy-section h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.privacy-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.95;
}

.privacy-cta {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.privacy-link {
    display: inline-block;
    color: var(--privacy-text);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 30px;
    border: 2px solid var(--privacy-text);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.privacy-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Features CTA */
.features-cta {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.features-link {
    display: inline-block;
    color: var(--privacy-text);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 30px;
    border: 2px solid var(--privacy-text);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 10px;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
}

.features-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    margin-bottom: 8px;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 50px 30px 30px;
    }

    .card {
        padding: 40px 30px;
        margin-bottom: 30px;
    }

    .overview-card h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .features-section h2 {
        font-size: 2rem;
    }

    .privacy-card h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 40px 16px 20px;
    }

    .card {
        padding: 30px 20px;
        margin-bottom: 20px;
        border-radius: 16px;
    }

    .overview-card h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .overview-details p {
        font-size: 0.95rem;
    }

    .key-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-card h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .feature-card {
        padding: 25px 18px;
    }

    .feature-icon {
        width: 65px;
        height: 65px;
    }

    .feature-icon svg {
        width: 35px;
        height: 35px;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    .privacy-card h2 {
        font-size: 1.3rem;
    }

    .privacy-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .privacy-section {
        padding: 20px;
    }

    .privacy-section h3 {
        font-size: 1rem;
    }

    .privacy-section p {
        font-size: 0.9rem;
    }

    .overview-content {
        animation: slideInDown 0.6s ease;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 12px 15px;
    }

    .card {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }

    .overview-card h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .tagline {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .overview-details p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .info-label {
        font-size: 0.75rem;
    }

    .info-value {
        font-size: 0.95rem;
    }

    .features-section h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .feature-card {
        padding: 20px 15px;
    }

    .feature-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }

    .feature-icon svg {
        width: 30px;
        height: 30px;
    }

    .feature-card h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .feature-card p {
        font-size: 0.85rem;
    }

    .privacy-card h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .privacy-section {
        padding: 15px;
    }

    .privacy-section h3 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .privacy-section p {
        font-size: 0.85rem;
    }

    .privacy-link {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .footer {
        padding: 20px 10px;
        font-size: 0.8rem;
    }
}
