/**
 * ==========================================================================
 * COPYRIGHT NOTICE & LICENSE AGREEMENT (C) 2026 GN STUDIO
 * Project: GnEmoji Studio — Telegram Animated Emoji Mini App
 * All Rights Reserved.
 *
 * LEGAL WARNING:
 * This software, source code, visual styles, stylesheets, animations and all associated
 * intellectual properties are the exclusive property of GN Studio (c) 2026.
 * Unauthorized copying, distribution, decompilation, scraping, or modification
 * is strictly prohibited under international copyright laws.
 * ==========================================================================
 */

:root {
    --bg-main: #080a0f;
    --bg-card: rgba(18, 22, 31, 0.85);
    --bg-card-hover: rgba(26, 32, 45, 0.95);
    --bg-card-active: rgba(245, 158, 11, 0.15);
    --bg-glass: rgba(18, 22, 31, 0.85);
    --border-color: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(245, 158, 11, 0.45);
    --border-active: #f59e0b;
    
    --accent-blue: #3b82f6;
    --accent-cyan: #38bdf8;
    --accent-purple: #818cf8;
    --accent-violet: #a855f7;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    
    --grad-primary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-glow: linear-gradient(135deg, #ffffff 0%, #fef08a 60%, #f59e0b 100%);
    --grad-badge: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-card: linear-gradient(180deg, rgba(24, 30, 42, 0.7) 0%, rgba(14, 18, 26, 0.9) 100%);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    
    --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.25);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.7);
}

/* Telegram Theme Fallbacks */
body.telegram-theme {
    --bg-main: var(--tg-theme-bg-color, #080a0f);
    --text-main: var(--tg-theme-text-color, #f8fafc);
}

/* Global Anti-Copy and Anti-Selection Protection */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Allow text selection only inside editable text inputs */
input, textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Prevent image dragging and saving */
img, svg, canvas, .lottie-player, a {
    -webkit-user-drag: none;
    user-drag: none;
}

body {
    background-color: #060911;
    background-image: 
        radial-gradient(circle at 15% 8%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 12%, rgba(139, 92, 246, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 50% 60%, rgba(2, 132, 199, 0.08) 0%, transparent 55%),
        radial-gradient(circle at 50% 95%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-bottom: 0;
}

/* ==================== 1. LOADING SCREEN (DARK SLEEK THEME) ==================== */
.loading-screen {
    position: fixed;
    inset: 0;
    background: #080a0f;
    background-image: radial-gradient(circle at 50% 35%, #161b26 0%, #06070a 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 320px;
}

.loader-flag-wrap {
    position: relative;
    width: 145px;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.9));
    animation: floatAnim 3s ease-in-out infinite;
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-7px); }
}

.loader-flag-img {
    width: 135px;
    height: 135px;
    object-fit: contain;
}

.loader-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.loader-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    margin-bottom: 22px;
    font-weight: 500;
}

.loader-bar-bg {
    width: 220px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.loader-bar-fill {
    width: 20%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: var(--radius-full);
    transition: width 0.35s ease;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.5);
}

.loader-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

/* ==================== MAIN APP CONTAINER (FULL VIEWPORT EXPANDED) ==================== */
.app-container {
    width: 100%;
    max-width: 760px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 16px max(110px, calc(env(safe-area-inset-bottom) + 95px));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden {
    display: none !important;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 2px 18px 2px;
}

.brand {
    display: flex;
    align-items: center;
}

.brand-gn-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 20%, #e0f2fe 45%, #38bdf8 80%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.6px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    animation: brandShine 6s linear infinite;
}

@keyframes brandShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.gn-dot {
    font-weight: 900;
    color: #38bdf8;
    -webkit-text-fill-color: #38bdf8;
    text-shadow: 0 0 14px #38bdf8;
    animation: dotPulse 2s ease-in-out infinite alternate;
}

@keyframes dotPulse {
    0% { filter: drop-shadow(0 0 4px #38bdf8); }
    100% { filter: drop-shadow(0 0 12px #38bdf8); }
}

/* ==================== EXACT STARS BADGE PILL (IMAGE 2) ==================== */
.gn-stars-pill {
    display: inline-flex;
    align-items: center;
    height: 38px;
    background: rgba(28, 32, 41, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.15);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
    user-select: none;
}

.gn-stars-pill:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.35);
}

.gn-stars-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 10px;
    height: 100%;
}

.gn-stars-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.5));
}

.gn-stars-val {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #fff4d2;
    letter-spacing: 0.2px;
}

