:root {
    /* Color Palette - Pristine Productivity */
    --clr-bg: #ffffff;
    --clr-surface: #fcfcfd;
    --clr-text: #1d1d1f;
    --clr-text-secondary: #424245;
    --clr-text-muted: #86868b;
    
    --clr-word: #2b579a;
    --clr-word-hover: #1e3e6d;
    --clr-excel: #217346;
    --clr-excel-hover: #164d2f;
    
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 20px 40px rgba(0,0,0,0.04);
    
    /* Typography */
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing & Motion */
    --container-width: 1040px;
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--clr-bg);
}

body {
    font-family: var(--font-ui);
    color: var(--clr-text);
    background-color: var(--clr-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

[dir="rtl"] {
    font-family: var(--font-ui);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 72px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo,
.logo:hover,
.logo:focus,
.logo:visited,
.logo:active {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--clr-text);
    text-decoration: none;
    cursor: pointer;
}

.logo-text {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover .logo-text {
    opacity: 0.7;
}

.logo-img {
    height: 30px;
    width: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-links {
    display: flex;
    gap: 16px;
}

.nav-link {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#word-btn {
    background: rgba(43, 87, 154, 0.1);
    color: var(--clr-word);
    border: 1px solid rgba(43, 87, 154, 0.15);
}

#word-btn:hover {
    background: rgba(43, 87, 154, 0.2);
    box-shadow: 0 4px 12px rgba(43, 87, 154, 0.1);
    transform: translateY(-1px);
}

#excel-btn {
    background: rgba(33, 115, 70, 0.1);
    color: var(--clr-excel);
    border: 1px solid rgba(33, 115, 70, 0.15);
}

#excel-btn:hover {
    background: rgba(33, 115, 70, 0.2);
    box-shadow: 0 4px 12px rgba(33, 115, 70, 0.1);
    transform: translateY(-1px);
}

.lang-switcher select {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--clr-text-secondary);
}

/* Main Wrapper */
.content-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 140px 32px 100px;
    min-height: 80vh;
}

/* Content Typography */
#app-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(38px, 6.5vw, 68px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
    text-align: center;
    color: var(--clr-text);
    background: linear-gradient(180deg, #1d1d1f 0%, #424245 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#app-content h3 {
    font-size: clamp(17px, 2.5vw, 21px);
    font-weight: 400;
    color: var(--clr-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    line-height: 1.6;
}

#app-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    margin: 110px 0 36px;
    text-align: center;
    letter-spacing: -0.025em;
    color: var(--clr-text);
}

#app-content p {
    font-size: 17px;
    color: var(--clr-text-secondary);
    margin-bottom: 24px;
    text-align: center;
    line-height: 1.65;
}

/* Media Elements */
#app-content img, 
#app-content .video-container {
    display: block;
    max-width: 100%;
    width: 100%;
    margin: 80px auto;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
    background: white;
    overflow: hidden;
}

#app-content video {
    width: 100%;
    display: block;
    border-radius: var(--radius-xl);
}

/* Feature Grid */
#app-content ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 80px;
}

#app-content li {
    background: var(--clr-surface);
    padding: 48px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

#app-content li:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow);
    background: white;
}

#app-content li strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--clr-text);
}

/* CTA Group */
.cta-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 80px 0;
}

.btn-primary, .btn-excel {
    display: inline-block;
    padding: 20px 48px;
    border-radius: 60px;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--clr-word);
    color: white;
}

.btn-primary:hover {
    background: var(--clr-word-hover);
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(43, 87, 154, 0.2);
}

.btn-excel {
    background: var(--clr-excel);
    color: white;
}

.btn-excel:hover {
    background: var(--clr-excel-hover);
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(33, 115, 70, 0.2);
}

/* Support Panel */
.support-panel {
    max-width: 560px;
    margin: 60px auto 0;
    padding: 56px 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--card-shadow);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.support-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-text-muted);
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--glass-border);
    padding: 5px 14px;
    border-radius: 50px;
}

.support-heading {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--clr-text);
    margin: 0;
}

.support-desc {
    font-size: 16px;
    color: var(--clr-text-secondary);
    max-width: 400px;
    margin: 0;
    text-align: center;
}

.btn-support {
    display: inline-block;
    margin-top: 8px;
    padding: 16px 40px;
    border-radius: 60px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--clr-text);
    transition: var(--transition);
}

.btn-support:hover {
    background: #3a3a3c;
    transform: scale(1.02);
    box-shadow: 0 16px 32px rgba(0,0,0,0.15);
}

