/* Theme switcher UI + themes (test) */

.theme-settings {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 99998;
}

.theme-settings-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(67, 175, 255, 0.45);
    border-radius: 8px;
    background: rgba(17, 17, 17, 0.75);
    color: #43afff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s;
    backdrop-filter: blur(6px);
}

.theme-settings-btn:hover,
.theme-settings-btn.active {
    color: #fff;
    background: #43afff;
    border-color: #43afff;
}

.theme-settings-btn i {
    font-size: 16px;
    transition: transform 0.4s ease;
}

.theme-settings-btn.active i {
    transform: rotate(90deg);
}

.theme-settings-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 210px;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 8px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(67, 175, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    display: none;
    scrollbar-width: thin;
}

.theme-settings-panel.open {
    display: block;
}

.theme-settings-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 8px;
    padding: 0 4px;
}

.theme-option {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: transparent;
    color: #ddd;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-option:last-child {
    margin-bottom: 0;
}

.theme-option:hover {
    background: rgba(67, 175, 255, 0.12);
    border-color: rgba(67, 175, 255, 0.25);
}

.theme-option.active {
    background: rgba(67, 175, 255, 0.2);
    border-color: #43afff;
    color: #fff;
}

.theme-option-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.theme-option-dot.default {
    background: linear-gradient(135deg, #43afff 50%, #252525 50%);
}

.theme-option-dot.dark {
    background: #0a0a0a;
    border: 1px solid #333;
}

.theme-option-dot.maximum {
    background: linear-gradient(135deg, #6366f1, #ec4899, #22d3ee, #a855f7);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.6);
    animation: maxDotPulse 2s ease infinite;
}

.theme-option-dot.cyber {
    background: linear-gradient(135deg, #00ff9f 45%, #ff007a 55%);
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.7);
    animation: cyberDotFlicker 3s step-end infinite;
}

.theme-option-dot.sunset {
    background: linear-gradient(135deg, #fbbf24, #f97316, #be185d);
    box-shadow: 0 0 8px rgba(251, 146, 60, 0.65);
}

.theme-option-dot.ocean {
    background: linear-gradient(180deg, #22d3ee, #0369a1);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.55);
    animation: oceanDotFloat 2.5s ease-in-out infinite;
}

.theme-option-dot.v2 {
    background: linear-gradient(135deg, #22d3ee, #a855f7 45%, #fbbf24 70%, #ec4899);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.75);
    animation: v2DotPulse 2s ease-in-out infinite;
}

@keyframes v2DotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(168, 85, 247, 0.75); }
    50% { transform: scale(1.12); box-shadow: 0 0 16px rgba(34, 211, 238, 0.85); }
}

@keyframes maxDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes cyberDotFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
    52% { opacity: 1; }
    54% { opacity: 0.6; }
}

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

/* ── Dark theme ── */

html[data-theme="dark"] body {
    background-color: #050505;
    background-image: none;
}

html[data-theme="dark"] body::after {
    background: rgba(0, 0, 0, 0.94);
}

html[data-theme="dark"] body::before {
    opacity: 0.08;
}

html[data-theme="dark"] .main-company,
html[data-theme="dark"] .app-notify-link,
html[data-theme="dark"] .main-domain-label a {
    color: #6ec4ff;
}

html[data-theme="dark"] .main-input,
html[data-theme="dark"] .main-result {
    background: #111;
    border: 1px solid #222;
}

html[data-theme="dark"] .main-button,
html[data-theme="dark"] .main-history-button,
html[data-theme="dark"] .result-button {
    background: #1a6fb5 !important;
}

html[data-theme="dark"] .main-button:hover,
html[data-theme="dark"] .main-history-button:hover,
html[data-theme="dark"] .result-button:hover {
    color: #1a6fb5 !important;
    background: #e8e8e8 !important;
}

html[data-theme="dark"] .main-tool-link {
    background: rgba(26, 111, 181, 0.15);
    border-color: rgba(110, 196, 255, 0.35);
}

html[data-theme="dark"] .main-tool-link:hover {
    color: #1a6fb5 !important;
    background: #ddd;
}

html[data-theme="dark"] .history-modal-content,
html[data-theme="dark"] .history-item {
    background: #111 !important;
    border-color: #222;
}

html[data-theme="dark"] .history-item {
    border-left-color: #6ec4ff;
}

html[data-theme="dark"] .history-item:hover {
    background: #1a1a1a !important;
}

html[data-theme="dark"] .theme-settings-btn {
    background: rgba(10, 10, 10, 0.9);
    border-color: rgba(110, 196, 255, 0.4);
    color: #6ec4ff;
}

html[data-theme="dark"] .theme-settings-btn:hover,
html[data-theme="dark"] .theme-settings-btn.active {
    background: #1a6fb5;
    color: #fff;
}

html[data-theme="dark"] .theme-settings-panel {
    background: rgba(10, 10, 10, 0.98);
    border-color: rgba(110, 196, 255, 0.3);
}

html[data-theme="dark"] .mass-dropzone,
html[data-theme="dark"] .mass-stat {
    background: #111;
    border-color: #222;
}

/* ══════════════════════════════════════
   MAXIMUM — next-gen full redesign
   ══════════════════════════════════════ */

html[data-theme="maximum"] {
    --max-accent: #818cf8;
    --max-accent-2: #f472b6;
    --max-accent-3: #22d3ee;
    --max-glass: rgba(255, 255, 255, 0.06);
    --max-glass-border: rgba(255, 255, 255, 0.14);
    --max-text: #f1f5f9;
    --max-muted: #94a3b8;
}

/* Animated aurora background */
html[data-theme="maximum"] body {
    background: #030014 !important;
    background-image: none !important;
    color: var(--max-text);
    overflow-x: hidden;
}

html[data-theme="maximum"] body::before {
    opacity: 0 !important;
    animation: none !important;
}

html[data-theme="maximum"] body::after {
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99, 102, 241, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 20%, rgba(236, 72, 153, 0.28) 0%, transparent 50%),
        radial-gradient(ellipse 60% 70% at 50% 100%, rgba(34, 211, 238, 0.22) 0%, transparent 55%),
        linear-gradient(180deg, #030014 0%, #0a0520 50%, #030014 100%) !important;
    animation: maxAuroraShift 18s ease-in-out infinite alternate !important;
    z-index: -3 !important;
}

@keyframes maxAuroraShift {
    0% { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(25deg) brightness(1.08); }
}

/* Floating orbs */
html[data-theme="maximum"] .max-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -2;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
}

html[data-theme="maximum"] .max-orb-1 {
    width: 420px;
    height: 420px;
    background: #6366f1;
    top: -8%;
    left: -5%;
    animation: maxOrbDrift1 22s ease-in-out infinite;
}

html[data-theme="maximum"] .max-orb-2 {
    width: 360px;
    height: 360px;
    background: #ec4899;
    top: 55%;
    right: -8%;
    animation: maxOrbDrift2 26s ease-in-out infinite;
}

html[data-theme="maximum"] .max-orb-3 {
    width: 280px;
    height: 280px;
    background: #22d3ee;
    bottom: -5%;
    left: 30%;
    animation: maxOrbDrift3 20s ease-in-out infinite;
}

@keyframes maxOrbDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.08); }
    66% { transform: translate(40px, -30px) scale(0.95); }
}