.gn-stars-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    border: none;
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    transition: filter 0.2s ease;
    outline: none;
    line-height: 0;
    padding: 0;
    padding-bottom: 2px;
}

.gn-stars-plus:hover {
    filter: brightness(1.1);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== HERO INPUT SECTION ==================== */
.hero-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.input-card {
    background: linear-gradient(180deg, rgba(18, 24, 40, 0.85) 0%, rgba(10, 14, 25, 0.94) 100%);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 14px 40px -8px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
}

.input-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.field-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.field-label svg {
    color: var(--accent-cyan);
}

.input-actions-top {
    display: flex;
    gap: 6px;
}

.btn-text-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-text-action:hover, .btn-text-action:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.input-field-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.name-input {
    width: 100%;
    background: rgba(6, 10, 18, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: 14px 65px 14px 16px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    outline: none;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease;
}

.name-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.5);
    background: rgba(8, 14, 26, 0.95);
}

.name-input::placeholder {
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.char-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 800;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

/* Font Selector */
.font-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.font-selector-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.font-selector-label svg {
    color: var(--accent-purple);
}

.font-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.font-pill {
    background: rgba(11, 15, 25, 0.65);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.font-pill .pill-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.font-pill .pill-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.font-pill .pill-sub {
    font-size: 9px;
    color: var(--text-dim);
    font-weight: 600;
    text-align: center;
}

.font-pill:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.font-pill.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(37, 99, 235, 0.3) 100%);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.font-pill.active .pill-title {
    color: #fff;
}

.font-pill.active .pill-dot {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

/* ==================== INPUT MODE TABS (MATN vs SVG) ==================== */
.input-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(8, 12, 20, 0.8);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.mode-tab-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    transition: all 0.2s ease;
}

.mode-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.35) 0%, rgba(124, 58, 237, 0.35) 100%);
    border-color: rgba(56, 189, 248, 0.5);
    color: #fff;
    box-shadow: 0 2px 12px rgba(56, 189, 248, 0.25);
}

