:root {
            --accent-primary: #6366f1;
            --accent-secondary: #a855f7;
            --accent-tertiary: #ec4899;
            --bg-dark: #0f172a;
            --card-bg: rgba(30, 41, 59, 0.75);
            --text-main: #f8fafc;
            --gold: #f59e0b;
        }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: var(--bg-dark);
            color: var(--text-main);
            min-height: 100dvh;
            background-image:
                radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.15) 0%, transparent 40%);
            background-attachment: fixed;
            padding-bottom: calc(80px + env(safe-area-inset-bottom));
            padding-left: env(safe-area-inset-left);
            padding-right: env(safe-area-inset-right);
            -webkit-tap-highlight-color: transparent;
            overflow-x: hidden;
            user-select: none;
            -webkit-user-select: none;
        }

        .brand-font { font-family: 'Space Grotesk', sans-serif; }

        .main-hero-title {
            font-size: clamp(1.8rem, 8vw, 3.5rem);
            font-weight: 800;
            background: linear-gradient(135deg, #fff 30%, var(--accent-primary), var(--accent-tertiary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 0.5rem;
            letter-spacing: -0.03em;
            user-select: none;
        }

        /* CAROUSEL STYLES */
        .hero-carousel {
            overflow: hidden;
            white-space: nowrap;
            position: relative;
            margin-bottom: 3rem;
            mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
            -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        }

        .carousel-track {
            display: inline-flex;
            gap: 15px;
            animation: scroll 60s linear infinite;
            will-change: transform;
            transform: translateZ(0);
        }

        .carousel-track:hover {
            animation-play-state: paused;
        }

        .carousel-item-img {
            height: 180px;
            width: auto;
            border-radius: 16px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            transition: transform 0.3s;
            cursor: pointer;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            object-fit: cover;
        }

        .carousel-item-img:hover {
            transform: scale(1.05);
            border-color: var(--accent-primary);
            z-index: 10;
        }

        @keyframes scroll {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }

        .glass-panel {
            background: var(--card-bg);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 32px;
            padding: 40px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
            width: 100%;
        }

        @media (max-width: 768px) {
            .glass-panel { padding: 25px 20px; border-radius: 24px; }
            .container { padding-left: 12px; padding-right: 12px; }
            .carousel-item-img { height: 140px; }
        }

        @media (max-width: 576px) {
            .glass-panel { padding: 20px 15px; }
            .main-hero-title { font-size: 2rem; }
            .style-grid, .mood-grid {
                grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)) !important;
                gap: 8px !important;
            }
            .style-card, .mood-card { padding: 10px 5px; }
            .style-card span, .mood-card span { font-size: 0.65rem; }
            input, select, textarea, .form-control { font-size: 16px !important; }
            .btn-magic { padding: 15px; font-size: 0.95rem; }
            .carousel-item-img { height: 110px; }
        }

        .style-grid, .mood-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
            gap: 10px;
            margin-bottom: 2rem;
        }

        @media (min-width: 576px) {
            .style-grid, .mood-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
        }

        .style-card, .mood-card {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 14px 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            position: relative;
        }

        .style-card:active, .mood-card:active { transform: scale(0.96); }

        .style-card:hover, .mood-card:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-4px);
            border-color: var(--accent-primary);
        }
        @media (hover: none) {
            .style-card:hover, .mood-card:hover { transform: none; }
        }

        .style-card.active, .mood-card.active {
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            border-color: transparent;
            box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
        }

        .style-card.coloring-style {
            border: 1px dashed var(--accent-tertiary);
            background: rgba(236, 72, 153, 0.05);
        }
        .style-card.coloring-style.active {
            background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-secondary));
            border: none;
        }

        .style-card i, .mood-card i { margin-bottom: 8px; color: var(--accent-primary); transition: color 0.3s; }
        .style-card.active i, .mood-card.active i { color: white; }
        .style-card span, .mood-card span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; line-height: 1.2; }

        .drop-zone {
            border: 2px dashed rgba(255, 255, 255, 0.2);
            border-radius: 24px;
            padding: 30px 15px;
            text-align: center;
            background: rgba(255, 255, 255, 0.02);
            cursor: pointer;
            transition: 0.3s;
            margin-bottom: 1.5rem;
            position: relative;
        }

        .drop-zone:hover { border-color: var(--accent-primary); background: rgba(255, 255, 255, 0.05); }

        .btn-magic {
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
            color: white; border: none; padding: 18px; border-radius: 18px;
            font-weight: 800; width: 100%; transition: all 0.4s;
            text-transform: uppercase; letter-spacing: 1px;
            box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
        }

        .btn-magic:hover:not(:disabled) {
            transform: translateY(-2px);
            filter: brightness(1.1);
            box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
        }

        .btn-magic:active:not(:disabled) { transform: scale(0.98); }
        .btn-magic:disabled { opacity: 0.5; cursor: not-allowed; }

        .variants-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
            margin-top: 40px;
            width: 100%;
        }

        .variant-item {
            background: #1e293b;
            border-radius: 24px;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.05);
            animation: slideUp 0.6s ease-out;
            width: 100%;
            max-width: 550px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            display: flex;
            flex-direction: column;
        }

        @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

        .img-box {
            position: relative;
            width: 100%;
            padding-bottom: 100%;
            background: #000;
            overflow: hidden;
            cursor: zoom-in;
        }
        .variant-img {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            object-fit: contain;
            display: block;
            transition: opacity 0.3s;
            pointer-events: auto;
            user-select: none;
            -webkit-user-drag: none;
        }
        .img-box:hover .variant-img { opacity: 0.9; }

        .watermark-layer {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            pointer-events: none;
            overflow: hidden;
        }

        .watermark-text {
            color: rgba(255, 255, 255, 0.6);
            font-size: 2rem;
            font-weight: 800;
            text-transform: uppercase;
            transform: rotate(-30deg);
            background: transparent;
            letter-spacing: 2px;
            text-shadow: 0 0 10px rgba(0,0,0,0.8);
            font-family: 'Space Grotesk', sans-serif;
            opacity: 0.8;
        }

        .vip-active .watermark-layer { display: none !important; }

        .history-section {
            margin-top: 3rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 2rem;
        }

        .history-grid {
            display: flex;
            gap: 15px;
            overflow-x: auto;
            padding-bottom: 15px;
            scrollbar-width: thin;
            scrollbar-color: var(--accent-primary) rgba(255,255,255,0.05);
            -webkit-overflow-scrolling: touch;
        }

        .history-grid::-webkit-scrollbar { height: 8px; }
        .history-grid::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 4px; }
        .history-grid::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }

        .history-item {
            flex: 0 0 100px;
            height: 100px;
            border-radius: 12px;
            overflow: hidden;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
            position: relative;
        }
        .history-item:hover { transform: scale(1.05); border-color: var(--accent-primary); }
        .history-item img { width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }

        #fullscreenPreview {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.95);
            z-index: 5000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: calc(15px + env(safe-area-inset-top)) 15px calc(15px + env(safe-area-inset-bottom)) 15px;
            overflow: auto;
        }
        .full-img-container {
            position: relative;
            max-width: 90%;
            max-height: 80vh;
            overflow: visible;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            transition: transform 0.3s ease;
        }

        #fullImg {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
            pointer-events: auto;
            cursor: zoom-in;
        }

        #fsWatermark {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5005;
            pointer-events: none;
        }
        #fsWatermark .watermark-text {
            font-size: 4rem;
            color: rgba(255, 255, 255, 0.3);
            text-shadow: 0 2px 15px rgba(0,0,0,0.8);
        }

        .zoom-controls {
            display: flex;
            gap: 20px;
            margin-top: 25px;
            background: rgba(255,255,255,0.1);
            padding: 12px 30px;
            border-radius: 50px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.1);
            z-index: 5010;
        }
        .zoom-btn { background: none; border: none; color: white; padding: 5px; cursor: pointer; transition: 0.2s; }
        .zoom-btn:hover { color: var(--accent-primary); transform: scale(1.2); }

        .close-preview {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.15);
            border: none;
            color: white;
            padding: 12px;
            border-radius: 50%;
            cursor: pointer;
            z-index: 5100;
            backdrop-filter: blur(5px);
        }

        .custom-alert {
            position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
            z-index: 9999;
            padding: 12px 20px; border-radius: 50px;
            background: #1e293b; border: 1px solid var(--accent-primary);
            color: white; box-shadow: 0 20px 40px rgba(0,0,0,0.4);
            display: none; align-items: center; gap: 10px;
            font-size: 0.9rem;
            width: 90%;
            max-width: 400px;
        }

        .modal-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
            z-index: 6000;
            display: none; align-items: center; justify-content: center;
            padding: 15px;
        }

        .modal-card {
            background: #1e293b; border-radius: 28px; padding: 30px;
            max-width: 450px; width: 90%; border: 1px solid rgba(255,255,255,0.1);
            max-height: calc(90vh - env(safe-area-inset-bottom));
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .progress-container {
            width: 100%;
            height: 20px;
            background-color: rgba(0, 0, 0, 0.3);
            border-radius: 50px;
            margin: 15px auto;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
        }

        .progress-bar-custom {
            width: 0%;
            height: 100%;
            background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
            background-size: 200% 200%;
            border-radius: 50px;
            transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
        }

        .progress-bar-custom.animating {
             animation: gradientMove 1.5s infinite linear;
        }

        @keyframes gradientMove {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .progress-status {
            font-size: 0.85rem;
            color: var(--text-main);
            margin-top: 8px;
            font-weight: 600;
            letter-spacing: 0.5px;
            min-height: 1.2em;
        }

        .plan-card {
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 16px;
            padding: 16px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
        }
        .plan-card:hover { background: rgba(255,255,255,0.08); }
        .plan-card.active {
            border-color: var(--accent-primary);
            background: rgba(99, 102, 241, 0.15);
            box-shadow: 0 0 0 1px var(--accent-primary);
        }
        .plan-badge {
            position: absolute;
            top: 0; right: 0;
            background: var(--gold);
            color: #000;
            font-size: 0.6rem;
            font-weight: 800;
            padding: 2px 8px;
            border-bottom-left-radius: 8px;
            text-transform: uppercase;
        }
        .check-icon { color: var(--accent-primary); display: none; }
        .plan-card.active .check-icon { display: block; }

        .vip-form input {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: white;
            font-size: 0.9rem;
        }
        .vip-form input:focus {
            background: rgba(255,255,255,0.1);
            border-color: var(--accent-primary);
            box-shadow: none;
            color: white;
        }

        .restore-vip-link {
            font-size: 0.8rem;
            color: var(--accent-secondary);
            text-decoration: underline;
            cursor: pointer;
            margin-top: 10px;
            display: block;
        }
        .restore-vip-link:hover { color: white; }

        .lang-switch {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 4px;
            display: inline-flex;
            gap: 4px;
        }
        .lang-btn {
            background: transparent;
            border: none;
            color: rgba(255,255,255,0.5);
            font-size: 0.75rem;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 16px;
            cursor: pointer;
            transition: 0.3s;
        }
        .lang-btn.active {
            background: var(--accent-primary);
            color: white;
        }

        .app-footer {
            margin-top: 4rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.75rem;
            color: rgba(255,255,255,0.4);
            flex-wrap: wrap;
            gap: 1rem;
        }
        .visitor-pill {
            background: rgba(0,0,0,0.2);
            padding: 6px 12px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 6px;
            border: 1px solid rgba(255,255,255,0.05);
        }
        .visitor-count {
            color: var(--accent-primary);
            font-weight: 700;
            font-family: 'Space Grotesk', monospace;
        }
        .online-badge {
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.3);
            border-radius: 50px;
            padding: 4px 10px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
            white-space: nowrap;
            height: fit-content;
        }
        .online-dot {
            width: 8px;
            height: 8px;
            background-color: #10b981;
            border-radius: 50%;
            animation: pulse-green 2s infinite;
        }
        @keyframes pulse-green {
            0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
            70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
            100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
        }

        .credit-badge {
            background: linear-gradient(135deg, var(--gold), #d97706);
            color: #000;
            border-radius: 20px;
            padding: 4px 12px;
            font-size: 0.8rem;
            font-weight: 800;
            margin-left: 10px;
            display: none;
            align-items: center;
            gap: 5px;
            box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
        }

        .help-list li {
            margin-bottom: 15px;
            display: flex;
            align-items: start;
            gap: 12px;
            font-size: 0.9rem;
            color: #cbd5e1;
            text-align: left;
        }
        .help-icon { color: var(--accent-primary); flex-shrink: 0; margin-top: 3px; }

        #backToTop {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: var(--accent-primary);
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            display: none;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 25px rgba(99, 102, 241, 0.6);
            cursor: pointer;
            z-index: 4000;
            transition: all 0.3s;
        }
        #backToTop:hover { transform: translateY(-5px); filter: brightness(1.1); }
        @keyframes slideDownFB {
            from { transform: translateY(-120%); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: var(--bg-dark); }
        ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

        @media (max-width: 400px) {
            .glass-panel { padding: 15px 10px; }
            .main-hero-title { font-size: 1.6rem; }
            .style-grid, .mood-grid {
                grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)) !important;
                gap: 6px !important;
            }
            .carousel-item-img { height: 90px; }
        }

        @media (min-width: 992px) {
            .glass-panel { padding: 50px 60px; }
            .main-hero-title { font-size: 3.5rem; }
            .style-grid, .mood-grid {
                grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
                gap: 15px;
            }
            .style-card, .mood-card { padding: 18px 12px; }
            .style-card span, .mood-card span { font-size: 0.8rem; }
            .btn-magic { font-size: 1.1rem; padding: 20px; }
            .carousel-item-img { height: 200px; }
        }