﻿        .auth-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(25px);
            z-index: 2100;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .auth-card {
            width: 90%;
            max-width: 400px;
            padding: 2rem;
            border-radius: 1rem;
            background: rgba(20, 20, 20, 0.8);
            border: 1px solid var(--glass-border);
            text-align: center;
        }

        .auth-card h2 {
            margin-bottom: 0.5rem;
        }

        .auth-card p {
            opacity: 0.6;
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }

        .input-group {
            margin-bottom: 1rem;
        }

        .input-group input {
            width: 100%;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 0.8rem;
            color: white;
            font-family: var(--font-sans);
        }

        .input-group input:focus {
            border-color: var(--accent);
        }

        .auth-footer {
            margin-top: 1rem;
            font-size: 0.9rem;
        }

        .auth-footer button {
            background: #363636;
            border: none;
            color: #ffffff;
            cursor: pointer;
            font-weight: bold;
            font-family: inherit;
        }

        :root {
            --visual-height: 100dvh;
            font-size: clamp(13px, 1.1vw, 17px);
            --bg-color: #000000;
            --glass: rgba(255, 255, 255, 0.03);
            --glass-border: rgba(255, 255, 255, 0.08);
            --text-primary: #FFFFFF;
            --text-secondary: #888888;
            --accent: #00f2ff;
            --font-sans: 'Noto Sans Arabic', 'Inter', sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            --reject-red: #ff3b30;
            --transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
            --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body,
        html {
            width: 100%;
            background-color: var(--bg-color);
            color: var(--text-primary);
            font-family: var(--font-sans);
            overflow-x: hidden;
            -webkit-text-size-adjust: none;
            text-size-adjust: none;
            touch-action: manipulation;
        }

        body::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--grain);
            opacity: 0.04;
            pointer-events: none;
            z-index: 9999;
        }

        .mouse-glow {
            position: fixed;
            top: 0;
            left: 0;
            width: 45rem;
            height: 45rem;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
            border-radius: 50%;
            pointer-events: none;
            z-index: 0;
            transform: translate(-50%, -50%);
            transition: opacity 0.3s ease;
        }

        nav#main-nav {
            position: fixed;
            top: 1rem;
            left: 50%;
            transform: translateX(-50%);
            width: 70%;
            max-width: 55rem;
            height: 4rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 2.5rem;
            z-index: 1000;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(25px);
            border: 1px solid var(--glass-border);
            border-radius: 100px;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        nav#main-nav.scrolled {
            width: 95% !important;
            max-width: 75rem !important;
            top: 1rem !important;
            background: rgba(0, 0, 0, 0.7);
            border-color: rgba(255, 255, 255, 0.15);
        }

        .logo {
            font-weight: 300;
            font-size: 1.05rem;
            font-family: 'Inter';
            letter-spacing: 0;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .logo svg {
            width: 1.1em;
            height: 1.1em;
            display: block;
        }

        .logo span {
            font-weight: 300;
            font-size: inherit;
            letter-spacing: 5px;
            opacity: 0.8;
            margin-bottom: -1px;
            text-transform: uppercase;
        }

        .nav-links {
            display: flex;
            gap: 2.5rem;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-secondary);
            font-size: 0.9rem;
            font-weight: 600;
            transition: 0.3s;
        }

        .nav-links a:hover {
            color: #fff;
        }

        .fixed-branding {
            position: fixed;
            font-size: clamp(6rem, 20vw, 16rem);
            font-weight: 800;
            color: white;
            opacity: 0.07;
            z-index: 1;
            pointer-events: none;
            white-space: nowrap;
            font-family: 'Inter', sans-serif;
            letter-spacing: var(--l-spacing, 0);
            transition: opacity 0.5s ease;
        }

        #bg-lxd {
            top: 80%;
            left: 2%;
            transform: translateY(-50%);
            transition: top 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        }

        #bg-emaj {
            top: 65%;
            right: 2%;
            transform: translateY(-50%);
            opacity: 0;
        }

        #landing-content {
            width: 100%;
            position: relative;
            z-index: 10;
        }

        .section-hero {
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        .hero-tag {
            font-family: var(--font-mono);
            color: var(--text-secondary);
            font-size: 0.75rem;
            letter-spacing: 0.3rem;
            margin-bottom: 1rem;
            opacity: 0.6;
        }

        .tagline {
            font-size: clamp(2rem, 5vw, 3.5rem);
            font-weight: 800;
            line-height: 2.2;
            margin-bottom: 4rem;
        }

        .tagline span {
            font-size: 0.7em;
            display: block;
            opacity: 0.7;
            margin-top: -1rem;
        }

        .cta-button {
            padding: 1.4rem 4rem;
            background: #fff;
            color: #000;
            border: none;
            border-radius: 100px;
            font-weight: 800;
            cursor: pointer;
            transition: 0.3s cubic-bezier(0.2, 0, 0.2, 1);
            font-size: 1.1rem;
            box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
        }

        .cta-button:active {
            transform: scale(0.96);
        }

        @media (max-width: 768px) {
            .cta-button {
                padding: 1rem 2.5rem;
                font-size: 0.95rem;
            }

            .section-hero .flash-btn {
                height: 3.2rem !important;
                padding: 0 1.2rem !important;
                font-size: 0.85rem !important;
            }
        }

        .info-section {
            padding: 15vh 10%;
            max-width: 90rem;
            margin: 0 auto;
        }

        .section-header {
            display: flex;
            align-items: center;
            gap: 2rem;
            margin-bottom: 6rem;
        }

        .section-label {
            font-family: var(--font-mono);
            color: var(--text-secondary);
            font-size: 0.8rem;
            letter-spacing: 0.1rem;
        }

        .section-line {
            height: 1px;
            background: linear-gradient(90deg, var(--glass-border), transparent);
            flex-grow: 1;
        }

        .service-row {
            display: grid;
            grid-template-columns: 0.8fr 1.2fr;
            gap: 4rem;
            align-items: start;
            margin-bottom: 10vh;
        }

        .service-info h3 {
            font-size: 2.2rem;
            font-weight: 800;
            margin-bottom: 1rem;
        }

        .service-info p {
            font-size: 1.1rem;
            color: var(--text-secondary);
            line-height: 1.7;
        }

        .grid-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
            gap: 2rem;
        }

        .feature-box {
            background: var(--glass);
            border: 1px solid var(--glass-border);
            padding: 4rem 3rem;
            border-radius: 2.5rem;
            backdrop-filter: blur(25px);
            transition: var(--transition);
        }

        .feature-box:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: rgba(255, 255, 255, 0.2);
        }

        @media (max-width: 768px) {
            .hero-tag {
                font-size: 0.6rem;
                letter-spacing: 0.2rem;
            }

            .tagline {
                font-size: clamp(1.8rem, 8vw, 2.5rem);
                line-height: 1.4;
                margin-bottom: 2.5rem;
            }

            .tagline span {
                margin-top: 0.5rem;
                font-size: 0.8em;
            }

            .info-section {
                padding: 8vh 6%;
            }

            .section-header {
                margin-bottom: 3rem;
            }

            .service-row {
                grid-template-columns: 1fr;
                gap: 2rem;
                margin-bottom: 5vh;
            }

            .service-info h3 {
                font-size: 1.6rem;
            }

            .service-info p {
                font-size: 0.95rem;
            }

            .grid-container {
                grid-template-columns: 1fr;
            }

            .feature-box {
                padding: 2.5rem 2rem;
                border-radius: 1rem;
            }

            .feature-box h3 {
                font-size: 1.3rem;
            }

            .fixed-branding {
                opacity: 0.05;
            }

            #bg-lxd {
                font-size: clamp(5rem, 15vw, 12rem);
            }

            #bg-emaj {
                font-size: clamp(7rem, 20vw, 15rem);
            }

            footer {
                padding: 5vh 5%;
                font-size: 0.6rem;
            }

            .view-input {
                padding: 1rem;
                width: 95%;
                margin-top: -8vh;
            }

            .input-bar-wrapper {
                padding: 1.2rem;
                border-radius: 1rem;
                gap: 1rem;
                width: 100%;
            }

            #promptInput {
                font-size: 1rem;
                min-height: 4rem;
            }

            .submit-icon-btn {
                width: 2.4rem;
                height: 2.4rem;
                border-radius: 0.8rem;
                font-size: 0.9rem;
            }

            .flash-btn {
                width: 2.5rem;
                min-width: 2.5rem;
                height: 2.5rem;
                padding: 0;
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .flash-btn svg {
                width: 0.9rem;
                height: 0.9rem;
            }

            .action-group {
                gap: 0.8rem;
                margin-top: 1.2rem;
            }

            .mode-switch {
                height: 2.6rem;
                max-width: 100%;
                border-radius: 1rem;
            }

            .mode-option {
                font-size: 0.8rem;
                border-radius: 0.8rem;
            }

            .mode-slider {
                border-radius: 0.8rem;
            }

            .card-stack {
                height: 65vh;
                aspect-ratio: 9 / 16;
                width: auto;
                max-width: 90vw;
                max-height: 600px;
                margin-bottom: 1rem;
                margin-top: 1vh;
            }

            .controls {
                gap: 1.2rem;
                margin-bottom: 2vh;
                z-index: 150;
                position: relative;
            }

            .btn-circle {
                width: 2.8rem;
                height: 2.8rem;
                backdrop-filter: none;
                background: rgba(255, 255, 255, 0.1);
            }

            .btn-main {
                width: 3.2rem;
                height: 3.2rem;
            }

            .card {
                box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
            }
        }

        .card {
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        }


        .card.is-loading {
            background: rgba(0, 0, 0, 0.7) !important;
            backdrop-filter: blur(5px) !important;
        }

        @media (max-height: 500px) {

            header,
            .logo-container,
            .profile-avatar-btn,
            #creditStatus {
                display: none !important;
            }

            #inputView {
                justify-content: flex-start !important;
                padding-top: 10px;
            }

            .card-stack {
                height: 180px !important;
                max-height: 180px !important;
                flex-grow: 0 !important;
            }

            #promptInput {
                max-height: 150px;
                overflow-y: auto;
            }
        }



        #main-app {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100dvh;
            background: #000;
            z-index: 2000;
            display: none;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .view-input {
            width: 90%;
            max-width: 650px;
            text-align: center;
            transition: opacity 0.5s ease;
        }

        .input-bar-wrapper {
            background: rgba(20, 20, 20, 0.6);
            backdrop-filter: blur(25px) saturate(120%);
            border: 1px solid var(--glass-border);
            border-radius: 1rem;
            padding: 1.2rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.6);
            width: 100%;
            max-width: 40rem;
            margin: 0 auto;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        #promptInput {
            width: 100%;
            min-height: 40px;
            max-height: 20vh;
            font-size: 16px;
            background: transparent;
            border: none;
            color: #fff;
            font-size: 1.1rem;
            line-height: 1.6;
            direction: rtl;
            resize: none;
            outline: none;
            font-family: inherit;
            font-family: inherit;
            padding-bottom: 0;
            transition: padding 0.3s;
        }



        .white-btn,
        .cta-button {
            background: #ffffff !important;
            color: rgb(0, 0, 0) !important;
            border: none;
            padding: 0.8rem 1rem;
            border-radius: 999px;
            font-family: inherit;
            font-weight: 600;
            width: 100%;
            cursor: pointer;
            transition: transform 0.2s ease;
            box-shadow: none !important;
        }

        .white-btn:active,
        .cta-button:active {
            transform: scale(0.98);
        }

        .auth-card.glass-panel {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            backdrop-filter: none !important;
        }

        .auth-divider {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            position: relative;
            margin: 0.5rem 0;
            opacity: 0.5;
        }

        .auth-divider::before,
        .auth-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: white;
        }

        .auth-divider span {
            padding: 0 1rem;
            font-size: 0.8rem;
            font-weight: bold;
        }

        .google-btn {
            background: white;
            color: #333;
            border: none;
            padding: 0.8rem;
            border-radius: 0.5rem;
            font-family: inherit;
            font-weight: 600;
            width: 100%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

        .google-btn:hover {
            background: #f1f1f1;
        }

        .google-btn:hover {
            background: #f1f1f1;
        }

        .close-pro-btn {
            position: absolute;
            top: 2rem;
            right: 1rem;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            border-radius: 50%;
            width: 2.5rem;
            height: 2.5rem;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 9999 !important;
            color: #fff;
            backdrop-filter: blur(10px);
            position: fixed;
        }

        .close-pro-btn svg {
            width: 1rem;
            height: 1rem;
            fill: currentColor;
        }

        body.pro-mode .close-pro-btn {
            display: flex !important;
        }


        body.pro-mode #resultArea {
            display: none !important;
        }

        body.pro-mode header {
            display: none !important;
            opacity: 0 !important;
            pointer-events: none;
        }

        body.pro-mode .input-bar-wrapper {
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            transform: translateY(0) !important;
            max-width: 100% !important;
            width: 100% !important;
            border-radius: 0 !important;
            margin: auto !important;
        }

        body.pro-mode {
            background: rgba(20, 20, 20, 0.6) !important;
        }

        body.pro-mode #main-app {
            background: #141414;
        }

        body.pro-mode #promptInput {
            max-height: 55vh !important;
            padding-bottom: 6rem !important;
            box-sizing: content-box !important;
        }


        body.keyboard-open .copyright-text {
            opacity: 0 !important;
            pointer-events: none !important;
            position: absolute;
            z-index: -1;
        }

        body.keyboard-open .view-input {
            width: 100% !important;
            max-width: 100% !important;
        }

        body.pro-mode.keyboard-open #inputView {
            position: fixed !important;
            top: 0 !important;
            bottom: 0 !important;
            left: 0 !important;
            width: 100dvw !important;
            height: 100dvh !important;
            padding: 6rem 0 0 0 !important;
            margin: 0 !important;
            background: transparent !important;
            z-index: 9999 !important;
            overflow: hidden !important;
            display: flex !important;
            flex-direction: column !important;
            justify-content: flex-end !important;
            box-sizing: border-box !important;
        }

        body.pro-mode.keyboard-open .input-bar-wrapper {
            position: static !important;
            width: 100% !important;
            height: 100% !important;
            margin: 0 !important;
            padding: 0.5rem 1rem !important;
            box-sizing: border-box !important;
            background: rgba(20, 20, 20, 0.6) !important;
            backdrop-filter: blur(25px) saturate(120%) !important;
            display: flex !important;
            flex-direction: column !important;
        }

        body.pro-mode.keyboard-open #promptInput {
            width: 100% !important;
            height: 100% !important;
            min-height: 0 !important;
            max-height: none !important;
            resize: none !important;
            overflow-y: auto !important;
            flex-grow: 1 !important;
        }

        body.pro-mode.keyboard-open .edit-controls-bar {
            position: static !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0.5rem 1rem !important;
        }

        body.pro-mode.keyboard-open header,
        body.pro-mode.keyboard-open #resultArea {
            display: none !important;
        }

        body.pro-mode #inputView {
            justify-content: center !important;
            height: 100dvh !important;
        }

        body.pro-mode .input-bar-wrapper {
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
            height: auto !important;
        }

        body.pro-mode .edit-controls-bar {
            position: absolute;
            bottom: 2rem;
            width: 100%;
            left: 0;
            padding: 0 1rem;
        }

        .submit-icon-btn {
            background: #fff;
            width: 2.8rem;
            height: 2.8rem;
            flex-shrink: 0;
            border-radius: 0.8rem;
            border: none;
            color: #000;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            transition: 0.3s;
            padding: 0;
            display: grid;
            place-items: center;
        }

        .submit-icon-btn i {
            display: block;
            line-height: 0;
            transform: rotate(45deg);
        }

        .mode-switch {
            position: relative;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--glass-border);
            border-radius: 1rem;
            display: flex;
            padding: 0.2rem;
            backdrop-filter: blur(25px);
            margin: 0;
            width: fit-content;
            height: 2.8rem;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            align-items: center;
            transition: all 0.4s ease;
        }

        .mode-switch.collapsed {
            min-width: unset;
        }

        .mode-switch.collapsed .mode-option span {
            display: none !important;
        }

        .mode-switch.collapsed .mode-option {
            flex: none;
            width: 2.4rem;
            height: calc(100% - 0.2rem);
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .mode-switch.collapsed .mode-option i {
            display: flex;
            margin: 0 auto;
        }

        .mode-slider.hidden {
            opacity: 0;
        }

        .count-indicator {
            width: 2.2rem;
            height: 2.22rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-family: var(--font-mono);
            background: rgba(255, 255, 255, 0.05);
            border-radius: 0.7rem;
            margin: 0 0.1rem;
            flex-shrink: 0;
            z-index: 5;
        }

        .count-indicator .cost {
            font-size: 0.5rem;
            opacity: 0.5;
        }

        .count-indicator .number {
            font-size: 0.85rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.7);
        }

        .mode-option {
            flex: 1;
            height: 100%;
            border-radius: 0.85rem;
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0 0.8rem;
            position: relative;
            z-index: 2;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .mode-option span {
            transition: width 0.3s, opacity 0.3s, margin 0.3s;
            white-space: nowrap;
        }

        .mode-option:nth-child(n+4)::before {
            content: "";
            position: absolute;
            right: 0;
            top: 25%;
            height: 50%;
            width: 1px;
            background: rgba(255, 255, 255, 0.1);
            transition: opacity 0.3s;
        }

        .mode-option.active::before,
        .mode-option.active+.mode-option::before {
            opacity: 0 !important;
        }

        .mode-option:hover i {
            opacity: 1;
        }

        .mode-option.active {
            color: #fff;
        }

        .mode-option i {
            font-size: 1.1rem;
            color: currentColor;
            opacity: 0.6;
            transition: opacity 0.3s;
            display: none;
            align-items: center;
        }

        .mode-option.active i {
            opacity: 1;
        }

        .mode-slider {
            position: absolute;
            top: 0.2rem;
            height: calc(100% - 0.4rem);
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 0.85rem;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 1;
        }

        .action-group {
            display: flex;
            gap: 0.8rem;
            align-items: center;
            justify-content: flex-start;
            margin-top: 1rem;
            width: 100%;
        }

        .submit-icon-btn:active,
        .flash-btn:active,
        .btn-circle:active,
        .btn-main:active {
            transform: scale(0.92);
        }

        .view-gallery {
            width: 100%;
            height: 100%;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            padding-top: 60px;
            padding-bottom: 2rem;
            opacity: 0;
            transform: scale(0.95);
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .view-gallery.active {
            display: flex;
            opacity: 1;
            transform: scale(1);
        }



        .card-stack {
            position: relative;
            height: 70dvh;
            /* Slightly reduced for better fit */
            width: auto;
            /* Let aspect ratio drive width */
            aspect-ratio: 9/16;
            perspective: 1000px;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: auto;
            margin-bottom: auto;
            z-index: 50;
        }

        .card {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 2.5rem;
            overflow: hidden;
            background: #0a0a0a;
            border: 1px solid var(--glass-border);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
            cursor: grab;
            transition: transform 0.15s ease;
            user-select: none;
            -webkit-user-drag: none;
            will-change: transform;
            transform-style: preserve-3d;
            backface-visibility: hidden;
        }

        .card.error-card {
            background: #000000 !important;
            border: 2px solid #ff3b30 !important;
            backdrop-filter: none !important;
        }

        .card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            pointer-events: none;
        }

        .card-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            pointer-events: none;
            z-index: 2;
            border-radius: 2.5rem;
            overflow: hidden;
        }

        .card-overlay::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            mix-blend-mode: overlay;
            opacity: 0.1;
        }

        .card-overlay.reject::before {
            background: #ff3b30;
            opacity: 0.1;
        }

        .card-overlay.save::before {
            background: #00f2ff;
            opacity: 0.1;
        }

        .stamp {
            position: absolute;
            top: 3rem;
            font-size: 2rem;
            font-weight: 800;
            padding: 0.3rem 1rem;
            border-radius: 0.5rem;
            text-transform: uppercase;
            font-family: inherit;
            border: 3px solid currentColor;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
            background: transparent;
        }

        .card-overlay.reject {
            background: transparent;
        }

        .card-overlay.save {
            background: transparent;
        }

        .card-overlay.reject .stamp {
            right: 2.5rem;
            color: var(--reject-red);
        }

        .card-overlay.save .stamp {
            left: 2.5rem;
            color: var(--accent);
        }

        .controls {
            display: flex;
            /* Ensure flex for centering and items */
            justify-content: center;
            /* Center controls */
            gap: 0.8rem;
            /* Tighter gap */
            margin-top: 0;
            /* Handled by gap */
            width: 100%;
            z-index: 100;
            flex-wrap: nowrap;
            /* Force single row */
            align-items: center;
            /* Center buttons vertically on the cross axis */
        }

        .btn-circle {
            background: var(--glass);
            border: 1px solid var(--glass-border);
            width: 3.2rem;
            height: 3.2rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #fff;
            transition: 0.3s;
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            padding: 0;
            place-items: center;
        }

        .btn-small-action {
            width: 3.2rem;
            height: 3.2rem;
            opacity: 0.8;
        }

        .copyright-text {
            text-align: center;
            font-family: var(--font-mono);
            font-size: 0.75rem;
            /* Larger font */
            color: var(--text-secondary);
            opacity: 0.4;
            text-transform: uppercase;
            letter-spacing: 1px;
            display: block;
            margin-top: 1rem;
            width: 100%;
        }

        .btn-circle:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .btn-main {
            width: 4rem;
            height: 4rem;
            background: #fff;
            color: #000;
            border: none;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
            transition: 0.3s;
            padding: 0;
            font-size: 1rem;
            place-items: center;
        }

        svg {
            fill: currentColor;
            width: 26px;
            height: 26px;
        }

        .hidden {
            display: none !important;
        }

        .loader-container {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100%;
            width: 100%;
            background: #000;
            gap: 1rem;
        }

        .loader {
            width: 56px;
            height: 56px;
            border: 4px solid rgba(255, 255, 255, 0.05);
            border-bottom-color: var(--accent);
            border-radius: 50%;
            animation: rotation 1s linear infinite;
        }

        @keyframes rotation {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        .error-container {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            height: 100%;
            width: 100%;
            background: #000;
            padding: 2.5rem;
            text-align: center;
            border: 2px solid rgba(255, 59, 48, 0.3);
            border-radius: 2.5rem;
        }

        .error-title {
            color: #ff3b30;
            font-size: 1.8rem;
            font-weight: 800;
            margin-bottom: 1rem;
        }

        .error-subtitle {
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.95rem;
            line-height: 1.6;
            font-weight: 400;
        }

        .error-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
            filter: drop-shadow(0 0 10px rgba(255, 59, 48, 0.5));
        }

        .profile-avatar-btn {
            position: fixed;
            top: 1rem;
            right: 1rem;
            width: 3rem;
            height: 3rem;
            border-radius: 50%;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1100;
            transition: 0.3s;
            overflow: hidden;
        }

        #profileModal {
            align-items: flex-end !important;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: none;
        }

        .profile-modal-content {
            background: #121212;
            border: none;
            border-bottom: none;
            border-radius: 1rem;
            padding: 1rem;
            width: calc(100% - 4rem);
            margin: 0 2rem 1rem 2rem;
            max-width: 400px;
            text-align: right;
            position: relative;
            box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.1, 0.7, 0.1, 1);
        }

        .profile-modal-content.active {
            transform: translateY(0);
        }

        .profile-card-container {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 1rem;
            padding: 1rem;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 1rem;
            margin-bottom: 2rem;
            flex-direction: row;
        }

        .profile-pic-large {
            width: 60px;
            height: 60px;
            min-width: 60px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: none;
            display: grid;
            place-items: center;
            color: white;
            font-size: 2rem;
            overflow: hidden;
        }

        .profile-pic-large i {
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

        .profile-text-col {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            flex-grow: 1;
        }

        .profile-name-display {
            font-size: 1.1rem;
            font-weight: 700;
            color: white;
            margin-bottom: 0.2rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-direction: row;
        }

        .level-progress-container {
            width: 100%;
            background: rgba(255, 255, 255, 0.1);
            height: 4px;
            border-radius: 2px;
            margin-top: 0.5rem;
            overflow: hidden;
            display: flex;
            justify-content: flex-start;
            direction: ltr;
        }

        .level-progress-bar {
            height: 100%;
            background: var(--accent);
            width: 0%;
            transition: width 0.5s;
        }

        .simple-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 2rem;
            direction: rtl;
        }

        .stat-item {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 1rem;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .stat-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: white;
        }

        .stat-label {
            font-size: 0.8rem;
            opacity: 0.6;
            margin-top: 0.2rem;
        }

        .weekly-grid-custom {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 0.5rem;
            direction: rtl;
        }

        .day-item {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 0.8rem;
            padding: 0.8rem 0.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            border: 1px solid transparent;
            min-height: 60px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .day-item:nth-child(1),
        .day-item:nth-child(2),
        .day-item:nth-child(3) {
            grid-column: span 2;
        }

        .day-item.active {
            background: rgba(0, 240, 255, 0.1);
            border-color: rgba(0, 240, 255, 0.3);
        }

        .day-item.today {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
        }

        .day-item.claimed {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.3);
            opacity: 0.7;
        }

        .day-item:nth-child(4),
        .day-item:nth-child(5) {
            grid-column: span 3;
        }

        .day-item:nth-child(6) {
            grid-column: span 2;
        }

        .day-item:nth-child(7) {
            grid-column: span 4;
        }

        .day-num {
            font-size: 0.7rem;
            opacity: 0.5;
            margin-bottom: 0.2rem;
        }

        .day-val {
            font-size: 1rem;
            font-weight: bold;
            color: white;
        }

        .logout-hidden-btn {
            opacity: 0.05;
            font-size: 0.8rem;
            margin-top: 1rem;
            cursor: pointer;
            text-decoration: underline;
        }

        .logout-hidden-btn:hover {
            opacity: 0.5;
        }

        .weekly-grid {
            display: flex;
            justify-content: space-between;
            gap: 0.3rem;
        }

        .day-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.3rem;
            opacity: 0.5;
            transition: 0.3s;
        }

        .day-box.active {
            opacity: 1;
        }

        .day-circle {
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--glass-border);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 700;
            color: white;
        }

        .day-box.claimed .day-circle {
            background: var(--accent);
            color: black;
            border-color: var(--accent);
        }

        .day-box.today .day-circle {
            border-color: var(--accent);
            box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
        }

        .day-label {
            font-size: 0.6rem;
            color: white;
        }

        .day-reward {
            font-size: 0.6rem;
            margin-top: -2px;
            color: var(--accent);
        }

        .view-input.edit-mode-active {
            display: flex !important;
            flex-direction: column !important;
            justify-content: space-between !important;
            height: 100dvh !important;
            padding: 2vh 4vw;
            padding-bottom: 2vh;
            max-width: 100%;
            margin: 0;
            min-height: 0;
        }

        /* Keyboard Squish Mode */
        /* Keyboard Squish Mode */
        @media (max-height: 600px) {

            body.keyboard-open header,
            body.keyboard-open .logo-container,
            body.keyboard-open .profile-avatar-btn,
            body.keyboard-open #creditStatus,
            header,
            .logo-container,
            .profile-avatar-btn,
            #creditStatus {
                display: none !important;
            }

            body.keyboard-open .view-input,
            .view-input {
                justify-content: center;
            }

            body.keyboard-open .card-stack,
            .card-stack {
                height: 40vh;
                max-height: 200px;
                margin-top: 0;
            }

            body.keyboard-open .input-bar-wrapper,
            .input-bar-wrapper {
                padding: 0.8rem;
                gap: 0.5rem;
                border-radius: 1rem;
            }

            body.keyboard-open #promptInput,
            #promptInput {
                min-height: 30px;
                font-size: 16px;
            }

            body.keyboard-open .btn-circle,
            body.keyboard-open .btn-main,
            body.keyboard-open .submit-icon-btn,
            .btn-circle,
            .btn-main,
            .submit-icon-btn {
                width: 40px;
                height: 40px;
            }
        }

        /* Fallback for class-based triggering on larger screens */
        body.keyboard-open header,
        body.keyboard-open .logo-container,
        body.keyboard-open .profile-avatar-btn,
        body.keyboard-open #creditStatus {
            display: none !important;
        }

        body.keyboard-open .view-input {
            justify-content: center;
        }

        body.keyboard-open .card-stack {
            height: 40vh;
            max-height: 200px;
            margin-top: 0;
        }

        body.keyboard-open .input-bar-wrapper {
            padding: 0.8rem;
            gap: 0.5rem;
            border-radius: 1rem;
        }

        body.keyboard-open #promptInput {
            min-height: 30px;
            font-size: 16px;
        }

        body.keyboard-open .btn-circle,
        body.keyboard-open .btn-main,
        body.keyboard-open .submit-icon-btn {
            width: 40px;
            height: 40px;
        }



        .edit-mode-active header>div:last-child {
            text-align: center;
        }

        .result-area {
            width: 100%;
            max-width: 45rem;
            min-height: 12rem;
            flex: 1;
            backdrop-filter: blur(25px);
            margin: 1rem 0;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            position: relative;
            overflow: hidden;
            transition: 0.5s;
        }

        .result-area img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            border-radius: 1rem;
            display: block;
        }

        .result-image-wrapper {
            position: relative;
            display: inline-flex;
            justify-content: center;
            align-items: center;
            max-width: 95%;
            max-height: 95%;
        }

        .kinetic-svg {
            position: relative;
            width: 50px;
            height: 50px;
            margin-bottom: 1rem;
            animation: none !important;
        }

        #editLoader .kinetic-svg {
            animation: none !important;
        }

        #editLoader .kinetic-svg svg {
            animation: none !important;
        }

        .layer-base {
            fill: rgba(255, 255, 255, 0.1);
        }

        /* Edit Loader Draw Animation - 0.5x speed */
        #editLoader .kinetic-svg path {
            fill: none;
            stroke: rgba(255, 255, 255, 0.8);
            stroke-width: 0.5px;
            stroke-dasharray: 100;
            stroke-dashoffset: 100;
            animation: draw-1 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
            filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
        }

        @keyframes draw-1 {
            0% {
                stroke-dashoffset: 100;
                opacity: 0;
            }

            20% {
                opacity: 1;
            }

            50% {
                stroke-dashoffset: 0;
                opacity: 1;
            }

            80% {
                opacity: 1;
            }

            100% {
                stroke-dashoffset: -100;
                opacity: 0;
            }
        }

        .layer-highlight {
            fill: none;
            stroke: #fff;
            stroke-width: 0.5;
            filter: blur(1px);
            stroke-dasharray: 5, 45;
            /* Removed animation */
            animation: none !important;
        }

        @keyframes rotateRefract {
            0% {
                stroke-dashoffset: 50;
                opacity: 0;
            }

            50% {
                opacity: 1;
            }

            100% {
                stroke-dashoffset: 0;
                opacity: 0;
            }
        }

        @keyframes spin {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        /* Error Icon Animation - Clean Draw & Fade */
        .logo-path {
            stroke: #ff3b30;
            stroke-dasharray: 100;
            stroke-dashoffset: 100;
            animation: draw-and-fade 4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
            fill: transparent;
            stroke-width: 0.8;
            opacity: 0.7;
        }

        @keyframes draw-and-fade {
            0% {
                stroke-dashoffset: 100;
                opacity: 0;
            }

            20% {
                opacity: 1;
            }

            50% {
                stroke-dashoffset: 0;
                opacity: 1;
                fill: rgba(255, 255, 255, 0);
            }

            70% {
                fill: rgba(255, 255, 255, 0.1);
            }

            100% {
                stroke-dashoffset: -100;
                opacity: 0;
            }
        }

        /* Error Card Styling */
        .card.error-card {
            border: 2px solid #ff3b30 !important;
            opacity: 0.5 !important;
        }

        .edit-toggle-wrapper {
            width: 100%;
            max-width: 45rem;
            display: flex;
            justify-content: center;
            margin-top: 1rem;
            transition: 0.3s;
        }

        .edit-toggle-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--glass-border);
            color: rgba(255, 255, 255, 0.5);
            padding: 0.7rem 2rem;
            border-radius: 2rem;
            cursor: pointer;
            font-family: inherit;
            transition: 0.3s;
            backdrop-filter: blur(25px);
            font-size: 0.85rem;
        }

        .edit-toggle-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        .secondary-actions {
            display: none;
            width: 100%;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        .regen-small-btn,
        .save-small-btn {
            flex: 1;
            padding: 0.8rem;
            border-radius: 1.2rem;
            font-weight: 800;
            font-size: 0.9rem;
            cursor: pointer;
            border: none;
            transition: 0.3s;
            text-align: center;
        }

        .regen-small-btn {
            background: #fff;
            color: #000;
        }

        .save-small-btn {
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            border: 1px solid var(--glass-border);
        }

        .edit-controls-bar {
            display: none;
            width: 100%;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-top: 0.8rem;
            flex-wrap: nowrap;
        }

        .result-actions-overlay {
            position: absolute;
            top: 1rem;
            right: 1rem;
            display: flex;
            gap: 0.8rem;
            z-index: 10;
        }

        button.action-icon-btn,
        .save-btn-icon,
        .regen-btn-icon {
            width: 2.8rem;
            height: 2.8rem;
            border-radius: 0.8rem;

            background: rgba(255, 255, 255, 0.05);

            backdrop-filter: blur(10px);
            border: none;
            color: #fff;
            display: grid;
            place-items: center;
            cursor: pointer;
            transition: all 0.3s ease;
            padding: 0;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        button.action-icon-btn:hover,
        .result-image-wrapper {
            position: relative;
            display: inline-block;
            border-radius: 1rem;
            overflow: visible;
            max-width: 100%;
            /* Fix 7: Image Drift */
            padding: 0;
            transition: padding 0.4s ease, all 0.3s ease;
        }

        #resultImage {
            position: relative;
            z-index: 10;
            transition: all 0.3s;
            border-radius: 1rem;
            display: block;
        }

        .result-actions-overlay {
            position: absolute;
            display: flex;
            gap: 0.6rem;
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 20;
            top: 1rem;
            right: 1rem;
            opacity: 0;
            transform: scale(0.9);
            pointer-events: none;
        }

        .result-image-wrapper.actions-visible .result-actions-overlay {
            opacity: 1;
            transform: scale(1);
            pointer-events: auto;
        }


        .result-image-wrapper.portrait-layout.actions-visible {
            padding-right: 4rem;
        }

        .result-image-wrapper.portrait-layout .result-actions-overlay {
            z-index: 5;
            flex-direction: column;
            gap: 1rem;

            top: 50%;
            right: 50%;
            transform: translate(50%, -50%);
            opacity: 0;
            pointer-events: none;
        }

        .result-image-wrapper.portrait-layout.actions-visible .result-actions-overlay {
            right: 0.5rem;
            opacity: 1;
            transform: translate(0, -50%);
            pointer-events: auto;
        }

        .result-image-wrapper.landscape-layout.actions-visible {
            flex-direction: column;
            padding-bottom: 4rem;
        }

        .result-image-wrapper.landscape-layout .result-actions-overlay {
            z-index: 5;
            flex-direction: row;
            gap: 1rem;
            width: max-content;

            left: 50%;
            bottom: 50%;
            top: auto;
            right: auto;
            transform: translate(-50%, 50%);
            opacity: 0;
            pointer-events: none;
        }

        .result-image-wrapper.landscape-layout.actions-visible .result-actions-overlay {
            bottom: 0.5rem;
            opacity: 1;
            transform: translate(-50%, 0);
            pointer-events: auto;
        }

        .action-icon-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: scale(1.1);
            color: #fff;
        }

        .action-icon-btn:active {
            transform: scale(0.9);
        }

        .action-icon-btn svg {
            width: 1.6rem;
            height: 1.6rem;
            fill: currentColor;
        }

        .edit-mode-active .edit-controls-bar {
            display: flex;
        }

        .image-slots {
            display: flex;
            gap: 0.4rem;
            flex: 1;
            justify-content: center;
        }

        .image-slot {
            width: 2.6rem;
            height: 2.6rem;
            border-radius: 0.6rem;
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.05);
            background-size: cover;
            background-position: center;
            position: relative;
            cursor: pointer;
            transition: 0.3s;
            flex-shrink: 0;
        }

        .image-slot:hover {
            border-color: rgba(255, 255, 255, 0.3);
        }

        .image-slot.primary {
            border-color: rgba(255, 255, 255, 0.8);
            border-width: 2.5px;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
        }

        .slot-eraser {
            position: absolute;
            bottom: -5px;
            position: absolute;
            bottom: -5px;
            right: -5px;
            left: auto;
            width: 1.4rem;
            height: 1.4rem;
            border-radius: 50%;
            background: #ff4b2b;
            color: white;
            display: none;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            border: 1px solid rgba(0, 0, 0, 0.2);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
            z-index: 5;
        }

        .image-slot.has-image .slot-eraser {
            display: flex;
        }

        .toggle-icon-btn {
            width: 2.6rem;
            height: 2.6rem;
            border-radius: 0.7rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--glass-border);
            color: rgba(255, 255, 255, 0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: 0.3s;
            padding: 0.6rem;
            flex-shrink: 0;
        }

        .toggle-icon-btn svg {
            width: 100%;
            height: 100%;
            display: block;
        }

        .toggle-icon-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border-color: var(--accent);
        }

        .edit-mode-active .submit-icon-btn {
            position: static;
            margin: 0;
            width: 2.6rem;
            height: 2.6rem;
            box-shadow: none;
            padding: 0;
            flex-shrink: 0;
        }

        .edit-mode-active .input-bar-wrapper {
            padding: 1rem 1.2rem !important;
            border-radius: 1rem !important;
            background: rgba(20, 20, 20, 0.6) !important;
            display: flex !important;
            flex-direction: column !important;
            gap: 0 !important;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
            width: 100% !important;
            max-width: 45rem !important;
            margin: 0 auto !important;
        }

        @keyframes slideDown {
            from {
                transform: translateY(-20px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes slideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        @keyframes logoSlide {
            from {
                transform: translateY(-15px);
                opacity: 0.6;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .edit-mode-active #resultArea {
            margin: 1rem auto !important;
            width: 100% !important;
            max-width: 45rem !important;
            animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        .edit-mode-active .edit-controls-bar {
            animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        .edit-mode-active .logo-container {
            animation: logoSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        .edit-mode-active #promptInput {
            min-height: 4rem;
            max-height: 8rem;
            font-size: 1.1rem;
            width: 100%;
            background: transparent !important;
            border: none !important;
            padding: 0 !important;
            margin-bottom: 0.5rem !important;
        }

        @media (max-width: 992px) {
            .service-row {
                flex-direction: column !important;
                gap: 2rem !important;
            }

            .service-info {
                flex: none !important;
                width: 100%;
                text-align: right !important;
            }

            .service-info ul {
                align-items: flex-start !important;
            }

            .service-info li {
                text-align: right;
                width: 100%;
            }

            #protocols .service-row>div:last-child {
                flex: none !important;
                width: 100%;
            }

            .info-section {
                padding: 4rem 1rem !important;
            }

            .section-hero {
                padding-top: 10vh !important;
                height: auto !important;
                min-height: 100vh !important;
            }

            .tagline {
                font-size: 2.5rem !important;
                text-align: center !important;
            }

            .section-hero p {
                text-align: center !important;
                margin: -1rem auto 2.5rem !important;
                max-width: 22rem !important;
                line-height: 1.8 !important;
            }

            .hero-actions {
                justify-content: center !important;
            }

            nav#main-nav {
                width: 92% !important;
                padding: 0 1rem !important;
            }

            nav#main-nav.scrolled {
                width: 100% !important;
                max-width: 100% !important;
                top: 0 !important;
                border-radius: 0 !important;
                border: none !important;
                height: 3.5rem !important;
                background: rgba(0, 0, 0, 0.8) !important;
            }
        }

        @media (max-width: 600px) {
            #protocols .service-row>div:last-child>div:last-child {
                flex-direction: column !important;
            }

            .feature-box {
                padding: 1rem !important;
            }
        }


        @media (max-width: 768px) {

            .view-input.edit-mode-active.keyboard-open #resultArea,
            .view-input.edit-mode-active.keyboard-open .secondary-actions,
            .view-input.edit-mode-active.keyboard-open .edit-toggle-wrapper,
            .view-input.edit-mode-active.keyboard-open .copyright-text {
                display: none !important;
            }

            .view-input.edit-mode-active.keyboard-open {
                justify-content: center !important;
                padding: 0 1rem !important;
                height: 100svh !important;
            }

            .view-input.edit-mode-active.keyboard-open .input-bar-wrapper {
                margin: 0 !important;
            }

            .view-input.edit-mode-active.keyboard-open header,
            .view-input.edit-mode-active.keyboard-open #creditStatus,
            .view-input.edit-mode-active.keyboard-open .profile-avatar-btn {
                display: flex !important;
                opacity: 0.8;
            }
        }



        #intro-layer {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .intro-text-element {
            position: absolute;
            color: white;
            opacity: 0;
            font-family: 'Inter', sans-serif;
            text-align: center;
        }

        #intro-hello {
            font-family: 'Cairo', 'Inter', sans-serif;
            font-size: 3rem;
            font-weight: 300;
        }

        #intro-lxd {
            font-size: 6rem;
            font-weight: 800;
            letter-spacing: -2px;
        }

        #intro-emaj {
            font-size: 4rem;
            font-weight: 200;
            text-transform: uppercase;
        }

        #intro-midray-svg {
            width: 300px;
            height: auto;
        }

        @keyframes blur-reveal {
            0% {
                opacity: 0;
                filter: blur(20px);
                transform: scale(0.95);
            }

            100% {
                opacity: 1;
                filter: blur(0px);
                transform: scale(1);
            }
        }

        @keyframes slide-down-blur {
            0% {
                opacity: 0;
                filter: blur(10px);
                transform: translateY(-20px);
            }

            100% {
                opacity: 1;
                filter: blur(0px);
                transform: translateY(0);
            }
        }

        @keyframes letter-spacing-expand {
            0% {
                letter-spacing: 0px;
                opacity: 0;
                filter: blur(10px);
            }

            20% {
                opacity: 1;
                filter: blur(0px);
            }

            100% {
                letter-spacing: 20px;
                opacity: 1;
            }
        }

        .anim-blur-reveal {
            animation: blur-reveal 1.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
        }

        .anim-slide-down {
            animation: slide-down-blur 1s ease-out forwards;
        }

        .anim-emaj {
            animation: letter-spacing-expand 3s cubic-bezier(0.1, 0.7, 0.1, 1) forwards;
        }

        .force-hide {
            opacity: 0 !important;
            display: none !important;
        }

        .fade-out {
            transition: opacity 1s ease;
            opacity: 0 !important;
        }

        .midray-path {
            stroke-dasharray: 1000;
            stroke-dashoffset: 1000;
            animation: draw-stroke 3s cubic-bezier(0.7, 0, 0.3, 1) forwards;
            fill: transparent;
            stroke: white;
            stroke-width: 2;
        }

        @keyframes draw-stroke {
            to {
                stroke-dashoffset: 0;
            }
        }

        #loader-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 1s cubic-bezier(0.7, 0, 0.3, 1);
        }

        .loader-svg-container {
            width: 120px;
            height: 120px;
            transition: all 0.5s ease;
        }

        .main-svg {
            width: 100%;
            height: 100%;
            overflow: visible;
        }

        .pillar {
            stroke: #ffffff;
            stroke-width: 0.8;
            fill: transparent;
            stroke-dasharray: 200;
            stroke-dashoffset: 200;
            animation: pillar-trace 2.5s cubic-bezier(0.7, 0, 0.3, 1) infinite;
        }

        .pillar-1 {
            animation-delay: 0s;
        }

        .pillar-2 {
            animation-delay: 0.2s;
        }

        .pillar-3 {
            animation-delay: 0.4s;
        }

        .base-plate {
            animation-delay: 0.6s;
            stroke-width: 0.5;
        }

        @keyframes pillar-trace {
            0% {
                stroke-dashoffset: 200;
                fill: transparent;
                opacity: 0;
            }

            10% {
                opacity: 1;
            }

            40% {
                stroke-dashoffset: 0;
                fill: transparent;
            }

            60%,
            85% {
                stroke-dashoffset: 0;
                fill: white;
                opacity: 1;
            }

            100% {
                stroke-dashoffset: 0;
                fill: white;
                opacity: 0;
            }
        }

        body.loaded #loader-overlay {
            opacity: 0;
            pointer-events: none;
        }

        body.loaded .loader-svg-container {
            opacity: 0;
            filter: blur(10px);
            transform: scale(1.1);
        }

        #main-nav,
        #landing-content,
        .fixed-branding,
        #inputView {
            transition: filter 1.5s cubic-bezier(0.19, 1, 0.22, 1), transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
        }

        body.loading #main-nav,
        body.loading #landing-content,
        body.loading .fixed-branding {
            filter: blur(20px);
            transform: scale(0.98);
        }

        .kinetic-svg {
            width: 60px;
            height: 60px;
            animation: rotate 2s linear infinite;
        }

        .layer-base {
            animation: pulse-opacity 2s ease-in-out infinite;
            color: #ffffff;
        }

        .layer-highlight {
            animation: rotate-reverse 3s linear infinite, pulse-opacity 2s ease-in-out infinite reverse;
            color: rgba(255, 255, 255, 0.5);
            transform-origin: center;
        }

        @keyframes rotate {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes rotate-reverse {
            0% {
                transform: rotate(360deg);
            }

            100% {
                transform: rotate(0deg);
            }
        }

        @keyframes pulse-opacity {

            0%,
            100% {
                opacity: 0.3;
            }

            50% {
                opacity: 1;
            }
        }

        @keyframes error-trace {
            0% {
                stroke-dashoffset: 200;
                fill: transparent;
                opacity: 0;
            }

            10% {
                opacity: 1;
            }

            40% {
                stroke-dashoffset: 0;
                fill: transparent;
            }

            60%,
            85% {
                stroke-dashoffset: 0;
                fill: #ff3b30;
                opacity: 1;
            }

            100% {
                stroke-dashoffset: 0;
                fill: #ff3b30;
                opacity: 0;
            }
        }

        #main-app.not-authenticated>*:not(#authModal) {
            display: none !important;
        }

        #main-app.not-authenticated {
            background: black;
        }

        #main-app.not-authenticated {
            background: black;
        }

        .toast-container {
            position: fixed;
            top: 2rem;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            pointer-events: none;
        }

        .toast {
            background: rgba(20, 20, 20, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: white;
            padding: 0.8rem 1rem;
            border-radius: 50px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.9rem;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            gap: 0.8rem;
            pointer-events: auto;
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            direction: rtl;
        }

        .toast.visible {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        .toast.success {
            border-color: rgba(0, 255, 128, 0.3);
        }

        .toast.error {
            border-color: rgba(255, 59, 48, 0.3);
        }

        .toast-icon {
            font-size: 1.1rem;
        }

        .toast.success .toast-icon {
            color: #00ff80;
        }

        .toast.error .toast-icon {
            color: #ff3b30;
        }


        .day-item {
            display: flex;
            flex-direction: row-reverse;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0.8rem;
            gap: 0.5rem;
        }

        .day-val {
            font-size: 1rem;
            font-weight: 700;
        }

        .day-num {
            font-size: 0.8rem;
            opacity: 0.7;
        }

        .stat-item {
            display: flex;
            flex-direction: row-reverse;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            padding: 1rem 1rem;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 12px;
            flex: 1;
        }

        .stat-value {
            font-size: 1.4rem;
            font-weight: 800;
        }

        .stat-label {
            font-size: 0.9rem;
            opacity: 0.6;
        }

        #modalLevelText {
            color: #ffffff !important;
            background: rgba(255, 255, 255, 0.1) !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
        }

        .level-progress-bar {
            background: #ffffff !important;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
        }

        .simple-stats {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
        }

        @keyframes logo-trace {
            0% {
                stroke-dashoffset: 200;
                fill: transparent;
                opacity: 0;
            }

            10% {
                opacity: 1;
            }

            40% {
                stroke-dashoffset: 0;
                fill: transparent;
            }

            100% {
                stroke-dashoffset: 0;
                fill: white;
                opacity: 1;
            }
        }

        .logo.animating .logo-p1,
        .logo.animating .logo-p2,
        .logo.animating .logo-p3,
        .logo.animating .logo-base {
            stroke: #ffffff;
            stroke-width: 0.8;
            fill: transparent;
            stroke-dasharray: 200;
            stroke-dashoffset: 200;
            animation: logo-trace 2.5s cubic-bezier(0.7, 0, 0.3, 1) forwards;
        }

        .logo.animating .logo-p1 {
            animation-delay: 0s;
        }

        .logo.animating .logo-p2 {
            animation-delay: 0.2s;
        }

        .logo.animating .logo-p3 {
            animation-delay: 0.4s;
        }

        .logo.animating .logo-base {
            animation-delay: 0.6s;
            stroke-width: 0.5;
        }