.mode-tab.active .mode-tab-icon {
    stroke: var(--accent-cyan);
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.mode-badge-new {
    font-size: 9px;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
}

.mode-section {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-sample-svg {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sample-svg:hover, .btn-sample-svg:active {
    background: rgba(245, 158, 11, 0.22);
    border-color: #fbbf24;
    transform: translateY(-1px);
}

/* SVG Dropzone */
.svg-dropzone {
    border: 2px dashed rgba(56, 189, 248, 0.35);
    background: rgba(8, 14, 26, 0.6);
    border-radius: var(--radius-md);
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 12px;
}

.svg-dropzone:hover, .svg-dropzone.dragover {
    border-color: var(--accent-cyan);
    background: rgba(2, 132, 199, 0.12);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    transform: scale(1.01);
}

.svg-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.svg-dropzone-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.svg-dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dropzone-main-txt {
    font-size: 13px;
    color: var(--text-main);
}

.dropzone-sub-txt {
    font-size: 11px;
    color: var(--text-dim);
}

.dropzone-sub-txt code {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan);
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
}

/* Active SVG Card */
.svg-active-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.svg-thumb-preview {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.svg-thumb-preview svg, .svg-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.svg-file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.svg-file-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svg-file-status {
    font-size: 11px;
    color: #10b981;
    font-weight: 600;
}

.svg-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-change-svg {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change-svg:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-remove-svg {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove-svg:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.empty-svg-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 6px;
    color: var(--text-dim);
    text-align: center;
    padding: 10px;
}

.empty-svg-icon {
    font-size: 32px;
    margin-bottom: 2px;
    opacity: 0.8;
}

.empty-svg-preview span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.empty-svg-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==================== LIVE PREVIEW CARD (HOLOGRAPHIC CONSOLE) ==================== */
.live-preview-card {
    background: linear-gradient(180deg, rgba(16, 22, 38, 0.82) 0%, rgba(10, 14, 26, 0.92) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 25px rgba(56, 189, 248, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.live-preview-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(139, 92, 246, 0.12) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: livePulseGlow 3s ease-in-out infinite alternate;
}

@keyframes livePulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.55; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.preview-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    z-index: 1;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-full);
}

.live-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: liveGlow 1.5s infinite alternate;
}

.current-template-tag {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.preview-stage {
    width: 100%;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.live-lottie-box {
    width: 145px;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-footer {
    width: 100%;
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.preview-text-info {
    font-size: 12px;
    color: var(--text-muted);
}

.preview-text-info b {
    color: var(--text-main);
}

/* ==================== NAVIGATION TABS (NAME vs LOGO) ==================== */
.nav-tabs-wrapper {
    position: sticky;
    top: 10px;
    z-index: 100;
    margin-bottom: 18px;
}

.nav-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    background: rgba(13, 17, 28, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 5px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 12px 30px -5px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-tab {
    background: transparent;
    border: none;
    border-radius: 14px;
    padding: 10px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-muted);
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-tab * {
    pointer-events: none;
}

.nav-tab .tab-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.nav-tab .tab-text {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.nav-tab .tab-counter {
    font-size: 10px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.grey-hero-card {
    border-color: rgba(148, 163, 184, 0.3) !important;
    box-shadow: 0 16px 40px -10px rgba(100, 116, 139, 0.25) !important;
}

.grey-hero-card::before {
    background: radial-gradient(circle at top right, rgba(148, 163, 184, 0.2), transparent 70%) !important;
}

.hq-hero-card {
    border-color: rgba(16, 185, 129, 0.35) !important;
    box-shadow: 0 16px 40px -10px rgba(16, 185, 129, 0.28) !important;
}

.hq-hero-card::before {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.22), transparent 70%) !important;
}


.nav-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

/* Custom vibrant styles for each active tab */
#tab-btn-name.active {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.45);
}
#tab-btn-name.active .tab-counter {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

#tab-btn-logo.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45);
}
#tab-btn-logo.active .tab-counter {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

#tab-btn-grey.active {
    background: linear-gradient(135deg, #334155 0%, #64748b 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(148, 163, 184, 0.4);
}
#tab-btn-grey.active .tab-counter {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

#tab-btn-hq.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
}
#tab-btn-hq.active .tab-counter {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}


.nav-tab.active .tab-svg {
    transform: scale(1.15);
}

/* ==================== TAB CONTENT ==================== */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.section-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.4px;
}

.badge-pill-cyan {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 3px 9px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-dim);
}

.search-bar input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 11px 14px 11px 40px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    border-color: var(--accent-cyan);
    background: rgba(16, 24, 40, 0.95);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

/* ==================== TEMPLATES GRID (NAME TAB) ==================== */
/* ==================== SIZE SLIDER (O'LCHAM) ==================== */
.size-slider-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(11, 15, 25, 0.75);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 12px;
}

.size-slider-label-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.size-slider-label {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.size-val-badge {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.slider-track-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}

.custom-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-range-slider:hover {
    background: rgba(255, 255, 255, 0.25);
}

.custom-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #38bdf8;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.9), 0 2px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.custom-range-slider::-webkit-slider-thumb:hover, .custom-range-slider::-webkit-slider-thumb:active {
    transform: scale(1.22);
    box-shadow: 0 0 24px rgba(56, 189, 248, 1), 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ==================== GRID TOOLBAR (HAMMASINI BELGILASH) ==================== */
.grid-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    padding: 4px 2px;
}

.btn-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-select-all:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.btn-select-all.active-all {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.selection-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

/* ==================== TEMPLATES GRID ==================== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.tpl-card {
    background: rgba(14, 18, 30, 0.82);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.tpl-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(20, 26, 44, 0.95);
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.75), 0 0 20px rgba(56, 189, 248, 0.2);
}

/* Green Selection Styling matching user screenshot */
.tpl-card.selected {
    border-color: #22c55e !important;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.18) 0%, rgba(14, 22, 36, 0.95) 100%) !important;
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.5), 0 12px 28px -5px rgba(0, 0, 0, 0.7) !important;
    transform: translateY(-3px) scale(1.02);
}

.tpl-card.selected .tpl-check-badge {
    opacity: 1;
    transform: scale(1);
}

/* Checkmark Badge in Top Right */
.tpl-check-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
}

/* ==================== HIGH QUALITY (#tab-content-hq) EMERALD / MINT GREEN THEME ==================== */
#tab-content-hq .tpl-card:hover {
    border-color: rgba(44, 219, 158, 0.6) !important;
    box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.75), 0 0 20px rgba(44, 219, 158, 0.3) !important;
}

#tab-content-hq .tpl-card.selected {
    border-color: #2cdb9e !important;
    background: linear-gradient(135deg, rgba(44, 219, 158, 0.18) 0%, rgba(14, 22, 36, 0.95) 100%) !important;
    box-shadow: 0 0 24px rgba(44, 219, 158, 0.5), 0 12px 28px -5px rgba(0, 0, 0, 0.7) !important;
    transform: translateY(-3px) scale(1.02);
}

#tab-content-hq .tpl-card.selected .tpl-check-badge {
    opacity: 1;
    transform: scale(1);
}