@keyframes maxOrbDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-70px, -80px) scale(1.1); }
}

@keyframes maxOrbDrift3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, -40px) scale(1.05); }
}

/* Glass card */
html[data-theme="maximum"] .app-main {
    perspective: 1200px;
}

html[data-theme="maximum"] .main-content {
    position: relative;
    width: min(600px, 92vw);
    padding: 36px 32px 32px;
    border-radius: 28px;
    background: var(--max-glass);
    backdrop-filter: blur(28px) saturate(1.4);
    -webkit-backdrop-filter: blur(28px) saturate(1.4);
    border: 1px solid var(--max-glass-border);
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.12) inset;
    animation: maxCardReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: hidden;
}

html[data-theme="maximum"] .main-content::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(129, 140, 248, 0.6),
        rgba(244, 114, 182, 0.4),
        rgba(34, 211, 238, 0.5),
        rgba(168, 85, 247, 0.5)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: maxBorderGlow 5s ease-in-out infinite alternate;
}

html[data-theme="maximum"] .main-content::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 60%
    );
    animation: maxShineSweep 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes maxCardReveal {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes maxBorderGlow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@keyframes maxShineSweep {
    0%, 100% { transform: translateX(-30%) rotate(25deg); }
    50% { transform: translateX(30%) rotate(25deg); }
}

/* Typography */
html[data-theme="maximum"] .main-title {
    font-size: 2.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(
        120deg,
        #fff 0%,
        #c4b5fd 25%,
        #f9a8d4 50%,
        #67e8f9 75%,
        #fff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: maxTitleFlow 5s linear infinite;
    filter: drop-shadow(0 0 24px rgba(129, 140, 248, 0.35));
}

@keyframes maxTitleFlow {
    to { background-position: 200% center; }
}

html[data-theme="maximum"] .main-subtitle {
    color: var(--max-muted);
    font-style: normal;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 1.4rem;
}

html[data-theme="maximum"] .main-company {
    -webkit-text-fill-color: #a5b4fc;
    color: #a5b4fc;
}

/* Input */
html[data-theme="maximum"] .main-input {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 12px 16px !important;
    font-size: 0.9rem;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

html[data-theme="maximum"] .main-input:focus {
    border-color: rgba(129, 140, 248, 0.6) !important;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 0 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
    outline: none;
}

html[data-theme="maximum"] .main-input::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

/* Result box */
html[data-theme="maximum"] .main-result {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px);
    animation: maxFadeIn 0.4s ease;
}

@keyframes maxFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

html[data-theme="maximum"] .result-title {
    color: var(--max-accent);
    font-style: normal;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

/* Buttons — gradient + glow */
html[data-theme="maximum"] .main-button,
html[data-theme="maximum"] .main-history-button,
html[data-theme="maximum"] .result-button {
    position: relative;
    border-radius: 12px !important;
    padding: 10px 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #6366f1) !important;
    background-size: 200% auto !important;
    box-shadow:
        0 4px 20px rgba(99, 102, 241, 0.4),
        0 0 40px rgba(99, 102, 241, 0.15);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background-position 0.4s !important;
    overflow: hidden;
}

html[data-theme="maximum"] .main-history-button {
    background: linear-gradient(135deg, #475569, #64748b, #475569) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html[data-theme="maximum"] .main-button-kick {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, #db2777, #ec4899, #f472b6) !important;
    box-shadow: 0 4px 24px rgba(236, 72, 153, 0.35) !important;
}

html[data-theme="maximum"] .main-button-mass {
    background: linear-gradient(135deg, #0891b2, #06b6d4, #22d3ee) !important;
    box-shadow: 0 4px 24px rgba(34, 211, 238, 0.3) !important;
}

html[data-theme="maximum"] .main-button:hover,
html[data-theme="maximum"] .main-history-button:hover,
html[data-theme="maximum"] .result-button:hover {
    color: #fff !important;
    background-position: right center !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 32px rgba(99, 102, 241, 0.55),
        0 0 60px rgba(139, 92, 246, 0.25) !important;
}

html[data-theme="maximum"] .main-button-kick:hover {
    box-shadow: 0 8px 36px rgba(236, 72, 153, 0.5) !important;
}

html[data-theme="maximum"] .main-button-mass:hover {
    box-shadow: 0 8px 36px rgba(34, 211, 238, 0.45) !important;
}

html[data-theme="maximum"] .main-button:active,
html[data-theme="maximum"] .main-history-button:active {
    transform: translateY(0) scale(0.98);
}

/* Tool links */
html[data-theme="maximum"] .main-tools-row {
    max-width: 420px;
}

html[data-theme="maximum"] .main-tool-link {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 0.62rem;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="maximum"] .main-tool-link:hover {
    color: #fff !important;
    background: rgba(129, 140, 248, 0.25);
    border-color: rgba(167, 139, 250, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

/* Telegram banner */
html[data-theme="maximum"] .app-notifyy {
    background: rgba(3, 0, 20, 0.75) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(129, 140, 248, 0.2);
}

html[data-theme="maximum"] .app-notify-link {
    color: #c4b5fd !important;
    text-shadow: 0 0 20px rgba(196, 181, 253, 0.5);
}

/* Footer domain */
html[data-theme="maximum"] .main-domain-label {
    opacity: 0.7;
    color: var(--max-muted);
}

html[data-theme="maximum"] .main-domain-label a {
    color: #a5b4fc;
}

/* Modals */
html[data-theme="maximum"] .history-modal-content {
    background: rgba(15, 10, 35, 0.92) !important;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    animation: maxModalIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="maximum"] .history-modal-header {
    position: relative;
    z-index: 2;
}

html[data-theme="maximum"] .history-close-button {
    position: relative;
    z-index: 3;
    pointer-events: auto;
    background: rgba(99, 102, 241, 0.15) !important;
    border: 1px solid rgba(129, 140, 248, 0.35) !important;
    border-radius: 10px !important;
}

html[data-theme="maximum"] .history-close-button:hover {
    background: linear-gradient(135deg, #6366f1, #a855f7) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.45);
}

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

html[data-theme="maximum"] .history-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-left: 3px solid var(--max-accent) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

html[data-theme="maximum"] .history-item:hover {
    background: rgba(129, 140, 248, 0.12) !important;
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

html[data-theme="maximum"] .history-item-date {
    color: #c4b5fd !important;
}

/* Mass refresher in maximum */
html[data-theme="maximum"] .mass-dropzone {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(129, 140, 248, 0.3);
    border-radius: 14px;
}

html[data-theme="maximum"] .mass-dropzone.dragover {
    border-color: #a78bfa;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

html[data-theme="maximum"] .mass-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left-width: 3px !important;
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

html[data-theme="maximum"] .mass-progress-bar {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
    height: 10px;
}

html[data-theme="maximum"] .mass-progress-fill {
    background: linear-gradient(90deg, #6366f1, #ec4899, #22d3ee);
    background-size: 200% 100%;
    animation: maxProgressFlow 2s linear infinite;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.6);
}

@keyframes maxProgressFlow {
    to { background-position: 200% 0; }
}

html[data-theme="maximum"] .mass-status-line {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

html[data-theme="maximum"] .mass-method-picker.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* Theme switcher in maximum mode */
html[data-theme="maximum"] .theme-settings-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(167, 139, 250, 0.5);
    color: #c4b5fd;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

html[data-theme="maximum"] .theme-settings-btn:hover,
html[data-theme="maximum"] .theme-settings-btn.active {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

html[data-theme="maximum"] .theme-settings-panel {
    background: rgba(15, 10, 35, 0.95);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

html[data-theme="maximum"] .theme-option.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: #a78bfa;
}

html[data-theme="maximum"] .theme-option[data-theme="maximum"].active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.2));
    border-color: #f472b6;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
}

/* Test banner tweak */
html[data-theme="maximum"] #test-mode-banner {
    background: linear-gradient(90deg, #6366f1, #ec4899, #6366f1) !important;
    background-size: 200% auto !important;
    animation: maxBannerSlide 4s linear infinite !important;
    color: #fff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

@keyframes maxBannerSlide {
    to { background-position: 200% center; }
}

/* ══════════════════════════════════════
   CYBER — neon grid / synthwave
   ══════════════════════════════════════ */

html[data-theme="cyber"] {
    --cy-neon: #00ff9f;
    --cy-pink: #ff007a;
    --cy-bg: #07070d;
}

html[data-theme="cyber"] body {
    background: var(--cy-bg) !important;
    background-image:
        linear-gradient(rgba(0, 255, 159, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 159, 0.04) 1px, transparent 1px) !important;
    background-size: 48px 48px !important;
    color: #e2ffe8;
}

html[data-theme="cyber"] body::before {
    opacity: 0 !important;
}

html[data-theme="cyber"] body::after {
    background:
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 0, 122, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 80% 0%, rgba(0, 255, 159, 0.15) 0%, transparent 55%),
        linear-gradient(180deg, #07070d 0%, #0f0a18 50%, #07070d 100%) !important;
    animation: cyberPulse 8s ease-in-out infinite alternate !important;
}

html[data-theme="cyber"] .main-content {
    background: rgba(8, 8, 16, 0.88);
    border: 1px solid rgba(0, 255, 159, 0.35);
    border-radius: 4px;
    box-shadow:
        0 0 30px rgba(0, 255, 159, 0.12),
        0 0 60px rgba(255, 0, 122, 0.08),
        inset 0 0 40px rgba(0, 255, 159, 0.03);
    position: relative;
    overflow: hidden;
}

html[data-theme="cyber"] .main-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 159, 0.015) 2px,
        rgba(0, 255, 159, 0.015) 4px
    );
    pointer-events: none;
    animation: cyberScan 6s linear infinite;
}

html[data-theme="cyber"] .main-title {
    color: var(--cy-neon);
    text-shadow:
        0 0 10px rgba(0, 255, 159, 0.8),
        0 0 30px rgba(0, 255, 159, 0.4),
        0 0 60px rgba(255, 0, 122, 0.2);
    letter-spacing: 0.02em;
    animation: cyberGlitch 4s infinite;
}

html[data-theme="cyber"] .main-subtitle {
    color: rgba(0, 255, 159, 0.55);
    font-style: normal;
}

html[data-theme="cyber"] .main-company,
html[data-theme="cyber"] .app-notify-link {
    color: var(--cy-pink) !important;
    text-shadow: 0 0 12px rgba(255, 0, 122, 0.5);
}

html[data-theme="cyber"] .main-input {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(0, 255, 159, 0.35) !important;
    border-radius: 2px !important;
    color: #e2ffe8;
    box-shadow: inset 0 0 20px rgba(0, 255, 159, 0.05);
}

html[data-theme="cyber"] .main-input:focus {
    border-color: var(--cy-neon) !important;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.25);
    outline: none;
}

html[data-theme="cyber"] .main-result {
    background: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(255, 0, 122, 0.35) !important;
    border-radius: 2px !important;
}

html[data-theme="cyber"] .main-button,
html[data-theme="cyber"] .main-history-button,
html[data-theme="cyber"] .result-button {
    background: transparent !important;
    border: 2px solid var(--cy-neon) !important;
    border-radius: 2px !important;
    color: var(--cy-neon) !important;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    transition: all 0.25s !important;
}

html[data-theme="cyber"] .main-button-kick {
    border-color: var(--cy-pink) !important;
    color: var(--cy-pink) !important;
    box-shadow: 0 0 20px rgba(255, 0, 122, 0.2);
}

html[data-theme="cyber"] .main-button-mass {
    border-color: #00d4ff !important;
    color: #00d4ff !important;
}

html[data-theme="cyber"] .main-button:hover,
html[data-theme="cyber"] .main-history-button:hover,
html[data-theme="cyber"] .result-button:hover {
    background: var(--cy-neon) !important;
    color: #07070d !important;
    box-shadow: 0 0 40px rgba(0, 255, 159, 0.5) !important;
}

html[data-theme="cyber"] .main-button-kick:hover {
    background: var(--cy-pink) !important;
    color: #fff !important;
    box-shadow: 0 0 40px rgba(255, 0, 122, 0.5) !important;
}

html[data-theme="cyber"] .main-tool-link {
    background: rgba(0, 255, 159, 0.06);
    border: 1px solid rgba(0, 255, 159, 0.25);
    border-radius: 2px;
}

html[data-theme="cyber"] .main-tool-link:hover {
    color: var(--cy-neon) !important;
    box-shadow: 0 0 16px rgba(0, 255, 159, 0.3);
}

html[data-theme="cyber"] .history-modal-content {
    background: rgba(8, 8, 16, 0.96) !important;
    border: 1px solid rgba(0, 255, 159, 0.35) !important;
    border-radius: 4px !important;
    box-shadow: 0 0 50px rgba(0, 255, 159, 0.15);
}

html[data-theme="cyber"] .history-modal-header {
    border-bottom-color: var(--cy-neon) !important;
}

html[data-theme="cyber"] .history-modal-header h2 {
    color: var(--cy-neon) !important;
    text-shadow: 0 0 12px rgba(0, 255, 159, 0.5);
}

html[data-theme="cyber"] .history-item {
    background: rgba(0, 0, 0, 0.5) !important;
    border-left-color: var(--cy-pink) !important;
}

html[data-theme="cyber"] .history-item:hover {
    background: rgba(255, 0, 122, 0.1) !important;
}

html[data-theme="cyber"] .mass-dropzone,
html[data-theme="cyber"] .mass-stat {
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(0, 255, 159, 0.25);
    border-radius: 2px;
}

html[data-theme="cyber"] .mass-progress-fill {
    background: linear-gradient(90deg, var(--cy-neon), var(--cy-pink)) !important;
    box-shadow: 0 0 12px rgba(0, 255, 159, 0.5);
}

html[data-theme="cyber"] .theme-settings-btn {
    border-color: rgba(0, 255, 159, 0.5);
    color: var(--cy-neon);
    border-radius: 2px;
}

html[data-theme="cyber"] .theme-settings-btn:hover,
html[data-theme="cyber"] .theme-settings-btn.active {
    background: var(--cy-neon);
    color: #07070d;
    box-shadow: 0 0 24px rgba(0, 255, 159, 0.4);
}

html[data-theme="cyber"] .theme-option.active {
    border-color: var(--cy-neon);
    background: rgba(0, 255, 159, 0.1);
}

@keyframes cyberPulse {
    from { filter: brightness(1); }
    to { filter: brightness(1.12); }
}

@keyframes cyberScan {
    from { transform: translateY(0); }
    to { transform: translateY(8px); }
}

@keyframes cyberGlitch {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(-2px, 1px); }
    93% { transform: translate(2px, -1px); }
    95% { transform: translate(-1px, 0); }
}

/* ══════════════════════════════════════
   SUNSET — golden hour / warm glow
   ══════════════════════════════════════ */

html[data-theme="sunset"] {
    --su-gold: #fbbf24;
    --su-coral: #fb7185;
    --su-plum: #581c87;
}

html[data-theme="sunset"] body {
    background: #1a0a2e !important;
    background-image: none !important;
    color: #fff7ed;
}

html[data-theme="sunset"] body::before {
    opacity: 0 !important;
}

html[data-theme="sunset"] body::after {
    background:
        radial-gradient(ellipse 70% 50% at 50% 110%, rgba(251, 113, 133, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 55% 40% at 20% 20%, rgba(251, 191, 36, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 45% 35% at 85% 15%, rgba(190, 24, 93, 0.2) 0%, transparent 45%),
        linear-gradient(165deg, #1a0a2e 0%, #3d1020 40%, #7c2d12 75%, #1a0a2e 100%) !important;
    animation: sunsetGlow 14s ease-in-out infinite alternate !important;
}

html[data-theme="sunset"] .main-content {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 24px;
    box-shadow:
        0 24px 60px rgba(124, 45, 18, 0.35),
        0 0 80px rgba(251, 113, 133, 0.12);
    animation: sunsetCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

html[data-theme="sunset"] .main-title {
    background: linear-gradient(135deg, #fef3c7, #fbbf24, #fb7185, #fbbf24);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sunsetTitleShine 6s linear infinite;
    filter: drop-shadow(0 4px 20px rgba(251, 146, 60, 0.35));
}

html[data-theme="sunset"] .main-subtitle {
    color: rgba(254, 215, 170, 0.75);
    font-style: normal;
}

html[data-theme="sunset"] .main-company,
html[data-theme="sunset"] .app-notify-link {
    color: #fcd34d !important;
}

html[data-theme="sunset"] .main-input {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(251, 191, 36, 0.3) !important;
    border-radius: 14px !important;
    color: #fff7ed;
}

html[data-theme="sunset"] .main-input:focus {
    border-color: rgba(251, 113, 133, 0.6) !important;
    box-shadow: 0 0 24px rgba(251, 113, 133, 0.2);
    outline: none;
}

html[data-theme="sunset"] .main-result {
    background: rgba(0, 0, 0, 0.28) !important;
    border: 1px solid rgba(251, 191, 36, 0.2) !important;
    border-radius: 16px !important;
}

html[data-theme="sunset"] .main-button,
html[data-theme="sunset"] .main-history-button,
html[data-theme="sunset"] .result-button {
    background: linear-gradient(135deg, #f59e0b, #f97316, #fb7185) !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 28px rgba(249, 115, 22, 0.4);
    transition: transform 0.25s, box-shadow 0.25s !important;
}

html[data-theme="sunset"] .main-history-button {
    background: linear-gradient(135deg, #78716c, #57534e) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html[data-theme="sunset"] .main-button-kick {
    background: linear-gradient(135deg, #be185d, #fb7185, #fda4af) !important;
}

html[data-theme="sunset"] .main-button-mass {
    background: linear-gradient(135deg, #c2410c, #ea580c, #fbbf24) !important;
}

html[data-theme="sunset"] .main-button:hover,
html[data-theme="sunset"] .main-history-button:hover,
html[data-theme="sunset"] .result-button:hover {
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(251, 113, 133, 0.45) !important;
}

html[data-theme="sunset"] .main-tool-link {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 10px;
}

html[data-theme="sunset"] .main-tool-link:hover {
    color: #fef3c7 !important;
    background: rgba(251, 113, 133, 0.2);
}

html[data-theme="sunset"] .history-modal-content {
    background: rgba(45, 15, 30, 0.94) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(251, 191, 36, 0.25) !important;
    border-radius: 20px !important;
    box-shadow: 0 30px 80px rgba(124, 45, 18, 0.4);
}

html[data-theme="sunset"] .history-modal-header h2 {
    color: #fbbf24 !important;
}

html[data-theme="sunset"] .history-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border-left-color: #fb7185 !important;
    border-radius: 12px !important;
}

html[data-theme="sunset"] .history-item-date {
    color: #fcd34d !important;
}

html[data-theme="sunset"] .mass-dropzone,
html[data-theme="sunset"] .mass-stat {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(251, 191, 36, 0.25);
    border-radius: 12px;
}

html[data-theme="sunset"] .mass-progress-fill {
    background: linear-gradient(90deg, #fbbf24, #f97316, #fb7185) !important;
}

html[data-theme="sunset"] .theme-settings-btn {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fbbf24;
}

html[data-theme="sunset"] .theme-settings-btn:hover,
html[data-theme="sunset"] .theme-settings-btn.active {
    background: linear-gradient(135deg, #f59e0b, #fb7185);
    color: #fff;
}

html[data-theme="sunset"] .theme-option.active {
    border-color: #fb7185;
    background: rgba(251, 113, 133, 0.15);
}

@keyframes sunsetGlow {
    from { filter: brightness(1) saturate(1); }
    to { filter: brightness(1.08) saturate(1.15); }
}

@keyframes sunsetTitleShine {
    to { background-position: 200% center; }
}

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

/* ══════════════════════════════════════
   OCEAN — deep sea / bioluminescence
   ══════════════════════════════════════ */

html[data-theme="ocean"] {
    --oc-teal: #2dd4bf;
    --oc-blue: #0ea5e9;
    --oc-deep: #001220;
}

html[data-theme="ocean"] body {
    background: var(--oc-deep) !important;
    background-image: none !important;
    color: #e0f2fe;
}

html[data-theme="ocean"] body::before {
    opacity: 0 !important;
}

html[data-theme="ocean"] body::after {
    background:
        radial-gradient(ellipse 80% 50% at 50% 120%, rgba(14, 165, 233, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 15% 60%, rgba(45, 212, 191, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 35% 25% at 90% 40%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
        linear-gradient(180deg, #000810 0%, #001220 40%, #002035 70%, #001220 100%) !important;
    animation: oceanDrift 20s ease-in-out infinite alternate !important;
}

html[data-theme="ocean"] .main-content {
    background: rgba(0, 30, 50, 0.55);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 28px;
    box-shadow:
        0 28px 70px rgba(0, 20, 40, 0.6),
        0 0 60px rgba(14, 165, 233, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

html[data-theme="ocean"] .main-content::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 140%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(45, 212, 191, 0.08) 0%, transparent 65%);
    animation: oceanBubble 8s ease-in-out infinite;
    pointer-events: none;
}

html[data-theme="ocean"] .main-title {
    background: linear-gradient(120deg, #e0f2fe, #2dd4bf, #0ea5e9, #67e8f9);
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: oceanTitleFlow 7s linear infinite;
    filter: drop-shadow(0 0 20px rgba(45, 212, 191, 0.35));
}

html[data-theme="ocean"] .main-subtitle {
    color: rgba(125, 211, 252, 0.7);
    font-style: normal;
}

html[data-theme="ocean"] .main-company,
html[data-theme="ocean"] .app-notify-link {
    color: #67e8f9 !important;
    text-shadow: 0 0 16px rgba(103, 232, 249, 0.35);
}

html[data-theme="ocean"] .main-input {
    background: rgba(0, 20, 40, 0.6) !important;
    border: 1px solid rgba(45, 212, 191, 0.25) !important;
    border-radius: 16px !important;
    color: #e0f2fe;
}

html[data-theme="ocean"] .main-input:focus {
    border-color: rgba(14, 165, 233, 0.55) !important;
    box-shadow: 0 0 28px rgba(45, 212, 191, 0.2);
    outline: none;
}

html[data-theme="ocean"] .main-result {
    background: rgba(0, 25, 45, 0.65) !important;
    border: 1px solid rgba(14, 165, 233, 0.2) !important;
    border-radius: 18px !important;
}

html[data-theme="ocean"] .main-button,
html[data-theme="ocean"] .main-history-button,
html[data-theme="ocean"] .result-button {
    background: linear-gradient(135deg, #0369a1, #0ea5e9, #2dd4bf) !important;
    border: 1px solid rgba(125, 211, 252, 0.2) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 24px rgba(14, 165, 233, 0.35);
    transition: transform 0.25s, box-shadow 0.25s !important;
}

html[data-theme="ocean"] .main-history-button {
    background: linear-gradient(135deg, #164e63, #155e75) !important;
}

html[data-theme="ocean"] .main-button-kick {
    background: linear-gradient(135deg, #0e7490, #06b6d4, #2dd4bf) !important;
}

html[data-theme="ocean"] .main-button-mass {
    background: linear-gradient(135deg, #0284c7, #38bdf8, #67e8f9) !important;
}

html[data-theme="ocean"] .main-button:hover,
html[data-theme="ocean"] .main-history-button:hover,
html[data-theme="ocean"] .result-button:hover {
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(45, 212, 191, 0.4) !important;
}

html[data-theme="ocean"] .main-tool-link {
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 12px;
}

html[data-theme="ocean"] .main-tool-link:hover {
    color: #a5f3fc !important;
    background: rgba(45, 212, 191, 0.15);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}

html[data-theme="ocean"] .history-modal-content {
    background: rgba(0, 25, 45, 0.95) !important;
    backdrop-filter: blur(22px);
    border: 1px solid rgba(45, 212, 191, 0.22) !important;
    border-radius: 22px !important;
    box-shadow: 0 30px 80px rgba(0, 20, 40, 0.55);
}

html[data-theme="ocean"] .history-modal-header h2 {
    color: #2dd4bf !important;
}

html[data-theme="ocean"] .history-item {
    background: rgba(255, 255, 255, 0.04) !important;
    border-left-color: #0ea5e9 !important;
    border-radius: 14px !important;
}

html[data-theme="ocean"] .history-item-date {
    color: #7dd3fc !important;
}

html[data-theme="ocean"] .mass-dropzone,
html[data-theme="ocean"] .mass-stat {
    background: rgba(0, 20, 40, 0.45);
    border-color: rgba(45, 212, 191, 0.22);
    border-radius: 14px;
}

html[data-theme="ocean"] .mass-progress-fill {
    background: linear-gradient(90deg, #0369a1, #2dd4bf, #67e8f9) !important;
    background-size: 200% 100%;
    animation: oceanProgress 3s linear infinite;
}

html[data-theme="ocean"] .theme-settings-btn {
    border-color: rgba(45, 212, 191, 0.4);
    color: #2dd4bf;
}

html[data-theme="ocean"] .theme-settings-btn:hover,
html[data-theme="ocean"] .theme-settings-btn.active {
    background: linear-gradient(135deg, #0369a1, #2dd4bf);
    color: #fff;
}

html[data-theme="ocean"] .theme-option.active {
    border-color: #2dd4bf;
    background: rgba(45, 212, 191, 0.12);
}

@keyframes oceanDrift {
    from { transform: translateY(0); }
    to { transform: translateY(-12px); }
}

@keyframes oceanBubble {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-20px) scale(1.05); opacity: 1; }
}

@keyframes oceanTitleFlow {
    to { background-position: 250% center; }
}

@keyframes oceanProgress {
    to { background-position: 200% 0; }
}

/* ══════════════════════════════════════════════════════
   V2 — Liquid Chrome / Aurora Pro (next-gen flagship)
   ══════════════════════════════════════════════════════ */

html[data-theme="v2"] {
    --v2-chrome-1: #67e8f9;
    --v2-chrome-2: #c084fc;
    --v2-chrome-3: #fbbf24;
    --v2-chrome-4: #fb7185;
    --v2-glass: rgba(255, 255, 255, 0.04);
    --v2-border: rgba(255, 255, 255, 0.12);
    --v2-text: #f8fafc;
    --v2-muted: #94a3b8;
    --v2-mx: 0.5;
    --v2-my: 0.5;
}

html[data-theme="v2"] body {
    background: #000008 !important;
    background-image: none !important;
    color: var(--v2-text);
    overflow-x: hidden;
}

html[data-theme="v2"] body::before {
    opacity: 0 !important;
}

html[data-theme="v2"] body::after {
    background:
        radial-gradient(
            circle at calc(var(--v2-mx) * 100%) calc(var(--v2-my) * 100%),
            rgba(103, 232, 249, 0.14) 0%,
            transparent 42%
        ),
        radial-gradient(ellipse 90% 70% at 15% 0%, rgba(192, 132, 252, 0.28) 0%, transparent 52%),
        radial-gradient(ellipse 80% 60% at 90% 15%, rgba(251, 191, 36, 0.18) 0%, transparent 48%),
        radial-gradient(ellipse 70% 55% at 50% 100%, rgba(236, 72, 153, 0.22) 0%, transparent 55%),
        linear-gradient(160deg, #000008 0%, #0a0018 35%, #050510 70%, #000008 100%) !important;
    animation: v2AuroraDrift 22s ease-in-out infinite alternate !important;
    z-index: -4 !important;
}

/* JS layer: particles, spotlight, mesh blobs, grain */
html[data-theme="v2"] #v2ThemeFx {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

html[data-theme="v2"] .v2-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

html[data-theme="v2"] .v2-spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at calc(var(--v2-mx) * 100%) calc(var(--v2-my) * 100%),
        rgba(255, 255, 255, 0.07),
        transparent 45%
    );
    transition: opacity 0.3s;
}

html[data-theme="v2"] .v2-mesh {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    mix-blend-mode: screen;
}

html[data-theme="v2"] .v2-mesh-1 {
    width: 520px;
    height: 520px;
    background: #7c3aed;
    top: -12%;
    left: -8%;
    animation: v2Mesh1 24s ease-in-out infinite;
}

html[data-theme="v2"] .v2-mesh-2 {
    width: 440px;
    height: 440px;
    background: #06b6d4;
    bottom: -10%;
    right: -6%;
    animation: v2Mesh2 28s ease-in-out infinite;
}

html[data-theme="v2"] .v2-mesh-3 {
    width: 360px;
    height: 360px;
    background: #f59e0b;
    top: 40%;
    left: 35%;
    animation: v2Mesh3 20s ease-in-out infinite;
}

html[data-theme="v2"] .v2-grain {
    position: absolute;
    inset: -100%;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: v2GrainShift 0.5s steps(2) infinite;
}

@keyframes v2AuroraDrift {
    0% { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(18deg) brightness(1.06); }
}

@keyframes v2Mesh1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(90px, 70px) scale(1.12); }
}

@keyframes v2Mesh2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-80px, -60px) scale(1.08); }
}

@keyframes v2Mesh3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(50px, -40px); }
    66% { transform: translate(-30px, 50px); }
}

@keyframes v2GrainShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-2%, -2%); }
}

/* 3D chrome card */
html[data-theme="v2"] .app-main {
    perspective: 1400px;
}

html[data-theme="v2"] .main-content {
    --v2-tilt-x: 0deg;
    --v2-tilt-y: 0deg;
    position: relative;
    width: min(620px, 94vw);
    padding: 40px 36px 34px;
    border-radius: 32px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.02) 45%,
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(40px) saturate(1.6);
    -webkit-backdrop-filter: blur(40px) saturate(1.6);
    border: 1px solid var(--v2-border);
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 0 80px rgba(124, 58, 237, 0.12);
    transform: rotateX(var(--v2-tilt-x)) rotateY(var(--v2-tilt-y));
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.4s;
    animation: v2CardEnter 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: hidden;
}

html[data-theme="v2"] .main-content::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 34px;
    padding: 2px;
    background: conic-gradient(
        from var(--v2-border-angle, 0deg),
        #67e8f9,
        #c084fc,
        #fbbf24,
        #fb7185,
        #67e8f9
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: v2BorderSpin 6s linear infinite;
    pointer-events: none;
}

html[data-theme="v2"] {
    --v2-border-angle: 0deg;
}

@property --v2-border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

html[data-theme="v2"] .main-content::before {
    --v2-border-angle: 0deg;
}

@keyframes v2BorderSpin {
    to { --v2-border-angle: 360deg; }
}

html[data-theme="v2"] .main-content::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(
        105deg,
        transparent 42%,
        rgba(255, 255, 255, 0.06) 50%,
        transparent 58%
    );
    animation: v2ChromeSweep 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes v2CardEnter {
    from {
        opacity: 0;
        transform: rotateX(12deg) translateY(40px) scale(0.92);
        filter: blur(12px);
    }
    to {
        opacity: 1;
        transform: rotateX(var(--v2-tilt-x)) rotateY(var(--v2-tilt-y));
        filter: blur(0);
    }
}

@keyframes v2ChromeSweep {
    0%, 100% { transform: translateX(-25%) rotate(25deg); opacity: 0.4; }
    50% { transform: translateX(25%) rotate(25deg); opacity: 1; }
}

/* Holographic title */
html[data-theme="v2"] .main-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    background: linear-gradient(
        120deg,
        #fff 0%,
        #67e8f9 15%,
        #e879f9 35%,
        #fbbf24 55%,
        #fb7185 75%,
        #fff 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: v2TitleFlow 4s linear infinite;
    filter: drop-shadow(0 0 30px rgba(192, 132, 252, 0.45));
    position: relative;
}

@keyframes v2TitleFlow {
    to { background-position: 300% center; }
}

html[data-theme="v2"] .main-subtitle {
    color: var(--v2-muted);
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0.02em;
}

html[data-theme="v2"] .main-company {
    -webkit-text-fill-color: #c4b5fd;
    color: #c4b5fd;
    text-shadow: 0 0 24px rgba(196, 181, 253, 0.4);
}

html[data-theme="v2"] .app-notify-link {
    color: #67e8f9 !important;
    text-shadow: 0 0 20px rgba(103, 232, 249, 0.45);
}

/* Inputs */
html[data-theme="v2"] .main-input {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 14px 18px !important;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s !important;
}

html[data-theme="v2"] .main-input:focus {
    border-color: rgba(192, 132, 252, 0.55) !important;
    box-shadow:
        0 0 0 4px rgba(124, 58, 237, 0.15),
        0 0 40px rgba(103, 232, 249, 0.15) !important;
    transform: translateY(-2px);
    outline: none;
}

html[data-theme="v2"] .main-result {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(16px);
    animation: v2PopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes v2PopIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

html[data-theme="v2"] .result-title {
    color: var(--v2-chrome-1);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
}

/* Liquid chrome buttons */
html[data-theme="v2"] .main-button,
html[data-theme="v2"] .main-history-button,
html[data-theme="v2"] .result-button {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 0.9),
        rgba(6, 182, 212, 0.85),
        rgba(124, 58, 237, 0.9)
    ) !important;
    background-size: 200% auto !important;
    box-shadow:
        0 8px 32px rgba(124, 58, 237, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s, background-position 0.4s !important;
}

html[data-theme="v2"] .main-button::after,
html[data-theme="v2"] .main-history-button::after,
html[data-theme="v2"] .result-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s;
}

html[data-theme="v2"] .main-button:hover::after,
html[data-theme="v2"] .main-history-button:hover::after,
html[data-theme="v2"] .result-button:hover::after {
    left: 150%;
}

html[data-theme="v2"] .main-history-button {
    background: linear-gradient(135deg, #334155, #475569, #334155) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="v2"] .main-button-kick {
    background: linear-gradient(135deg, #db2777, #ec4899, #f472b6) !important;
    box-shadow: 0 8px 36px rgba(236, 72, 153, 0.4) !important;
}

html[data-theme="v2"] .main-button-mass {
    background: linear-gradient(135deg, #0891b2, #22d3ee, #67e8f9) !important;
    box-shadow: 0 8px 36px rgba(34, 211, 238, 0.35) !important;
}

html[data-theme="v2"] .main-button:hover,
html[data-theme="v2"] .main-history-button:hover,
html[data-theme="v2"] .result-button:hover {
    color: #fff !important;
    transform: translateY(-4px) scale(1.03);
    background-position: right center !important;
    box-shadow:
        0 16px 48px rgba(124, 58, 237, 0.5),
        0 0 60px rgba(103, 232, 249, 0.2) !important;
}

html[data-theme="v2"] .main-tool-link {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="v2"] .main-tool-link:hover {
    color: #fff !important;
    border-color: rgba(192, 132, 252, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.25);
}

html[data-theme="v2"] .app-notifyy {
    background: rgba(0, 0, 8, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(192, 132, 252, 0.2);
}

html[data-theme="v2"] .main-domain-label a {
    color: #a5b4fc;
}

/* Modals */
html[data-theme="v2"] .history-modal-content {
    background: rgba(8, 4, 20, 0.92) !important;
    backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 24px !important;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7), 0 0 60px rgba(124, 58, 237, 0.15);
    animation: v2ModalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes v2ModalIn {
    from { opacity: 0; transform: scale(0.9) translateY(24px); filter: blur(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

html[data-theme="v2"] .history-modal-header h2 {
    background: linear-gradient(90deg, #67e8f9, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-theme="v2"] .history-close-button {
    background: rgba(124, 58, 237, 0.2) !important;
    border: 1px solid rgba(192, 132, 252, 0.4) !important;
    border-radius: 12px !important;
}

html[data-theme="v2"] .history-close-button:hover {
    background: linear-gradient(135deg, #7c3aed, #06b6d4) !important;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.5);
}

html[data-theme="v2"] .history-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-left: 3px solid #c084fc !important;
    border-radius: 14px !important;
    transition: all 0.35s ease;
}

html[data-theme="v2"] .history-item:hover {
    background: rgba(124, 58, 237, 0.12) !important;
    transform: translateX(8px);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.2);
}

html[data-theme="v2"] .history-item-date {
    color: #c4b5fd !important;
}

/* Mass refresher */
html[data-theme="v2"] .mass-dropzone {
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed rgba(192, 132, 252, 0.35);
    border-radius: 18px;
    transition: all 0.3s;
}

html[data-theme="v2"] .mass-dropzone.dragover {
    border-color: #67e8f9;
    background: rgba(124, 58, 237, 0.12);
    box-shadow: 0 0 40px rgba(103, 232, 249, 0.25);
    transform: scale(1.01);
}

html[data-theme="v2"] .mass-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    backdrop-filter: blur(10px);
}

html[data-theme="v2"] .mass-progress-fill {
    background: linear-gradient(90deg, #67e8f9, #c084fc, #fbbf24, #fb7185, #67e8f9) !important;
    background-size: 300% 100% !important;
    animation: v2ProgressFlow 2.5s linear infinite;
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.6);
}

@keyframes v2ProgressFlow {
    to { background-position: 300% 0; }
}

html[data-theme="v2"] .mass-method-picker.active {
    background: linear-gradient(135deg, #7c3aed, #06b6d4) !important;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.45);
}

/* Theme switcher V2 */
html[data-theme="v2"] .theme-settings-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(192, 132, 252, 0.45);
    color: #c4b5fd;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.25);
}

html[data-theme="v2"] .theme-settings-btn:hover,
html[data-theme="v2"] .theme-settings-btn.active {
    background: conic-gradient(from 0deg, #06b6d4, #a855f7, #fbbf24, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 36px rgba(168, 85, 247, 0.55);
}

html[data-theme="v2"] .theme-settings-panel {
    background: rgba(8, 4, 20, 0.96);
    border: 1px solid rgba(192, 132, 252, 0.3);
    backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

html[data-theme="v2"] .theme-option.active {
    background: rgba(124, 58, 237, 0.2);
    border-color: #c084fc;
}

html[data-theme="v2"] .theme-option[data-theme="v2"].active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.2));
    border-color: #67e8f9;
    box-shadow: 0 0 24px rgba(103, 232, 249, 0.25);
}

html[data-theme="v2"] #test-mode-banner {
    background: linear-gradient(90deg, #7c3aed, #06b6d4, #fbbf24, #ec4899, #7c3aed) !important;
    background-size: 300% auto !important;
    animation: v2BannerFlow 5s linear infinite !important;
    color: #fff !important;
    font-weight: 800 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@keyframes v2BannerFlow {
    to { background-position: 300% center; }
}