/* Footer */
.footer {
    padding: 100px 0;
    background: var(--clr-surface);
    border-top: 1px solid var(--glass-border);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--clr-text-muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

[dir="rtl"] .footer-links {
    justify-content: flex-start;
}

.footer-links a {
    color: var(--clr-text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 140px 0;
}

.loader-circle {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0,0,0,0.05);
    border-top-color: var(--clr-text);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 60px auto 140px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq-item {
    background: var(--clr-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    transition: var(--transition);
}

.faq-item:hover {
    background: white;
    box-shadow: var(--card-shadow);
    transform: translateY(-4px);
}

.faq-question {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--clr-text);
    margin-bottom: 12px;
    text-align: left;
}

[dir="rtl"] .faq-question {
    text-align: right;
}

.faq-answer {
    font-size: 16px !important;
    color: var(--clr-text-secondary);
    line-height: 1.6;
    margin-bottom: 0 !important;
    text-align: left !important;
}

[dir="rtl"] .faq-answer {
    text-align: right !important;
}

/* Smooth-scroll anchor offset so fixed navbar doesn't cover the target */
#download {
    scroll-margin-top: 90px;
}

/* Purchase Disclosure Note */
.purchase-note {
    font-size: 13px !important;
    color: var(--clr-text-muted) !important;
    text-align: center !important;
    max-width: 580px;
    margin: -40px auto 80px !important;
    line-height: 1.55 !important;
    padding: 0 24px;
}

/* Legal pages (Privacy, Terms, EULA, Impressum) */
.legal-page #app-content h1,
#app-content.legal-page h1 {
    font-size: clamp(32px, 5vw, 44px);
    text-align: left;
    background: none;
    -webkit-text-fill-color: var(--clr-text);
    margin-bottom: 24px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.legal-page #app-content h2,
#app-content.legal-page h2 {
    font-size: 24px;
    text-align: left;
    margin: 48px auto 16px;
    max-width: 760px;
}

.legal-page #app-content h3,
#app-content.legal-page h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--clr-text);
    text-align: left;
    margin: 32px auto 12px;
    max-width: 760px;
}

.legal-page #app-content p,
#app-content.legal-page p {
    text-align: left;
    font-size: 16px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.legal-page #app-content ul,
#app-content.legal-page ul {
    display: block;
    list-style: disc;
    padding-left: 24px;
    margin: 16px auto;
    max-width: 760px;
    grid-template-columns: none;
    gap: 0;
}

.legal-page #app-content li,
#app-content.legal-page li {
    background: none;
    padding: 6px 0;
    border: none;
    margin-bottom: 0;
    font-size: 16px;
    color: var(--clr-text-secondary);
}

.legal-page #app-content li:hover,
#app-content.legal-page li:hover {
    transform: none;
    background: none;
    box-shadow: none;
}

.legal-page #app-content li strong,
#app-content.legal-page li strong {
    display: inline;
    font-size: inherit;
    margin-bottom: 0;
}

[dir="rtl"] .legal-page #app-content h1,
[dir="rtl"] #app-content.legal-page h1,
[dir="rtl"] .legal-page #app-content h2,
[dir="rtl"] #app-content.legal-page h2,
[dir="rtl"] .legal-page #app-content h3,
[dir="rtl"] #app-content.legal-page h3,
[dir="rtl"] .legal-page #app-content p,
[dir="rtl"] #app-content.legal-page p,
[dir="rtl"] .legal-page #app-content li,
[dir="rtl"] #app-content.legal-page li {
    text-align: right;
}

[dir="rtl"] .legal-page #app-content ul,
[dir="rtl"] #app-content.legal-page ul {
    padding-left: 0;
    padding-right: 24px;
}

/* Cookie Consent Banner */
#cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 880px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    padding: 24px 28px;
    z-index: 2000;
    animation: cookieBannerSlide 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes cookieBannerSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1 1 380px;
    text-align: left;
}

#cookie-banner[dir="rtl"] .cookie-banner-text {
    text-align: right;
}

.cookie-banner-text h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--clr-text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.cookie-banner-text p {
    font-size: 14px;
    color: var(--clr-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--clr-text);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
}

.cookie-btn-accept,
.cookie-btn-reject {
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--clr-text);
    color: white;
    border: 1px solid var(--clr-text);
}

.cookie-btn-accept:hover {
    background: #3a3a3c;
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--clr-text-secondary);
    border: 1px solid var(--glass-border);
}

.cookie-btn-reject:hover {
    border-color: var(--clr-text-secondary);
    color: var(--clr-text);
}

@media (max-width: 600px) {
    #cookie-banner {
        padding: 20px;
        bottom: 12px;
        left: 12px;
        right: 12px;
    }
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .cookie-banner-actions {
        flex-direction: column-reverse;
        width: 100%;
    }
    .cookie-btn-accept,
    .cookie-btn-reject {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-actions { display: none; }
    .content-wrapper { padding-top: 100px; }
    #app-content h1 { font-size: 48px; }
    .cta-group { flex-direction: column; padding: 0 40px; }
    .footer-wrap { flex-direction: column; gap: 32px; text-align: center; }
    .footer-links { justify-content: center; }
    [dir="rtl"] .footer-links { justify-content: center; }
    .purchase-note { margin-top: -20px !important; margin-bottom: 60px !important; }
}

[dir="rtl"] { text-align: right; }
[dir="rtl"] #app-content h1,
[dir="rtl"] #app-content h2,
[dir="rtl"] #app-content h3,
[dir="rtl"] #app-content p { text-align: center; }