#tab-content-hq .tpl-check-badge {
    background: #2cdb9e !important;
    color: #051a14 !important;
    box-shadow: 0 0 12px rgba(44, 219, 158, 0.7) !important;
}

#tab-content-hq .tpl-tag-label {
    color: #2cdb9e !important;
}

#tab-content-hq .btn-select-all {
    background: rgba(44, 219, 158, 0.12) !important;
    border: 1px solid rgba(44, 219, 158, 0.35) !important;
    color: #2cdb9e !important;
}

#tab-content-hq .btn-select-all:hover {
    background: rgba(44, 219, 158, 0.22) !important;
    border-color: #2cdb9e !important;
}

#tab-content-hq .btn-select-all.active-all {
    background: #2cdb9e !important;
    color: #051a14 !important;
    border-color: #2cdb9e !important;
    box-shadow: 0 0 15px rgba(44, 219, 158, 0.5) !important;
}

#tab-content-hq .selection-counter {
    color: #2cdb9e !important;
}



.tpl-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.25);
    z-index: 2;
}

.tpl-lottie-thumb {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    z-index: 1;
}

.tpl-skeleton {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
}

.thumb-loader {
    width: 28px;
    height: 28px;
    border: 2.5px solid rgba(148, 163, 184, 0.15);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: thumb-spin 0.75s linear infinite;
}

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

.tpl-meta {
    margin-top: 8px;
    text-align: center;
    z-index: 1;
}

.tpl-title {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.tpl-tag-label {
    font-size: 10px;
    color: var(--accent-cyan);
    font-weight: 700;
}

/* ==================== LOGO PACK SECTION ==================== */
.logo-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.logo-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-glow);
}

.logo-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    background: var(--grad-badge);
    color: #fff;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.logo-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo-hero-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.pack-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: rgba(8, 12, 20, 0.6);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.showcase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.showcase-item {
    height: 75px;
    width: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-cyan);
}

.pack-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 22px;
}

.feat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px 6px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.feat-icon-wrap {
    color: var(--accent-cyan);
}

.feat-title {
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-align: center;
}

.feat-sub {
    font-size: 10px;
    color: var(--text-dim);
}

.btn-create-fullpack {
    width: 100%;
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    transition: all 0.25s ease;
}

.btn-create-fullpack .btn-text {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.btn-create-fullpack:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(2, 132, 199, 0.65);
}

.btn-create-fullpack:active {
    transform: translateY(1px);
}

/* User Packs Section */
.user-packs-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    backdrop-filter: blur(20px);
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.subsection-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-cyan);
}

.subsection-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
}

.btn-refresh-packs {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh-packs:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.user-packs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.packs-empty {
    text-align: center;
    padding: 28px;
    color: var(--text-dim);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pack-item-card {
    background: rgba(8, 12, 20, 0.65);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.pack-item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    transform: translateX(4px);
}

.pack-info-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pack-name-txt {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.pack-date-txt {
    font-size: 11px;
    color: var(--text-dim);
}

.pack-btn-open {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ==================== BOTTOM ACTION BAR (FLOATING GLASS DOCK) ==================== */
.bottom-action-bar {
    position: fixed;
    bottom: calc(68px + max(10px, env(safe-area-inset-bottom, 10px)));
    left: 50%;
    transform: translateX(-50%) translateY(140%);
    width: calc(100% - 24px);
    max-width: 580px;
    z-index: 995;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease, filter 0.3s ease;
    will-change: transform, opacity;
}

.bottom-action-bar.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    filter: drop-shadow(0 14px 36px rgba(2, 132, 199, 0.45));
}

.btn-main-action {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 45%, #7c3aed 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.action-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.action-icon-pill {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.action-icon-pill svg {
    color: #fff;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.btn-main-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: btnShimmer 3.5s infinite;
}

@keyframes btnShimmer {
    0% { left: -100%; }
    25%, 100% { left: 100%; }
}

.btn-main-action .action-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-main-action:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 35px rgba(2, 132, 199, 0.6), 0 0 30px rgba(56, 189, 248, 0.5);
}

.btn-main-action:active {
    transform: translateY(1px) scale(0.98);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 13, 0.88);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease forwards;
}

.modal-card {
    background: #0d1322;
    background-image: radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.4) 0%, #0d1322 75%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-card);
    position: relative;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modal-header {
    margin-bottom: 14px;
}

.modal-tag {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 6px;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.modal-preview-stage {
    background: rgba(7, 10, 18, 0.75);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.modal-lottie-box {
    width: 140px;
    height: 140px;
}

.modal-info-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.info-row strong {
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-modal-primary {
    width: 100%;
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
    transition: all 0.2s ease;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.55);
}

.btn-modal-secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-modal-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Progress Modal */
.progress-card {
    text-align: center;
    padding: 32px 24px;
}

.progress-anim-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.pulsing-sphere {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--grad-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.7);
    animation: pulse 1.5s infinite alternate;
}

.sphere-svg-spin {
    width: 36px;
    height: 36px;
    color: #fff;
    animation: spin 2s linear infinite;
}

.progress-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.progress-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.progress-bar-fill {
    height: 100%;
    background: var(--grad-glow);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    box-shadow: 0 0 12px var(--accent-cyan);
}

.progress-percent {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-cyan);
}

/* Success Modal */
.success-card {
    text-align: center;
    padding: 32px 24px;
}

.success-icon-wrap {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.success-check-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--grad-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
    animation: bounce 1s infinite alternate;
}

.success-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.success-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.pack-link-box {
    background: rgba(8, 12, 20, 0.75);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 20px;
    text-align: left;
}

.pack-link-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.pack-link-value {
    font-family: monospace;
    font-size: 13px;
    color: var(--accent-cyan);
    word-break: break-all;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-telegram-add {
    width: 100%;
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
    transition: all 0.25s ease;
}

.btn-telegram-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.7);
}

