body { transition: background-color 0.3s ease, color 0.3s ease; }

.glass-nav {
    background: rgba(248, 250, 252, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.dark .glass-nav {
    background: rgba(10, 11, 20, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark .glass-card {
    background: linear-gradient(145deg, rgba(30, 32, 50, 0.7) 0%, rgba(15, 16, 25, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-zoom {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-zoom:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 1);
}
.dark .card-zoom:hover {
    background: linear-gradient(145deg, rgba(40, 42, 65, 0.9) 0%, rgba(20, 22, 35, 1) 100%);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
}

.how-card {
    position: relative;
    border-radius: 24px;
    padding: 2rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
.glass-card.how-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
.glass-card.how-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 1;
}
.dark .glass-card.how-card::before {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}
.how-card h3,
.how-card p {
    position: relative;
    z-index: 1;
}
.how-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.3);
    z-index: 10;
}

.dark .glass-card.how-card {
    background: linear-gradient(160deg, rgba(25, 27, 45, 0.8), rgba(15, 16, 25, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.dark .how-card:hover {
    box-shadow: 0 20px 40px rgba(99,102,241,0.2);
    border-color: #6366f1;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4); }
.btn-disabled { opacity: 1; cursor: default; }

.download-page .glass-nav a:not(.text-brand),
.download-page .glass-nav button,
.download-page .glass-nav #lang-select { color: white; }
.download-page .glass-nav #lang-select { border-color: rgba(255,255,255,0.3); }
.download-page .glass-nav img { filter: brightness(0) invert(1); }
.dark .download-page .glass-nav a:not(.text-brand),
.dark .download-page .glass-nav button,
.dark .download-page .glass-nav #lang-select { color: inherit; }
.dark .download-page .glass-nav #lang-select { border-color: rgba(255,255,255,0.1); }
.dark .download-page { background-color: #1a0550; }
[dir="rtl"] .download-page .hero-photo { transform: scaleX(-1); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .hero-title, [dir="rtl"] .font-black { font-family: 'Cairo', 'Inter', sans-serif; letter-spacing: normal; }
[dir="rtl"] .glass-card p, [dir="rtl"] .feat-card p, [dir="rtl"] .companies-title { font-size: 0.9375rem; }
[dir="rtl"] [data-i18n="how_title"], [dir="rtl"] [data-i18n="feat_title"] { padding-bottom: 0.5rem; }
[dir="rtl"] .glass-nav a, [dir="rtl"] .glass-nav button { font-family: 'Cairo', 'Inter', sans-serif; font-size: 0.9375rem; }
[dir="rtl"] .glass-nav { padding-top: 0.375rem; padding-bottom: 0.375rem; }
[dir="rtl"] .download-page [data-i18n^="dl_title"],
[dir="rtl"] .download-page [data-i18n^="dl_sub"],
[dir="rtl"] .download-page [data-i18n^="dl_btn"],
[dir="rtl"] .download-page [data-i18n^="dl_other_title"],
[dir="rtl"] .download-page [data-i18n^="dl_other_sub"],
[dir="rtl"] .download-page [data-i18n^="dl_btn_main"] { font-family: 'Cairo', 'Inter', sans-serif; }
[dir="rtl"] .download-page h2[data-i18n] { font-family: 'Cairo', 'Inter', sans-serif; letter-spacing: normal; }

.btn-secondary {
    background: rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #6366f1;
    transition: all 0.3s ease;
}
.dark .btn-secondary { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: white; }
.btn-secondary:hover { background: rgba(99, 102, 241, 0.15); transform: translateY(-2px); }

.video-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.8s ease-in-out; }
.video-active { opacity: 0.5; z-index: 1; }
.video-hidden { opacity: 0; z-index: 0; }
.dark .video-active { opacity: 0.2; }

.video-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, #f8fafc 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}
.dark .video-fade-bottom {
    background: linear-gradient(to top, #0a0b14 0%, transparent 100%);
}

#pricing-modal, #privacy-modal, #terms-modal, #cookie-settings-modal { transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-content {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dark .modal-content {
    background: rgba(10, 11, 20, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#privacy-modal .modal-content,
#terms-modal .modal-content,
#cookie-settings-modal .modal-content {
    background: rgba(255, 255, 255, 0.92);
}
.dark #privacy-modal .modal-content,
.dark #terms-modal .modal-content,
.dark #cookie-settings-modal .modal-content {
    background: rgba(10, 11, 20, 0.35);
}

.privacy-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    margin: -1rem 0 2rem 0;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}
.dark .privacy-header {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
}
#pricing-modal.hidden, #privacy-modal.hidden, #terms-modal.hidden, #cookie-settings-modal.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#pricing-modal.hidden .modal-content,
#privacy-modal.hidden .modal-content,
#terms-modal.hidden .modal-content,
#cookie-settings-modal.hidden .modal-content { transform: scale(0.95) translateY(20px); }

.hero-title {
    text-shadow: 0 2px 30px rgba(248, 250, 252, 0.95), 0 4px 60px rgba(248, 250, 252, 0.6);
}
.dark .hero-title {
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.95), 0 4px 60px rgba(0, 0, 0, 0.8);
}

.hero-title .hero-line {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    animation: heroReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-line-1 { animation-delay: 0.1s; }
.hero-line-2 {
    animation-delay: 0.4s;
    background-size: 200% auto;
    animation: heroReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards, shimmer 3s ease-in-out infinite 1.5s;
}
.hero-line-3 { animation-delay: 0.7s; }


@keyframes heroReveal {
    0% { opacity: 0; transform: translateY(40px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.1);
}

.prose-custom p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    font-size: 1.0625rem;
}
.prose-custom ul {
    margin-bottom: 1.25rem;
}
.prose-custom li {
    line-height: 1.7;
    font-size: 1.0625rem;
}

.blog-cover {
    position: relative;
}
.blog-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 50%);
    pointer-events: none;
}

#cookie-banner {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#cookie-banner.hide {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Feature cards - Dimensional Portal design */
.feat-card {
    position: relative;
    border-radius: 24px;
    padding: 2rem;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}
.dark .feat-card {
    background: linear-gradient(160deg, rgba(25, 27, 45, 0.8), rgba(15, 16, 25, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.feat-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 40px 80px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}
.dark .feat-card:hover {
    border-color: #6366f1;
}

/* Dot pattern overlay */
.feat-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.feat-card:hover .feat-overlay {
    opacity: 1;
}
.dark .feat-overlay {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* Diamond icon container */
.feat-icon-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
}
.feat-icon {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: rotate(45deg) scale(1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}
.feat-icon svg {
    transform: rotate(-45deg) scale(1);
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 24px;
    height: 24px;
    color: white;
}
.feat-card:hover .feat-icon {
    transform: rotate(135deg) scale(1.15);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}
.feat-card:hover .feat-icon svg {
    transform: rotate(-135deg) scale(1);
}

/* Content lift */
.feat-card h3 {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 1;
}
.feat-card:hover h3 {
    transform: translateY(-6px);
}
.feat-card p {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.08s;
    position: relative;
    z-index: 1;
}
.feat-card:hover p {
    transform: translateY(-4px);
}

/* Staggered delay for feature cards */
#features .grid > .feat-card:nth-child(1) .feat-icon { transition-delay: 0s; }
#features .grid > .feat-card:nth-child(2) .feat-icon { transition-delay: 0.03s; }
#features .grid > .feat-card:nth-child(3) .feat-icon { transition-delay: 0.06s; }
#features .grid > .feat-card:nth-child(4) .feat-icon { transition-delay: 0.09s; }
#features .grid > .feat-card:nth-child(5) .feat-icon { transition-delay: 0.12s; }
#features .grid > .feat-card:nth-child(6) .feat-icon { transition-delay: 0.15s; }

.scroll-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.logos-scroll {
    overflow: hidden;
    width: 100%;
    position: relative;
}
.logos-scroll::before,
.logos-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}
.logos-scroll::before {
    left: 0;
    background: linear-gradient(to right, #f8fafc 0%, transparent 100%);
}
.logos-scroll::after {
    right: 0;
    background: linear-gradient(to left, #f8fafc 0%, transparent 100%);
}
.dark .logos-scroll::before {
    background: linear-gradient(to right, #0a0b14 0%, transparent 100%);
}
.dark .logos-scroll::after {
    background: linear-gradient(to left, #0a0b14 0%, transparent 100%);
}
.logos-track {
    display: flex;
    align-items: center;
    animation: logoScroll 30s linear infinite;
    width: max-content;
    will-change: transform;
}
.logos-track img {
    height: 40px;
    width: auto;
    margin-right: 4rem;
    filter: grayscale(100%) opacity(0.3);
    transition: filter 0.3s ease;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.dark .logos-track img {
    filter: brightness(0) invert(0.85) opacity(0.35);
}
.logos-track:hover {
    animation-play-state: paused;
}
@keyframes logoScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

select { outline: none !important; }
select:focus { outline: none !important; }
select option {
    background: #fff;
    color: #111827;
}
.dark select option {
    background: #1f2937;
    color: #f3f4f6;
}

@media (max-width: 767px) {
    .glass-nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(248,250,252,0.92); }
    .dark .glass-nav { background: rgba(10,11,20,0.92); }
    .glass-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
    .feat-card:hover { transform: translateY(-6px) scale(1.01); }
    .feat-card:hover .feat-icon { transform: rotate(135deg) scale(1.05); }
    .feat-overlay { display: none; }
    .card-zoom:hover { transform: translateY(-4px); }
    #mobile-menu { transition: all 0.3s ease; }
    .video-fade-bottom { display: none !important; }
    #cookie-banner { z-index: 9999 !important; }
    #hero { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
    .dark #hero { background: linear-gradient(135deg, #0a0b14 0%, #1a1b2e 100%); }
    .how-card { transition: none !important; }
    #how-it-works { height: auto !important; }
    #how-it-works > div { position: relative !important; min-height: auto !important; }
    #features { margin-top: 0 !important; padding-top: 1.5rem !important; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: shimmer 6s ease-in-out 2s infinite;
    pointer-events: none;
}
.dark .btn-primary::after {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
}

[dir="rtl"] .hero-line-ar {
    display: inline-block;
    margin-top: 0.6rem;
}

.flatixel-logo {
    display: inline-block;
    vertical-align: middle;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}
.flatixel-logo::after {
    content: '';
    position: absolute;
    inset: 0;
}
.dark .flatixel-logo {
    filter: brightness(0) invert(1);
}

#privacy-modal .modal-content::-webkit-scrollbar,
#terms-modal .modal-content::-webkit-scrollbar {
    width: 5px;
}
#privacy-modal .modal-content::-webkit-scrollbar-button,
#terms-modal .modal-content::-webkit-scrollbar-button {
    display: none;
}
#privacy-modal .modal-content::-webkit-scrollbar-track,
#terms-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
}
#privacy-modal .modal-content::-webkit-scrollbar-thumb,
#terms-modal .modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}
#privacy-modal .modal-content,
#terms-modal .modal-content {
    scrollbar-color: #6366f1 transparent;
}
@media (max-width: 767px) {
    #privacy-modal .modal-content::-webkit-scrollbar,
    #terms-modal .modal-content::-webkit-scrollbar {
        width: 3px;
    }
}

.download-icon-box {
    animation: dl-icon-glow 3s ease-in-out infinite, dl-icon-float 4s ease-in-out infinite;
}
@keyframes dl-icon-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); background: rgba(0,0,0,0.1); }
    50% { box-shadow: 0 0 30px 4px rgba(99, 102, 241, 0.25); background: rgba(99, 102, 241, 0.2); }
}
@keyframes dl-icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.dark .download-icon-box {
    animation: dl-icon-glow-dark 3s ease-in-out infinite, dl-icon-float 4s ease-in-out infinite;
}
@keyframes dl-icon-glow-dark {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.15); background: rgba(255,255,255,0.08); }
    50% { box-shadow: 0 0 30px 4px rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.25); }
}