.btn-share-pack {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-share-pack:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-active);
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: slideDown 0.3s ease;
}

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

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 20px rgba(37, 99, 235, 0.4); }
    100% { transform: scale(1.05); box-shadow: 0 0 35px rgba(37, 99, 235, 0.8); }
}

@keyframes liveGlow {
    0% { opacity: 0.4; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

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

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .app-container {
        padding: 12px 10px;
    }
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .pack-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== STARS BALANCE & HEADER RIGHT ==================== */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(234, 179, 8, 0.14);
    border: 1px solid rgba(234, 179, 8, 0.35);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #facc15;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.15);
}

.user-balance-pill:hover {
    background: rgba(234, 179, 8, 0.22);
    transform: scale(1.04);
}

.stars-icon {
    font-size: 14px;
    filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.7));
}

.stars-unit {
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
    font-weight: 800;
}

/* ==================== DESTINATION SELECTOR ==================== */
.destination-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.destination-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.destination-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.destination-toggle-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dest-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dest-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.dest-pill.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.25);
}

.existing-pack-select-wrapper {
    margin-top: 4px;
    animation: fadeIn 0.2s ease;
}

.existing-pack-select-wrapper.hidden {
    display: none;
}

.custom-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

.custom-select option {
    background: #0f172a;
    color: #ffffff;
}

/* ==================== BALANCE INSUFFICIENT MODAL ==================== */
.balance-modal-card {
    text-align: center;
    max-width: 360px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(234, 179, 8, 0.35);
    box-shadow: 0 0 35px rgba(234, 179, 8, 0.2);
}

.balance-icon-wrap {
    margin-bottom: 12px;
}

.balance-star-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.3) 0%, rgba(234, 179, 8, 0.05) 70%);
    border: 2px solid rgba(234, 179, 8, 0.6);
    font-size: 32px;
    animation: pulseGlow 2s infinite;
}

.balance-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #fef08a;
    margin-bottom: 8px;
}

.balance-modal-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 16px;
}

.balance-calc-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.calc-val-curr {
    color: #38bdf8;
    font-weight: 700;
}

.calc-val-needed {
    color: #facc15;
    font-weight: 700;
}

.calc-row.highlight {
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #f87171;
    font-weight: 700;
}

.calc-val-diff {
    color: #ef4444;
    font-weight: 800;
}

.balance-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-topup-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: #000000;
    font-weight: 800;
    font-size: 14px;
    padding: 13px 18px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
    transition: all 0.2s ease;
}

.btn-topup-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.6);
}

.btn-cancel-balance {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-balance:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

/* ==================== PAYMENT CHOICE MODAL ==================== */
.payment-choice-modal-card {
    text-align: center;
    max-width: 380px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.2);
}

.payment-choice-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-pay-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.btn-pay-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-pay-title {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.btn-pay-sub {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}

.btn-pay-stars-bot {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(245, 158, 11, 0.2));
    border: 1.5px solid rgba(234, 179, 8, 0.6);
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.15);
}

.btn-pay-stars-bot:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(245, 158, 11, 0.35));
    border-color: #facc15;
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(234, 179, 8, 0.3);
}

.btn-pay-wallet {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border: 1.5px solid rgba(168, 85, 247, 0.6);
    color: #a855f7;
}

.btn-pay-wallet:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.35));
    border-color: #c084fc;
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.3);
}

/* ==================== INLINE STAR ICON STYLES ==================== */
.inline-star-icon {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 1px 4px rgba(245, 158, 11, 0.4));
}

.btn-star-icon {
    width: 20px;
    height: 20px;
    vertical-align: -3px;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 1px 5px rgba(245, 158, 11, 0.6));
}

.btn-stars-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 800;
}

/* ==================== LOGO BADGE / BORDER COLOR CUSTOMIZER ==================== */
.logo-color-customizer-section {
    background: rgba(11, 15, 25, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.25s ease;
}

.logo-color-customizer-section.hidden {
    display: none !important;
}

.color-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.color-label-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.color-picker-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.color-picker-label svg {
    color: #f59e0b;
}

.color-summary-badges {
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    user-select: none;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
}

.color-target-pills-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 12, 20, 0.6);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.color-target-pill {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.color-target-pill:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.color-target-pill.active {
    color: #fff;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.target-indicator-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    display: inline-block;
    flex-shrink: 0;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.color-target-pill.active .target-indicator-dot {
    border-color: #fff;
    box-shadow: 0 0 6px currentColor;
}

.color-picker-controls-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hex-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    background: rgba(8, 12, 20, 0.85);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    transition: all 0.2s ease;
}

.hex-input-wrap:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.hex-prefix {
    color: var(--text-muted);
    font-weight: 800;
    font-size: 14px;
    font-family: monospace;
    margin-right: 4px;
}

.hex-text-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 0;
    letter-spacing: 1px;
}

.color-picker-btn-wrapper {
    position: relative;
    flex-shrink: 0;
}

.native-color-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.btn-color-picker-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-color-picker-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.color-swatch-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

.btn-reset-badge-color {
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-reset-badge-color:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.preset-colors-row {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    scrollbar-width: thin;
}

.preset-colors-row::-webkit-scrollbar {
    height: 4px;
}

.preset-colors-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.color-swatch-btn {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background-color: var(--c);
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.color-swatch-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--c);
}

.color-swatch-btn.active {
    border-color: #ffffff;
    transform: scale(1.22);
    box-shadow: 0 0 12px var(--c), 0 0 0 2px rgba(255, 255, 255, 0.8);
}

/* ==================== 0. TELEGRAM-ONLY GUARD SCREEN STYLES (CYBER SHIELD) ==================== */
.telegram-only-guard {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #060911;
    background-image: 
        radial-gradient(circle at 50% 25%, rgba(56, 189, 248, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(168, 85, 247, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.telegram-only-guard.hidden {
    display: none !important;
}

/* ==================== NON-TELEGRAM INSTANT WEB SHIELD ==================== */
html.not-telegram #loading-screen,
html.not-telegram #app-container,
html.not-telegram .bottom-action-bar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

html.not-telegram #telegram-only-guard {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.guard-card {
    background: rgba(14, 18, 28, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 28px;
    padding: 36px 26px 24px 26px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(56, 189, 248, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    animation: guardPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.guard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

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

.guard-icon-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.guard-shield-glow {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, transparent 70%);
    animation: shieldPulse 3s infinite ease-in-out;
}

.guard-shield-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px dashed rgba(56, 189, 248, 0.5);
    animation: shieldRotate 16s linear infinite;
}

@keyframes shieldRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shieldPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.22); opacity: 0.95; }
}

.guard-icon-inner {
    position: relative;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(30, 58, 138, 0.4) 100%);
    border: 2px solid rgba(56, 189, 248, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
}

.guard-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.9px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.15);
}

.guard-badge-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px #ef4444;
    animation: livePulseDot 1.8s infinite ease-in-out;
}

@keyframes livePulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
}

.guard-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 10px;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.guard-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 6px;
}

.guard-desc b {
    color: #f8fafc;
}

/* Guard Features Showcase */
.guard-features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin: 16px 0 22px 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    box-sizing: border-box;
}

.guard-feat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    font-weight: 600;
    color: #cbd5e1;
    text-align: left;
}

.guard-feat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 13px;
    background: rgba(56, 189, 248, 0.12);
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.25);
    flex-shrink: 0;
}

.guard-actions {
    width: 100%;
    margin-bottom: 20px;
}

.btn-open-telegram-bot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0088cc 0%, #00a8ff 50%, #0077b5 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 
        0 8px 25px rgba(0, 168, 255, 0.5),
        0 0 20px rgba(0, 136, 204, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.btn-open-telegram-bot::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(25deg);
    animation: btnShineSweep 3.5s infinite;
}

@keyframes btnShineSweep {
    0% { left: -60%; }
    25%, 100% { left: 140%; }
}

.btn-open-telegram-bot:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(0, 168, 255, 0.65),
        0 0 30px rgba(0, 136, 204, 0.5);
    filter: brightness(1.08);
}

.btn-open-telegram-bot:active {
    transform: translateY(0) scale(0.98);
}

.guard-footer {
    font-size: 11px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 14px;
    width: 100%;
}

/* ==================== 2. APP FOOTER & 2026 COPYRIGHT ==================== */
.app-footer {
    margin-top: 36px;
    margin-bottom: 24px;
    padding: 24px 20px;
    background: rgba(18, 22, 31, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.app-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.35), transparent);
}

.footer-badge-shield {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--accent-amber);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.footer-brand-copy {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.2px;
}

.footer-brand-copy b {
    color: #f59e0b;
}

.footer-license-note {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-dim);
    max-width: 440px;
}

.footer-tags-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.footer-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-tag-dot {
    color: var(--text-dim);
    font-size: 10px;
}

/* ==================== 3. APP VIEWS & NAVIGATION ==================== */
.app-view {
    display: block;
    width: 100%;
    animation: fadeInView 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-view.hidden {
    display: none !important;
}

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

/* ==================== BOTTOM NAVIGATION BAR ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(8, 12, 22, 0.92);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 990;
    padding: 0 16px env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.bottom-nav-item {
    flex: 1;
    max-width: 160px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding-bottom: 4px;
}

.bottom-nav-item .nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 32px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item .nav-icon-wrap svg {
    transition: transform 0.25s ease;
}

.bottom-nav-item.active {
    color: #38bdf8;
}

.bottom-nav-item.active .nav-icon-wrap {
    background: rgba(56, 189, 248, 0.14);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.28);
    color: #38bdf8;
    transform: translateY(-2px);
}

.bottom-nav-item.active .nav-icon-wrap svg {
    transform: scale(1.08);
}

.bottom-nav-item .nav-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.bottom-nav-item.active .nav-label {
    color: #38bdf8;
}

.bottom-nav-item .nav-active-pill {
    position: absolute;
    bottom: 3px;
    width: 18px;
    height: 3px;
    background: #38bdf8;
    border-radius: 999px;
    box-shadow: 0 0 8px #38bdf8;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav-item.active .nav-active-pill {
    opacity: 1;
    transform: scaleX(1);
}

/* ==================== 4. PROFIL PAGE & REFERRAL STYLES ==================== */
.profile-page-wrap {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 14px 85px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

/* 1. Hero Identity Card */
.profile-hero-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.profile-hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #080d1a;
    border-radius: 50%;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.profile-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile-full-name {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.profile-username {
    color: #38bdf8;
    font-weight: 600;
}

.profile-dot {
    color: #475569;
}

.profile-id-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-family: monospace;
    color: #cbd5e1;
}

/* 2. Balance & Top-Up Card */
.profile-balance-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.profile-balance-card .balance-card-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.balance-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.balance-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balance-sub {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.balance-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-star-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.6));
}

.balance-big-number {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #fef08a;
    line-height: 1;
}

.balance-unit {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #f59e0b;
}

.btn-profile-topup {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #000000;
    padding: 10px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-profile-topup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55);
}

.balance-footer-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #cbd5e1;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-footer-info b {
    color: #facc15;
}

/* 3. Supercharged Referral System Card */
.profile-referral-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.profile-referral-card::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.ref-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ref-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ref-icon-glow {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ref-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.ref-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.ref-desc b {
    color: #38bdf8;
}

.ref-badge-bonus {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ref-link-box {
    display: flex;
    align-items: center;
    background: rgba(8, 12, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 6px 8px;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.ref-link-box:focus-within {
    border-color: #38bdf8;
}

.ref-link-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #38bdf8;
    font-size: 13px;
    font-family: monospace;
    padding: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy-ref {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-copy-ref:hover {
    background: rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

.btn-copy-ref.copied {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.ref-actions-row {
    display: flex;
    gap: 10px;
}

.btn-share-telegram {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    padding: 13px 20px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-share-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.6);
}

.ref-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ref-stat-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ref-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.ref-stat-num.highlight {
    color: #facc15;
}

.ref-stat-label {
    font-size: 11px;
    color: #94a3b8;
}

/* 4. Created Emojis History Section */
.profile-history-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.history-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.history-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.history-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

.history-count-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.history-packs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.packs-empty-state {
    text-align: center;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.empty-icon-wrap {
    font-size: 36px;
    margin-bottom: 2px;
}

.empty-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
}

.empty-sub {
    font-size: 12px;
    color: #94a3b8;
    max-width: 280px;
    line-height: 1.4;
}

.btn-goto-studio {
    margin-top: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-goto-studio:hover {
    background: rgba(56, 189, 248, 0.22);
}

/* 5. Links Section */
.profile-links-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.profile-link-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.profile-link-item:last-child {
    border-bottom: none;
}

.profile-link-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.link-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.link-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.link-item-icon.channel {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.link-item-icon.help {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.link-item-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 2px;
}

.link-title {
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.link-sub {
    font-size: 11.5px;
    color: #94a3b8;
}

.link-arrow {
    color: #64748b;
}

/* ==================== 8 FONTS TYPOGRAPHY CLASSES ==================== */
.font-stapel { font-family: 'Outfit', sans-serif; font-weight: 800; }
.font-inter { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; }
.font-grobold { font-family: 'Outfit', sans-serif; font-weight: 900; }
.font-montserrat { font-family: 'Montserrat', sans-serif; font-weight: 800; }
.font-bebas { font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 0.8px; font-size: 1.15em; }
.font-rubik { font-family: 'Rubik', sans-serif; font-weight: 800; }
.font-poppins { font-family: 'Poppins', sans-serif; font-weight: 700; }
.font-impact { font-family: 'Impact', 'Arial Black', sans-serif; letter-spacing: 0.5px; }

/* ==================== 5. REYTING (LEADERBOARD) VIEW ==================== */
.rating-page-wrap {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 14px 85px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-sizing: border-box;
}

.rating-header-card {
    background: linear-gradient(180deg, rgba(24, 30, 48, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.rating-badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    color: #f59e0b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.rating-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.rating-subtitle {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 18px;
}

.rating-toggle-pill {
    display: inline-flex;
    background: rgba(8, 12, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.rating-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.rating-tab-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

/* My Rank Card */
.my-rank-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.my-rank-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.my-rank-num {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-rank-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.my-rank-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.my-rank-val {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
}

.my-rank-badge {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* Top 3 Podium */
.podium-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    padding: 24px 8px 0;
    margin-top: 10px;
}

.podium-item {
    flex: 1;
    max-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.podium-crown {
    font-size: 22px;
    margin-bottom: 4px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.podium-first .podium-avatar {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border: 3px solid #fde68a;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

.podium-second .podium-avatar {
    background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
    border: 2.5px solid #f1f5f9;
}

.podium-third .podium-avatar {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border: 2.5px solid #fed7aa;
}

.podium-name {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #f8fafc;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.podium-score {
    font-size: 12px;
    font-weight: 800;
    color: #f59e0b;
    margin-bottom: 10px;
}

.podium-pillar {
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    box-sizing: border-box;
}

.podium-pillar span {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
}

.pillar-1 {
    height: 110px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-top: 2px solid #f59e0b;
    border-left: 1px solid rgba(245, 158, 11, 0.3);
    border-right: 1px solid rgba(245, 158, 11, 0.3);
}

.pillar-2 {
    height: 85px;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.25) 0%, rgba(100, 116, 139, 0.1) 100%);
    border-top: 2px solid #cbd5e1;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
}

.pillar-3 {
    height: 65px;
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.25) 0%, rgba(146, 64, 14, 0.1) 100%);
    border-top: 2px solid #d97706;
    border-left: 1px solid rgba(180, 83, 9, 0.2);
    border-right: 1px solid rgba(180, 83, 9, 0.2);
}

/* Leaderboard 4-20 List */
.leaderboard-list-wrap {
    margin-top: 10px;
}

.leaderboard-list-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.lb-row:hover {
    background: rgba(26, 32, 45, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}

.lb-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.lb-rank {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #64748b;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.lb-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.lb-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-score {
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    color: #f59e0b;
    flex-shrink: 0;
}

/* ==================== 6. DAILY BONUS CARD ==================== */
.daily-bonus-card {
    position: relative;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.bonus-card-glow {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.bonus-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bonus-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    animation: bounceSlow 3s ease-in-out infinite;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.bonus-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bonus-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
}

.bonus-desc {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.3;
}

.btn-claim-bonus {
    padding: 10px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 999px;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-claim-bonus:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.55);
}

.btn-claim-bonus:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* ==================== 7. LANGUAGE SELECTOR CARD ==================== */
.profile-settings-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.lang-switch-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.lang-switch-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-switch-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.lang-switch-btn.active {
    background: rgba(168, 85, 247, 0.15);
    border-color: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
}