:root {
    --theme-primary: #4a9eff;
    --theme-secondary: #6ba3ff;
    --theme-accent: #8b7fc8;
    --theme-primary-rgb: 74, 158, 255;
    --theme-accent-rgb: 139, 127, 200
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

button,
a,
input,
select,
textarea,
[role=button] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent
}

html {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #0a0a0f;
    color: #e8e8e8;
    font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative
}

body:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(/assets/icon128-CzDByKPX.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: .6;
    pointer-events: none;
    z-index: 0
}

@media(prefers-reduced-motion:reduce) {

    *,
    *:before,
    *:after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important
    }
}

body[data-reduce-animations=true] *,
body[data-reduce-animations=true] *:before,
body[data-reduce-animations=true] *:after {
    animation-duration: 0ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important
}

body[data-hardware-acceleration=true] .toggle .slider,
body[data-hardware-acceleration=true] .action-icon,
body[data-hardware-acceleration=true] .filter-btn,
body[data-hardware-acceleration=true] .log-icon-btn {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden
}

.app-container {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    contain: layout style paint;
    overflow: hidden
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: linear-gradient(180deg, #12121cfa, #0c0c14f5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    min-height: 60px;
    box-shadow: 0 4px 30px #0009, 0 1px #ffffff08 inset;
    contain: layout style paint;
    position: relative;
    z-index: 10
}

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

.logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 10px;
    padding: 0;
    box-shadow: none;
    position: relative;
    overflow: visible
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1
}

.header-info h1 {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-secondary, #6ba3ff) 0%, #ffffff 50%, var(--theme-accent, #9b8dd4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -.8px;
    text-transform: uppercase;
    font-size: 18px
}

.header-info .version {
    font-size: 11px;
    color: #ffffff80;
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center
}

.action-icon {
    width: 42px;
    height: 42px;
    background: #ffffff0a;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff9;
    position: relative;
    text-decoration: none;
    transition: all .2s cubic-bezier(.4, 0, .2, 1)
}

.action-icon.telegram-link {
    cursor: pointer;
    background: #0088cc26;
    border-color: #08c6;
    color: #08c
}

.action-icon.telegram-link:hover {
    background: #0088cc40;
    border-color: #08c;
    color: #fff
}

.action-icon.coming-soon {
    cursor: not-allowed;
    opacity: .5;
    position: relative
}

.action-icon.coming-soon:hover {
    opacity: .6
}

.action-icon:disabled {
    cursor: not-allowed;
    opacity: .5
}

.coming-soon-badge {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translate(-50%);
    font-size: 8px;
    font-weight: 700;
    color: #ffffff80;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    pointer-events: none
}

.action-icon:after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    bottom: -1px;
    left: -1px;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff), var(--theme-accent, #8b7fc8));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0
}

.action-icon:hover:after {
    opacity: 1
}

.action-icon:hover {
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .12);
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .4);
    color: var(--theme-secondary, #6ba3ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .15)
}

.action-icon:active {
    opacity: .8
}

.notification-bell {
    position: relative
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ffffff1f;
    color: #ffffff80;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
    border: 1.5px solid rgba(255, 255, 255, .08);
    animation: notifPop .3s cubic-bezier(.16, 1, .3, 1);
    transition: background .2s, color .2s, box-shadow .2s, border-color .2s
}

.notif-badge.has-unread {
    background: #ff2d55;
    color: #fff;
    border-color: #ff2d554d;
    box-shadow: 0 0 10px #ff2d5580
}

@keyframes notifPop {
    0% {
        transform: scale(0)
    }

    60% {
        transform: scale(1.2)
    }

    to {
        transform: scale(1)
    }
}

.notif-panel {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 380px;
    max-height: 520px;
    background: #0c0c12f7;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    box-shadow: 0 16px 64px #0009, 0 0 0 1px #ffffff05;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: notifSlide .25s cubic-bezier(.16, 1, .3, 1)
}

@keyframes notifSlide {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(.97)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.notif-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #e0e6f0
}

.notif-panel-actions {
    display: flex;
    align-items: center;
    gap: 6px
}

.notif-clear-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 8px;
    background: #ffffff08;
    color: #fff6;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit
}

.notif-clear-btn:hover {
    background: #ff44441a;
    border-color: #f443;
    color: #ff6b6b
}

.notif-close-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: #ffffff08;
    color: #ffffff59;
    cursor: pointer;
    transition: all .15s
}

.notif-close-btn:hover {
    background: #ffffff14;
    color: #fff
}

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    max-height: 440px
}

.notif-panel-body::-webkit-scrollbar {
    width: 4px
}

.notif-panel-body::-webkit-scrollbar-track {
    background: transparent
}

.notif-panel-body::-webkit-scrollbar-thumb {
    background: #ffffff14;
    border-radius: 2px
}

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 16px;
    color: #fff3;
    font-size: 12px;
    font-weight: 500
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: background .15s;
    cursor: default;
    position: relative
}

.notif-item:hover {
    background: #ffffff08
}

.notif-item.unread {
    background: #4a9eff0a
}

.notif-item.unread:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 4px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--theme-primary, #4a9eff);
    transform: translateY(-50%)
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0
}

.notif-icon.success {
    background: #4ade801f;
    color: #4ade80
}

.notif-icon.error {
    background: #f871711f;
    color: #f87171
}

.notif-icon.warning {
    background: #facc151f;
    color: #facc15
}

.notif-icon.info {
    background: #4a9eff1f;
    color: #4a9eff
}

.notif-content {
    flex: 1;
    min-width: 0
}

.notif-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px
}

.notif-text {
    font-size: 12px;
    font-weight: 600;
    color: #e0e6f0;
    line-height: 1.4;
    word-break: break-word
}

.notif-time {
    font-size: 10px;
    color: #fff3;
    margin-top: 3px;
    font-weight: 500
}

.notif-link {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--theme-primary, #4a9eff);
    text-decoration: none;
    transition: color .15s
}

.notif-link:hover {
    color: var(--theme-secondary, #6ba3ff);
    text-decoration: underline
}

@media(max-width:480px) {
    .notif-panel {
        right: 8px;
        left: 8px;
        width: auto;
        top: 56px;
        max-height: 70vh
    }
}

.main-content {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    background: #0a0a0f
}

.panel-left {
    width: 320px;
    min-width: 320px;
    background: linear-gradient(180deg, #0e0e16e6, #0a0a10f2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, .05);
    padding: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint
}

.panel-right {
    flex: 1;
    min-width: 0;
    background: #08080eb3;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    contain: layout style;
    min-height: 0
}

.config-section {
    background: #14141e80;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    contain: layout style paint;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease
}

.config-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(var(--theme-primary-rgb, 74, 158, 255), .4) 50%, transparent 90%);
    opacity: 0;
    transition: opacity .3s
}

.config-section:hover:before {
    opacity: 1
}

.config-section:hover {
    border-color: #ffffff1a;
    background: #161620b3;
    box-shadow: 0 4px 20px #0003
}

.status-context {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 10px;
    background: #00000059;
    border: 1px solid rgba(255, 255, 255, .08)
}

.status-state {
    display: flex;
    align-items: center;
    gap: 12px
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 12px #34d39999
}

.status-dot.offline {
    background: #f87171;
    box-shadow: 0 0 12px #f8717199
}

.status-state-label {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: #fff
}

.status-state-subtext {
    font-size: 12px;
    color: #fff9;
    margin: 0
}

.status-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap
}

.status-meta-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #ffffff80;
    font-weight: 600
}

.meta-value {
    font-size: 13px;
    font-weight: 600;
    color: #fff
}

.meta-value.muted {
    color: #fff9
}

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

.section-label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-size: 11px
}

.icon-btn-small {
    background: #ffffff0d;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffffb3;
    padding: 0
}

.icon-btn-small:hover {
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .1);
    border-color: var(--theme-secondary, #6ba3ff);
    color: var(--theme-secondary, #6ba3ff)
}

.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px
}

.toggle .slider,
.toggle .slider:before {
    transition: transform .2s cubic-bezier(.4, 0, .2, 1), background .2s ease, border-color .2s ease, box-shadow .2s ease
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff1a;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, .2)
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    border-radius: 50%;
    box-shadow: 0 2px 8px #0000004d
}

.toggle input:checked+.slider {
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff) 0%, var(--theme-accent, #8b7fc8) 100%);
    border-color: var(--theme-secondary, #6ba3ff);
    box-shadow: 0 0 20px rgba(var(--theme-primary-rgb, 74, 158, 255), .5)
}

.toggle input:checked+.slider:before {
    transform: translate(24px)
}

.toggle:hover .slider {
    box-shadow: 0 0 15px rgba(var(--theme-primary-rgb, 74, 158, 255), .3)
}

.toggle.small {
    width: 42px;
    height: 22px
}

.toggle.small .slider:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px
}

.toggle.small input:checked+.slider:before {
    transform: translate(20px)
}

.bin-input-container {
    margin-top: 12px
}

.input-label {
    display: block;
    font-size: 10px;
    color: #fff9;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase
}

#binInput {
    width: 100%;
    background: #0006;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-size: 13px;
    font-family: JetBrains Mono, Consolas, Monaco, Courier New, monospace;
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
    line-height: 1.6;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    transition: filter .25s cubic-bezier(.4, 0, .2, 1), -webkit-filter .25s cubic-bezier(.4, 0, .2, 1)
}

#binInput:focus,
#binInput:active {
    outline: none;
    border-color: var(--theme-secondary, #6ba3ff);
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    background: #0009;
    filter: blur(0);
    -webkit-filter: blur(0)
}

#binInput::placeholder {
    color: #ffffff4d;
    font-family: inherit
}

.advanced-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #ffffffb3;
    font-size: 12px;
    font-weight: 700;
    -webkit-user-select: none;
    user-select: none;
    padding: 8px 0;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .5px
}

.advanced-header:hover {
    color: var(--theme-secondary, #6ba3ff);
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .05);
    padding-left: 8px;
    padding-right: 8px
}

.advanced-header.active .chevron {
    transform: rotate(180deg)
}

.advanced-content {
    margin-top: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding-top: 0
}

.advanced-content.show {
    max-height: 1000px;
    opacity: 1;
    margin-top: 16px;
    padding-top: 0;
    overflow: visible
}

.form-group {
    margin-bottom: 18px
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: .3px
}

.form-group input[type=text],
.form-group textarea {
    width: 100%;
    background: #00000080;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 2px 4px #0003
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: JetBrains Mono, Consolas, Monaco, Courier New, monospace;
    line-height: 1.6
}

.form-group input[type=text]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--theme-secondary, #6ba3ff);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 74, 158, 255), .15), 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    background: #000000b3;
    transform: translateY(-1px)
}

.form-group input[type=text]::placeholder {
    color: #ffffff4d
}

.form-group .toggle {
    margin-top: 4px
}

.stats-inline {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.stat-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0000004d;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    padding: 12px 14px
}

.stat-badge:hover {
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .3);
    background: #0006;
    box-shadow: 0 0 15px rgba(var(--theme-primary-rgb, 74, 158, 255), .1)
}

.stat-badge-label {
    font-size: 12px;
    color: #ffffffb3;
    font-weight: 600;
    letter-spacing: .3px
}

.stat-badge-value {
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff) 0%, var(--theme-accent, #8b7fc8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: .5px
}

.notification {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 16px #0000004d, 0 2px 8px #0003;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .1);
    opacity: 0
}

.notification.show {
    opacity: 1
}

.notification-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    border-radius: 50%;
    background: #fff3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0
}

.notification-text {
    letter-spacing: .2px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%
}

.notification.notification-success {
    background: #10b981f2
}

.notification.notification-error {
    background: #ef4444f2
}

.notification.notification-info {
    background: #3b82f6f2
}

.live-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    padding: 6px 20px 4px;
    background: linear-gradient(180deg, #0e0e16b3, #0a0a1080);
    border-bottom: 1px solid rgba(255, 255, 255, .05)
}

.live-stat-card {
    position: relative;
    padding: 8px 10px;
    border-radius: 12px;
    background: #14141e99;
    border: 1px solid rgba(255, 255, 255, .06);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease
}

.live-stat-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 12px 12px 0 0;
    opacity: .6
}

.live-stat-card.success-rate:before {
    background: linear-gradient(90deg, transparent, #34d399, transparent)
}

.live-stat-card.cards-count:before {
    background: linear-gradient(90deg, transparent, var(--theme-primary, #4a9eff), transparent)
}

.live-stat-card.top-gateway:before {
    background: linear-gradient(90deg, transparent, #fbbf24, transparent)
}

.live-stat-card:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .4), rgba(var(--theme-accent-rgb, 139, 127, 200), .3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .2s ease
}

.live-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px #0000004d;
    border-color: #ffffff1a
}

.live-stat-card:hover:after {
    opacity: 1
}

.live-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #ffffff73;
    font-weight: 600;
    margin-bottom: 2px
}

.live-stat-value {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: #fff;
    letter-spacing: -.5px
}

.live-stat-card.success-rate .live-stat-value {
    background: linear-gradient(135deg, #34d399, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.live-stat-card.cards-count .live-stat-value {
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff), var(--theme-accent, #8b7fc8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.live-stat-card.top-gateway .live-stat-value {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.live-stat-subtext {
    margin-top: 2px;
    font-size: 9px;
    color: #fff6;
    font-weight: 500
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    background: linear-gradient(180deg, #0e0e16e6, #0c0c14cc);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    position: relative;
    min-width: 0
}

.logs-title {
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff) 0%, var(--theme-accent, #8b7fc8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
    text-transform: uppercase
}

.logs-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    border: 1px solid transparent;
    line-height: 1
}

.risk-badge-icon {
    font-size: 11px;
    line-height: 1
}

.risk-badge.risk-low {
    color: #34d399;
    background: #34d3991f;
    border-color: #34d39959
}

.risk-badge.risk-medium {
    color: #fbbf24;
    background: #fbbf241f;
    border-color: #fbbf2459
}

.risk-badge.risk-high {
    color: #f87171;
    background: #f871711f;
    border-color: #f8717159
}

.risk-value-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    line-height: 1;
    color: #ffffffc7;
    background: #ffffff0f;
    border: 1px solid rgba(255, 255, 255, .12)
}

.risk-reload-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: #ffffff0a;
    color: #ffffffb8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all .2s ease
}

.risk-reload-btn:hover {
    color: #fffffff2;
    border-color: #4a9eff73;
    background: #4a9eff24
}

.risk-reload-btn:focus-visible {
    outline: 2px solid rgba(74, 158, 255, .7);
    outline-offset: 2px
}

.risk-meta-text {
    font-size: 10px;
    font-weight: 600;
    color: #ffffff85;
    letter-spacing: .3px
}

.logs-actions {
    display: flex;
    gap: 8px
}

.log-icon-btn {
    width: 36px;
    height: 36px;
    background: #ffffff0a;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff80;
    padding: 0;
    position: relative;
    transition: all .2s
}

.log-icon-btn:after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    bottom: -1px;
    left: -1px;
    border-radius: 6px;
    padding: 1px;
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff), var(--theme-accent, #8b7fc8));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0
}

.log-icon-btn:hover:after {
    opacity: 1
}

.log-icon-btn:hover {
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    border-color: var(--theme-secondary, #6ba3ff);
    color: #fff
}

.log-icon-btn svg {
    position: relative;
    z-index: 1
}

#exportLogsBtn {
    background: #10b9811a;
    border-color: #10b9814d;
    color: #10b981
}

#exportLogsBtn:hover {
    background: #10b98133;
    border-color: #10b981;
    box-shadow: 0 4px 12px #10b9814d
}

#copyLogsBtn {
    background: #3b82f61a;
    border-color: #3b82f64d;
    color: #3b82f6
}

#copyLogsBtn:hover {
    background: #3b82f633;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px #3b82f64d
}

#clearLogsBtn {
    background: #ef44441a;
    border-color: #ef44444d;
    color: #ef4444
}

#clearLogsBtn:hover {
    background: #ef444433;
    border-color: #ef4444;
    box-shadow: 0 4px 12px #ef44444d
}

.logs-stats-bar {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: #0a0a1080;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 55px;
    padding: 8px 14px;
    background: #14141e66;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 8px;
    transition: all .2s
}

.stat-item:hover {
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    background: #14141e99;
    transform: translateY(-1px)
}

.stat-label {
    font-size: 9px;
    color: #fff6;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px
}

.stat-value {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    line-height: 1
}

.stat-value.stat-cards {
    background: linear-gradient(135deg, var(--theme-accent, #8b7fc8) 0%, var(--theme-accent, #7a6bb8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.stat-value.stat-3ds {
    color: #00b8e6
}

.stat-value.stat-success {
    color: #0f8
}

.stat-value.stat-error {
    color: #f36
}

.logs-filter-bar {
    padding: 12px 20px;
    background: #0c0c1280;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    display: flex;
    flex-direction: column;
    gap: 10px
}

.search-container {
    position: relative;
    display: flex;
    align-items: center
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #ffffff80;
    pointer-events: none;
    z-index: 1
}

.search-input {
    width: 100%;
    padding: 10px 36px;
    background: #0000004d;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    transition: all .2s
}

.search-input:focus {
    outline: none;
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .4);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 74, 158, 255), .1);
    background: #00000080
}

.search-input::placeholder {
    color: #fff6
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #ffffff1a;
    border: none;
    border-radius: 4px;
    color: #ffffffb3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1
}

.clear-search-btn:hover {
    background: #ff33664d;
    color: #f36
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.filter-btn {
    padding: 6px 14px;
    background: #ffffff08;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    color: #ffffff80;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: inherit;
    transition: all .2s
}

.filter-btn:hover {
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .08);
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .25);
    color: var(--theme-secondary, #6ba3ff)
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .2), rgba(var(--theme-accent-rgb, 139, 127, 200), .15));
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .5);
    color: #fff;
    box-shadow: 0 0 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .2)
}

.logs-container {
    flex: 1;
    padding: 8px 10px 12px;
    overflow: hidden;
    display: flex;
    min-height: 0
}

.logs-content {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    background: #0003;
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 12px;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: JetBrains Mono, Consolas, Monaco, Courier New, monospace;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
    content-visibility: auto
}

.log-entry-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff6;
    text-align: center;
    gap: 12px
}

.log-entry-placeholder p {
    font-size: 14px;
    font-weight: 600;
    margin: 0
}

.log-entry-placeholder .placeholder-subtitle {
    font-size: 12px;
    color: #ffffff4d;
    font-weight: 400
}

.log-entry {
    padding: 14px 18px;
    margin-bottom: 6px;
    border-radius: 10px;
    border-left: 4px solid transparent;
    background: #ffffff06;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
    contain: layout style paint;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: background .15s
}

.log-main-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.log-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .08);
    border: 1px solid rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    border-radius: 8px;
    font-size: 13px;
    font-family: JetBrains Mono, Consolas, Monaco, monospace
}

.log-card-info svg {
    color: var(--theme-secondary, #6ba3ff);
    flex-shrink: 0
}

.card-number {
    color: var(--theme-secondary, #6ba3ff);
    font-weight: 600;
    letter-spacing: .5px;
    font-size: 13px
}

.card-details {
    color: #ffffffb3;
    font-size: 12px
}

.copy-card-btn {
    margin-left: auto;
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .1);
    border: 1px solid rgba(var(--theme-primary-rgb, 74, 158, 255), .3);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--theme-secondary, #6ba3ff);
    padding: 0;
    flex-shrink: 0
}

.copy-card-btn:hover {
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    border-color: var(--theme-secondary, #6ba3ff)
}

.copy-card-btn:active {
    opacity: .8
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: #0a0a0f
}

#disclaimerOverlay.settings-overlay {
    background: #0a0a0f80;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh
}

@media(max-width:768px) {
    #disclaimerOverlay.settings-overlay {
        padding: 16px
    }
}

@media(max-width:480px) {
    #disclaimerOverlay.settings-overlay {
        padding: 12px
    }
}

@media(max-width:360px) {
    #disclaimerOverlay.settings-overlay {
        padding: 10px
    }
}

.settings-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block
}

#disclaimerFrame.settings-iframe {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    display: block
}

.log-entry[data-type=error],
.log-entry.log-type-error {
    opacity: 1 !important
}

.log-entry:hover {
    background: #ffffff0d
}

.log-entry.log-type-info {
    border-left-color: var(--theme-secondary, #6ba3ff);
    color: #ffffffe6
}

.log-entry.log-type-success {
    border-left-color: #0f8;
    background: #00ff880d;
    color: #fffffff2
}

.log-entry.log-type-error {
    border-left-color: #f36;
    background: #ff33660d;
    color: #fffffff2
}

.log-entry.log-type-warn {
    border-left-color: #fa0;
    background: #ffaa000d;
    color: #fffffff2
}

.log-entry.log-type-card {
    border-left-color: #9b8dd4;
    background: #8b7fc80d
}

@media(max-width:1024px)and (min-width:769px) {
    .main-content {
        flex-direction: row
    }

    .panel-left {
        width: 320px;
        min-width: 320px;
        max-height: none
    }
}

.panel-toggle-btn {
    display: none
}

@media(max-width:768px) {
    .panel-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 8px 0;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, .06);
        border-bottom: 1px solid rgba(255, 255, 255, .06);
        background: linear-gradient(180deg, #14141ef2, #0e0e16f2);
        color: #fff9;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .5px;
        text-transform: uppercase;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: background .2s, color .2s;
        flex-shrink: 0;
        z-index: 5
    }

    .panel-toggle-btn:active {
        background: #4a9eff1a;
        color: var(--theme-primary, #4a9eff)
    }

    .panel-toggle-icon {
        flex-shrink: 0;
        opacity: .7
    }

    .panel-left.panel-collapsed {
        max-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-bottom: none !important;
        overflow: hidden;
        transition: max-height .3s ease, padding .3s ease
    }

    .panel-left {
        transition: max-height .3s ease, padding .3s ease
    }
}

@media(max-width:768px) {
    .main-content {
        flex-direction: column
    }

    .panel-left {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        max-height: 42vh;
        max-height: 42dvh;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px)
    }

    .panel-right {
        width: 100%;
        flex: 1;
        min-height: 58vh;
        min-height: 58dvh;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px)
    }

    .app-header {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px)
    }
}

@media(max-width:768px) {
    .app-header {
        padding: 12px 16px;
        min-height: 56px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px)
    }

    .header-left {
        gap: 10px;
        flex: 1;
        min-width: 0
    }

    .logo {
        width: 36px;
        height: 36px;
        flex-shrink: 0
    }

    .header-info {
        min-width: 0;
        flex: 1
    }

    .header-info h1 {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .header-info .version {
        font-size: 10px
    }

    .header-actions {
        flex-shrink: 0;
        gap: 6px
    }

    .action-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        touch-action: manipulation
    }

    .panel-left {
        padding: 14px;
        gap: 10px;
        max-height: 42vh;
        max-height: 42dvh
    }

    .config-section {
        padding: 14px
    }

    .section-label {
        font-size: 10px
    }

    #binInput {
        font-size: 16px;
        min-height: 90px
    }

    .logs-header {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px)
    }

    .logs-title {
        font-size: 15px
    }

    .logs-title-group {
        width: 100%;
        justify-content: space-between
    }

    .logs-actions {
        gap: 6px
    }

    .log-icon-btn {
        width: 32px;
        height: 32px
    }

    .logs-stats-bar {
        padding: 8px 14px;
        gap: 6px;
        overflow-x: auto
    }

    .live-stats-grid {
        padding: 8px 14px 0;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px
    }

    .live-stat-card {
        padding: 10px
    }

    .live-stat-value {
        font-size: 20px
    }

    .live-stat-label {
        font-size: 9px
    }

    .live-stat-sub {
        font-size: 10px
    }

    .status-meta {
        flex-direction: column
    }

    .stat-item {
        min-width: 50px;
        padding: 6px 10px
    }

    .stat-label {
        font-size: 9px
    }

    .stat-value {
        font-size: 16px
    }

    .logs-filter-bar {
        padding: 8px 14px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px)
    }

    .search-container {
        width: 100%;
        order: 2
    }

    .filter-buttons {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
        order: 1;
        gap: 5px;
        -webkit-overflow-scrolling: touch
    }

    .filter-btn {
        font-size: 12px;
        padding: 7px 14px;
        white-space: nowrap;
        flex-shrink: 0
    }

    .logs-container {
        padding: 10px;
        min-height: 0;
        flex: 1
    }

    .logs-content {
        padding: 10px;
        border-radius: 8px;
        min-height: 250px
    }

    .log-entry {
        padding: 10px 12px;
        font-size: 13px;
        line-height: 1.55;
        margin-bottom: 5px;
        border-radius: 8px
    }

    .log-card-info {
        padding: 8px 10px;
        font-size: 11px;
        margin-top: 6px
    }

    .copy-card-btn {
        width: 20px;
        height: 20px
    }

    .notification {
        top: 12px;
        right: 12px;
        padding: 10px 14px;
        font-size: 12px
    }
}

@media(max-width:480px) {
    .app-header {
        padding: 10px 12px;
        flex-wrap: nowrap;
        gap: 6px
    }

    .header-left {
        flex: 1;
        min-width: 0;
        overflow: hidden
    }

    .header-info h1 {
        font-size: 14px
    }

    .header-actions {
        gap: 4px;
        flex-shrink: 0
    }

    .action-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        touch-action: manipulation
    }

    .panel-left {
        padding: 10px;
        gap: 8px;
        max-height: 38vh;
        max-height: 38dvh
    }

    .panel-right {
        min-height: 62vh;
        min-height: 62dvh
    }

    .config-section {
        padding: 10px
    }

    .bin-input-container textarea {
        font-size: 16px;
        padding: 10px;
        min-height: 80px
    }

    .toggle {
        min-width: 50px;
        min-height: 28px
    }

    .icon-btn-small {
        min-width: 32px;
        min-height: 32px
    }

    .log-icon-btn {
        min-width: 34px;
        min-height: 34px;
        touch-action: manipulation
    }

    .logs-header {
        padding: 8px 10px
    }

    .logs-stats-bar {
        padding: 6px 10px;
        gap: 6px
    }

    .stat-item {
        min-width: 45px;
        padding: 5px 8px
    }

    .stat-value {
        font-size: 14px
    }

    .logs-filter-bar {
        padding: 6px 10px
    }

    .filter-btn {
        font-size: 11px;
        padding: 6px 12px;
        min-height: 32px;
        touch-action: manipulation;
        flex-shrink: 0
    }

    .logs-container {
        padding: 8px;
        flex: 1
    }

    .logs-content {
        padding: 8px;
        min-height: 200px;
        border-radius: 8px
    }

    .log-entry {
        padding: 10px;
        font-size: 12px;
        line-height: 1.5;
        border-radius: 6px;
        margin-bottom: 4px
    }

    .log-card-info {
        font-size: 10px;
        padding: 6px 8px;
        flex-wrap: wrap;
        word-break: break-all
    }

    .log-entry-placeholder {
        padding: 20px 12px
    }

    .log-entry-placeholder p {
        font-size: 12px
    }

    .log-entry-placeholder .placeholder-subtitle {
        font-size: 11px
    }
}

@media(max-width:360px) {
    .header-info h1 {
        font-size: 13px
    }

    .panel-left {
        padding: 8px;
        max-height: 35vh;
        max-height: 35dvh
    }

    .panel-right {
        min-height: 65vh;
        min-height: 65dvh
    }

    .logs-content {
        padding: 6px
    }

    .log-entry {
        font-size: 11px;
        padding: 8px;
        line-height: 1.45
    }

    .live-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important
    }

    .live-stat-card {
        padding: 6px !important
    }

    .live-stat-value {
        font-size: 16px !important
    }
}

@media(max-width:1024px) {
    .panel-right {
        min-height: 50vh
    }

    .logs-container {
        min-height: 200px
    }

    .logs-content {
        min-height: 150px;
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        overflow-x: hidden;
        will-change: scroll-position;
        transform: translateZ(0);
        -webkit-transform: translateZ(0)
    }
}

@media(max-height:700px)and (max-width:768px) {
    .panel-left {
        max-height: 35vh;
        max-height: 35dvh
    }

    .panel-right {
        min-height: 65vh;
        min-height: 65dvh
    }

    .logs-container {
        min-height: 200px
    }
}

@media(max-width:768px)and (orientation:landscape) {
    .panel-left {
        max-height: 40vh;
        max-height: 40dvh
    }

    .panel-right {
        min-height: 60vh;
        min-height: 60dvh
    }

    .app-header {
        padding: 8px 16px;
        min-height: 48px
    }

    .header-info h1 {
        font-size: 14px
    }

    .action-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px
    }
}

.log-timestamp {
    color: #ffffff80;
    font-size: 11px;
    margin-right: 8px;
    font-weight: 500
}

.log-icon {
    margin-right: 6px;
    font-size: 14px
}

.log-message {
    color: inherit
}

.copy-log-btn {
    margin-left: auto;
    background: #ffffff0d;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff80;
    padding: 0;
    flex-shrink: 0;
    opacity: 0
}

.log-entry:hover .copy-log-btn {
    opacity: 1
}

.copy-log-btn:hover {
    background: #ffffff1a;
    border-color: #ffffff4d;
    color: #fffc
}

.copy-log-btn:active {
    opacity: .8
}

.copy-log-btn svg {
    width: 14px;
    height: 14px;
    pointer-events: none
}

.log-entry.hidden {
    display: none
}

.log-entry.highlight {
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .15) !important;
    border-left-color: var(--theme-secondary, #6ba3ff) !important
}

#logsOutput {
    display: none
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

::-webkit-scrollbar-track {
    background: #0000004d;
    border-radius: 4px
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .3), rgba(var(--theme-accent-rgb, 139, 127, 200), .3));
    border-radius: 4px
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .5), rgba(var(--theme-accent-rgb, 139, 127, 200), .5))
}

@media(max-width:768px)and (hover:none) {

    .action-icon:hover,
    .log-icon-btn:hover,
    .filter-btn:hover,
    .config-section:hover,
    .stat-item:hover {
        transform: none !important;
        box-shadow: none !important
    }
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000c;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.modal-content {
    background: #0f0f14f2;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    box-shadow: 0 20px 60px #00000080;
    max-width: 600px;
    width: 100%;
    min-width: 0;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.library-modal {
    max-width: 700px
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .1), rgba(var(--theme-accent-rgb, 139, 127, 200), .05));
    position: relative
}

.modal-header:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--theme-primary-rgb, 74, 158, 255), .5), transparent)
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: linear-gradient(135deg, var(--theme-secondary, #6ba3ff) 0%, #ffffff 50%, var(--theme-accent, #9b8dd4) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative
}

.modal-header h2:before {
    content: "📚";
    font-size: 24px;
    filter: grayscale(.2) brightness(1.1);
    opacity: .9;
    display: inline-block;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background: none !important;
    line-height: 1
}

.modal-close {
    background: transparent;
    border: none;
    color: #fff9;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all .2s ease;
    line-height: 1
}

.modal-close:hover {
    background: #ffffff1a;
    color: #fff
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 163, 255, .3) transparent
}

.modal-body::-webkit-scrollbar {
    width: 6px
}

.modal-body::-webkit-scrollbar-track {
    background: transparent
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #9ca3af80;
    border-radius: 3px
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #6ba3ffb3
}

.library-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: #0003;
    border-radius: 8px 8px 0 0;
    padding: 4px 4px 0
}

.tab-btn {
    background: transparent;
    border: none;
    color: #fff9;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    margin-bottom: -1px;
    border-radius: 6px 6px 0 0;
    position: relative;
    letter-spacing: .3px
}

.tab-btn:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary, #4a9eff), var(--theme-accent, #8b7fc8));
    border-radius: 3px 3px 0 0;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1)
}

.tab-btn:hover {
    color: #fffffff2;
    background: #ffffff0d
}

.tab-btn.active {
    color: var(--theme-secondary, #6ba3ff);
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .1)
}

.tab-btn.active:before {
    transform: translate(-50%) scaleX(1)
}

.tab-content {
    display: none
}

.tab-content.active {
    display: block
}

.library-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.library-item {
    background: #0006;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px #0000004d
}

.library-item:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--theme-primary, #4a9eff), var(--theme-accent, #8b7fc8));
    transform: scaleY(0);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1)
}

.library-item:hover {
    background: #0009;
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .4);
    box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    transform: translate(4px)
}

.library-item:hover:before {
    transform: scaleY(1)
}

.library-item.readonly {
    opacity: .7
}

.library-info {
    flex: 1
}

.library-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: .2px
}

.library-name:before {
    content: "📖";
    font-size: 18px;
    opacity: .8;
    filter: grayscale(.3)
}

.library-meta {
    font-size: 13px;
    color: #fff9;
    display: flex;
    gap: 20px;
    align-items: center
}

.library-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .2);
    color: var(--theme-secondary, #6ba3ff);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px
}

.library-credits {
    display: inline-block;
    font-size: 9px;
    color: #ffffff59;
    font-weight: 400;
    margin-left: 8px;
    letter-spacing: .3px;
    font-style: italic
}

.library-actions {
    display: flex;
    gap: 8px
}

.library-btn {
    background: #ffffff14;
    border: 1px solid rgba(255, 255, 255, .15);
    color: #fffc;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    letter-spacing: .3px;
    position: relative;
    overflow: hidden
}

.library-btn:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #ffffff1a;
    transform: translate(-50%, -50%);
    transition: width .4s, height .4s
}

.library-btn:hover:before {
    width: 200px;
    height: 200px
}

.library-btn:hover {
    background: #ffffff1f;
    border-color: #ffffff40;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px #0003
}

.library-btn.primary {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .25), rgba(var(--theme-accent-rgb, 139, 127, 200), .2));
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .5);
    color: var(--theme-secondary, #6ba3ff)
}

.library-btn.primary:hover {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .35), rgba(var(--theme-accent-rgb, 139, 127, 200), .3));
    border-color: var(--theme-secondary, #6ba3ff);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .3)
}

.library-btn.danger {
    background: #ef444426;
    border-color: #ef444466;
    color: #ef4444
}

.library-btn.danger:hover {
    background: #ef444440;
    border-color: #ef444499;
    box-shadow: 0 4px 12px #ef44444d
}

.library-btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff) 0%, var(--theme-accent, #8b7fc8) 100%);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    width: 100%
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb, 74, 158, 255), .4);
    transform: translateY(-1px)
}

.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none
}

.btn-secondary {
    background: #ffffff14;
    border: 1px solid rgba(255, 255, 255, .2);
    color: #ffffffe6;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    letter-spacing: .3px
}

.btn-secondary:hover {
    background: #ffffff26;
    border-color: #ffffff4d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px #0003
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1
}

.help-text {
    font-size: 12px;
    color: #ffffff80;
    margin-top: 8px
}

.form-group input[type=file] {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer
}

.form-group input[type=file]::-webkit-file-upload-button {
    visibility: hidden;
    width: 0;
    height: 0
}

.form-group input[type=file]:before {
    content: "Choose File";
    display: inline-block;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .2), rgba(var(--theme-accent-rgb, 139, 127, 200), .15));
    border: 1px solid rgba(var(--theme-primary-rgb, 74, 158, 255), .4);
    border-radius: 8px;
    padding: 12px 24px;
    color: var(--theme-secondary, #6ba3ff);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    margin-right: 12px;
    letter-spacing: .3px
}

.form-group input[type=file]:hover:before {
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .3), rgba(var(--theme-accent-rgb, 139, 127, 200), .25));
    border-color: var(--theme-secondary, #6ba3ff);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .3);
    transform: translateY(-1px)
}

.form-group input[type=file]:active:before {
    transform: translateY(0)
}

.form-group input[type=file]:focus {
    outline: none
}

.form-group input[type=file]:focus:before {
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 74, 158, 255), .15), 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .3)
}

.file-input-wrapper {
    position: relative;
    width: 100%
}

.file-input-wrapper input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2
}

.file-input-label {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    background: #00000080;
    border: 2px dashed rgba(255, 255, 255, .2);
    border-radius: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    position: relative;
    gap: 12px
}

.file-input-label:hover {
    background: #000000b3;
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .5);
    border-style: solid;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .2)
}

.file-input-label.has-file {
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .5);
    border-style: solid;
    background: rgba(var(--theme-primary-rgb, 74, 158, 255), .1)
}

.file-input-button {
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff) 0%, var(--theme-accent, #8b7fc8) 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    letter-spacing: .3px;
    box-shadow: 0 2px 8px rgba(var(--theme-primary-rgb, 74, 158, 255), .3);
    white-space: nowrap;
    flex-shrink: 0
}

.file-input-label:hover .file-input-button {
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .4);
    transform: translateY(-1px)
}

.file-input-text {
    color: #fff9;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500
}

.file-input-text.has-file {
    color: var(--theme-secondary, #6ba3ff);
    font-weight: 600
}

.file-input-wrapper input[type=file]:focus+.file-input-label {
    outline: none;
    border-color: var(--theme-secondary, #6ba3ff);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 74, 158, 255), .15), 0 4px 12px rgba(var(--theme-primary-rgb, 74, 158, 255), .2)
}

#importLibraryFile {
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer
}

#importLibraryFile::-webkit-file-upload-button {
    visibility: hidden;
    width: 0;
    height: 0
}

#importLibraryFile:focus {
    outline: none
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #ffffff80
}

.empty-state svg {
    width: 64px;
    height: 64px;
    opacity: .3;
    margin-bottom: 16px
}

.empty-state p {
    font-size: 14px;
    margin: 8px 0
}

.gateways-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000080;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px
}

.gateways-popup-content {
    background: #0f0f14f2;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    box-shadow: 0 20px 60px #00000080;
    max-width: 400px;
    width: 100%;
    min-width: 0;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popupSlideIn .2s ease-out
}

@keyframes popupSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(.95)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

.gateways-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.gateways-popup-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .5px
}

.gateways-popup-close {
    background: transparent;
    border: none;
    color: #fff9;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all .2s ease;
    line-height: 1
}

.gateways-popup-close:hover {
    background: #ffffff1a;
    color: #fff
}

.gateways-popup-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 163, 255, .3) transparent;
    -webkit-overflow-scrolling: touch
}

.gateways-popup-body::-webkit-scrollbar {
    width: 6px
}

.gateways-popup-body::-webkit-scrollbar-track {
    background: transparent
}

.gateways-popup-body::-webkit-scrollbar-thumb {
    background-color: #9ca3af80;
    border-radius: 3px
}

.gateways-popup-body::-webkit-scrollbar-thumb:hover {
    background-color: #6ba3ffb3
}

.gateway-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #0000004d;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all .2s ease
}

.gateway-item:last-child {
    margin-bottom: 0
}

.gateway-item:hover {
    background: #00000080;
    border-color: #fff3;
    transform: translate(4px)
}

.gateway-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.gateway-icon.stripe {
    background: linear-gradient(135deg, #646cff33, #646cff1a);
    border: 1px solid rgba(100, 108, 255, .4);
    color: #636cff
}

.gateway-icon.gog {
    background: linear-gradient(135deg, #ff6b6b33, #ff6b6b1a);
    border: 1px solid rgba(255, 107, 107, .4);
    color: #ff6b6b
}

.gateway-icon.paddle {
    background: linear-gradient(135deg, #61dafb33, #61dafb1a);
    border: 1px solid rgba(97, 218, 251, .4);
    color: #61dafb
}

.gateway-icon.edfapay {
    background: linear-gradient(135deg, #22c55e33, #22c55e1a);
    border: 1px solid rgba(34, 197, 94, .4);
    color: #22c55e
}

.gateway-info {
    flex: 1
}

.gateway-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 8px
}

.gateway-details {
    font-size: 13px;
    color: #fff9;
    font-weight: 500
}

.gateway-coming-soon {
    font-size: 9px;
    font-weight: 700;
    color: #6ba3ffcc;
    background: #6ba3ff26;
    border: 1px solid rgba(107, 163, 255, .3);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap
}

.license-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000b3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn .2s ease
}

.license-popup-content {
    background: linear-gradient(145deg, #12121cfa, #0a0a12fa);
    border: 1px solid rgba(var(--theme-primary-rgb, 74, 158, 255), .25);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 80px #0009, 0 0 40px rgba(var(--theme-primary-rgb, 74, 158, 255), .08);
    overflow: hidden
}

.license-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.license-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--theme-primary-rgb, 74, 158, 255), .2), rgba(var(--theme-primary-rgb, 74, 158, 255), .05));
    border: 1px solid rgba(var(--theme-primary-rgb, 74, 158, 255), .3);
    border-radius: 10px;
    color: var(--theme-primary, #4a9eff)
}

.license-popup-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1
}

.license-popup-close {
    background: transparent;
    border: none;
    color: #fff9;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all .2s;
    line-height: 1
}

.license-popup-close:hover {
    background: #ffffff1a;
    color: #fff
}

.license-popup-body {
    padding: 24px
}

.license-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #0000004d;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all .3s
}

.license-status-card.active {
    border-color: #34d3994d;
    background: #34d39914
}

.license-status-card.expired {
    border-color: #ef44444d;
    background: #ef444414
}

.license-status-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffffff0d;
    color: #ffffff80;
    flex-shrink: 0
}

.license-status-card.active .license-status-icon {
    background: #34d39926;
    color: #34d399
}

.license-status-card.expired .license-status-icon {
    background: #ef444426;
    color: #ef4444
}

.license-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.license-status-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff
}

.license-status-detail {
    font-size: 12px;
    color: #ffffff80
}

.license-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.license-input-label {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff80;
    text-transform: uppercase;
    letter-spacing: .5px
}

.license-input-wrapper {
    display: flex;
    gap: 8px
}

.license-input {
    flex: 1;
    background: #0006;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: SF Mono, Fira Code, Cascadia Code, monospace;
    color: #fff;
    letter-spacing: 1px;
    outline: none;
    transition: all .2s;
    text-transform: uppercase
}

.license-input::placeholder {
    color: #ffffff40;
    text-transform: uppercase
}

.license-input:focus {
    border-color: rgba(var(--theme-primary-rgb, 74, 158, 255), .5);
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb, 74, 158, 255), .1)
}

.license-validate-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--theme-primary, #4a9eff), var(--theme-accent, #8b7fc8));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap
}

.license-validate-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--theme-primary-rgb, 74, 158, 255), .4)
}

.license-validate-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none
}

.license-btn-spinner svg {
    animation: spin 1s linear infinite
}

@keyframes spin {
    0% {
        transform: rotate(0)
    }

    to {
        transform: rotate(360deg)
    }
}

.license-message {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 4px
}

.license-message.success {
    color: #34d399;
    background: #34d3991a;
    border: 1px solid rgba(52, 211, 153, .2)
}

.license-message.error {
    color: #ef4444;
    background: #ef44441a;
    border: 1px solid rgba(239, 68, 68, .2)
}

.license-saved-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow: auto;
    padding-right: 4px
}

.license-saved-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    background: #00000040
}

.license-saved-item.active {
    border-color: #34d39959;
    background: #34d39914
}

.license-saved-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0
}

.license-saved-key {
    font-family: SF Mono, Fira Code, Cascadia Code, monospace;
    font-size: 12px;
    color: #d7e5ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.license-saved-meta {
    font-size: 11px;
    color: #fff9
}

.license-saved-actions {
    display: flex;
    gap: 6px
}

.license-mini-btn {
    border: 1px solid rgba(255, 255, 255, .16);
    background: #ffffff0a;
    color: #fff;
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 11px;
    cursor: pointer
}

.license-mini-btn:hover {
    background: #ffffff1f
}

.license-mini-btn.remove {
    border-color: #ef444466;
    color: #ef4444
}

.license-saved-empty {
    font-size: 12px;
    color: #ffffff80;
    padding: 6px 2px
}

.license-deactivate-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    justify-content: center
}

.license-deactivate-btn {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, .3);
    color: #ef4444cc;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s
}

.license-deactivate-btn:hover {
    background: #ef44441a;
    border-color: #ef444480;
    color: #ef4444
}

.app-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-bottom: 16px
}

.telegram-footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    height: auto;
    min-width: 100px;
    border-radius: 8px;
    transition: all .4s cubic-bezier(.4, 0, .2, 1);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px #0003;
    border: none;
    position: relative;
    overflow: hidden;
    animation: slideInUp .6s ease-out;
    animation-fill-mode: both
}

.telegram-footer-link:nth-child(1) {
    animation-delay: .1s
}

.telegram-footer-link:nth-child(2) {
    animation-delay: .2s
}

.telegram-footer-link:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
    transition: left .5s
}

.telegram-footer-link:hover:before {
    left: 100%
}

.telegram-footer-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform .3s ease
}

.telegram-footer-link:hover svg {
    transform: rotate(-15deg) scale(1.1);
    animation: pulse .6s ease-in-out
}

.telegram-footer-link span {
    white-space: nowrap;
    transition: transform .3s ease
}

.telegram-footer-link:hover span {
    transform: translate(2px)
}

.telegram-footer-link-red {
    background: #ef4444;
    color: #fff
}

.telegram-footer-link-red:hover {
    background: #dc2626;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px #ef444480
}

.telegram-footer-link-red:active {
    transform: translateY(-1px) scale(1.02)
}

.telegram-footer-link-yellow {
    background: #eab308;
    color: #fff
}

.telegram-footer-link-yellow:hover {
    background: #ca8a04;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px #eab30880
}

.telegram-footer-link-yellow:active {
    transform: translateY(-1px) scale(1.02)
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes pulse {

    0%,
    to {
        transform: rotate(-15deg) scale(1.1)
    }

    50% {
        transform: rotate(-15deg) scale(1.2)
    }
}

@media(max-width:480px) {
    .license-popup {
        padding: 10px
    }

    .license-popup-content {
        border-radius: 12px;
        max-width: 100%
    }

    .license-popup-header {
        padding: 16px
    }

    .license-popup-header h3 {
        font-size: 16px
    }

    .license-popup-body {
        padding: 16px
    }

    .license-status-card {
        padding: 12px;
        gap: 10px
    }

    .license-status-icon {
        width: 36px;
        height: 36px
    }

    .license-status-label {
        font-size: 13px
    }

    .license-status-detail {
        font-size: 11px
    }

    .license-input-wrapper {
        flex-direction: column
    }

    .license-input {
        font-size: 14px;
        padding: 12px;
        text-align: center
    }

    .license-validate-btn {
        width: 100%;
        justify-content: center;
        padding: 14px
    }

    .license-deactivate-btn {
        width: 100%;
        padding: 12px
    }
}

@media(max-width:480px) {
    .header-actions {
        gap: 2px !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none
    }

    .header-actions::-webkit-scrollbar {
        display: none
    }

    .action-icon {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        padding: 0;
        flex-shrink: 0
    }

    .action-icon svg {
        width: 16px;
        height: 16px
    }

    .logo {
        width: 32px !important;
        height: 32px !important
    }

    .logo img {
        width: 100%;
        height: 100%
    }
}

@media(max-width:360px) {
    .header-info h1 {
        font-size: 13px !important
    }

    .header-info .version {
        font-size: 9px !important
    }

    .header-actions {
        gap: 1px !important
    }

    .action-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important
    }

    .action-icon svg {
        width: 14px;
        height: 14px
    }
}

@media(max-width:480px) {
    .panel-left {
        padding: 10px !important;
        gap: 8px !important;
        max-height: 38vh;
        max-height: 38dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch
    }

    .status-section {
        padding: 10px !important;
        gap: 8px !important
    }

    .status-section .toggle {
        transform: scale(.85)
    }

    .status-indicator .status-label {
        font-size: 13px
    }

    .status-indicator .status-sublabel {
        font-size: 10px
    }

    .status-meta {
        gap: 6px
    }

    .config-section {
        padding: 10px !important;
        gap: 6px !important
    }

    .section-label {
        font-size: 9px !important
    }

    .bin-input-container textarea {
        font-size: 16px !important;
        min-height: 70px !important;
        padding: 8px !important
    }

    .bin-actions {
        gap: 4px
    }

    .icon-btn-small {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important
    }

    .advanced-toggle {
        padding: 8px 10px;
        font-size: 12px
    }
}

@media(max-width:480px) {
    .live-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
        padding: 8px 10px 0 !important
    }

    .live-stat-card {
        padding: 8px !important
    }

    .live-stat-value {
        font-size: 18px !important
    }

    .live-stat-label {
        font-size: 8px !important
    }

    .live-stat-sub {
        font-size: 9px !important
    }

    .logs-stats-bar {
        padding: 6px 10px !important;
        gap: 4px !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch
    }

    .stat-item {
        min-width: 40px !important;
        padding: 4px 6px !important;
        flex-shrink: 0
    }

    .stat-label {
        font-size: 8px !important
    }

    .stat-value {
        font-size: 12px !important
    }
}

@media(max-width:480px) {
    .logs-filter-bar {
        padding: 6px 10px !important;
        gap: 6px !important
    }

    .search-container {
        order: 2
    }

    .search-input {
        font-size: 13px;
        padding: 8px 10px 8px 34px
    }

    .filter-buttons {
        order: 1;
        gap: 4px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px
    }

    .filter-btn {
        font-size: 10px !important;
        padding: 5px 10px !important;
        min-height: 30px !important;
        flex-shrink: 0;
        white-space: nowrap
    }
}

@media(max-width:480px) {
    .logs-container {
        padding: 8px !important
    }

    .logs-content {
        padding: 8px !important;
        min-height: 200px !important;
        border-radius: 8px !important
    }

    .log-entry {
        padding: 10px !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
        border-radius: 6px !important;
        word-break: break-word
    }

    .log-card-info {
        font-size: 10px !important;
        padding: 6px 8px !important;
        flex-wrap: wrap;
        word-break: break-all
    }
}

@media(max-width:480px) {
    .telegram-footer {
        flex-direction: column !important;
        gap: 6px !important;
        padding: 10px !important
    }

    .telegram-footer-link,
    .telegram-footer-link-red,
    .telegram-footer-link-yellow {
        font-size: 11px !important;
        padding: 8px 14px !important;
        width: 100%;
        text-align: center;
        justify-content: center
    }
}

@media(max-width:768px) {
    .settings-overlay {
        padding: 0 !important
    }

    .settings-iframe {
        border-radius: 0 !important;
        width: 100% !important;
        height: 100% !important
    }
}

@media(max-width:480px) {
    .modal-overlay {
        padding: 10px !important
    }

    .modal-content {
        max-height: 85vh !important;
        border-radius: 12px !important
    }

    .modal-header {
        padding: 14px 16px !important
    }

    .modal-header h2 {
        font-size: 16px !important
    }

    .modal-body {
        padding: 12px !important
    }

    .gateway-item {
        padding: 10px !important
    }

    .gateway-name {
        font-size: 13px !important
    }

    .gateway-coming-soon {
        font-size: 9px !important
    }
}

@media(max-width:480px) {
    .notification {
        top: 8px !important;
        right: 8px !important;
        left: 8px !important;
        max-width: none !important;
        font-size: 12px !important;
        padding: 10px 14px !important;
        border-radius: 8px !important
    }
}

@media(max-width:320px) {
    .app-header {
        padding: 8px !important;
        min-height: 44px !important
    }

    .header-left {
        gap: 6px !important
    }

    .logo {
        width: 28px !important;
        height: 28px !important
    }

    .header-info h1 {
        font-size: 12px !important
    }

    .action-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important
    }

    .action-icon svg {
        width: 12px;
        height: 12px
    }

    .panel-left {
        padding: 8px !important;
        max-height: 32vh;
        max-height: 32dvh
    }

    .panel-right {
        min-height: 68vh !important;
        min-height: 68dvh !important
    }

    .live-stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important
    }

    .live-stat-card {
        padding: 6px !important
    }

    .live-stat-value {
        font-size: 16px !important
    }

    .log-entry {
        font-size: 11px !important;
        padding: 8px !important
    }
}

.update-banner {
    background: linear-gradient(135deg, #4a9eff1f, #8b7fc81a);
    border: 1px solid rgba(74, 158, 255, .25);
    border-radius: 12px;
    margin: 8px 16px 0;
    padding: 0;
    animation: updateSlideIn .35s ease-out;
    position: relative;
    z-index: 50
}

@keyframes updateSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.update-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px
}

.update-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #4a9eff26;
    color: #4a9eff;
    flex-shrink: 0
}

.update-banner-text {
    flex: 1;
    font-size: 13px;
    color: #ffffffd9;
    line-height: 1.4
}

.update-banner-text strong {
    color: #4a9eff;
    font-weight: 600;
    margin-right: 6px
}

.update-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #4a9eff, #7b6fc8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0
}

.update-banner-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px #4a9eff59
}

.update-banner-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #ffffff0f;
    color: #fff6;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0
}

.update-banner-dismiss:hover {
    background: #ffffff1f;
    color: #fffc
}

@media(max-width:480px) {
    .update-banner {
        margin: 6px 10px 0
    }

    .update-banner-content {
        gap: 8px;
        padding: 10px 12px;
        flex-wrap: wrap
    }

    .update-banner-icon {
        width: 30px;
        height: 30px
    }

    .update-banner-icon svg {
        width: 16px;
        height: 16px
    }

    .update-banner-text {
        font-size: 12px
    }

    .update-banner-btn {
        padding: 6px 12px;
        font-size: 11px
    }
}

.notif-banner {
    border-radius: 12px;
    margin: 6px 16px 0;
    padding: 0;
    animation: updateSlideIn .35s ease-out;
    position: relative;
    z-index: 49
}

.notif-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px
}

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

.notif-banner-text {
    flex: 1;
    font-size: 13px;
    color: #ffffffd9;
    line-height: 1.4
}

.notif-banner-text strong {
    font-weight: 600;
    margin-right: 6px
}

.notif-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0
}

.notif-banner-btn:hover {
    opacity: .9;
    transform: translateY(-1px)
}

.notif-banner-dismiss {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: #ffffff0f;
    color: #fff6;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0
}

.notif-banner-dismiss:hover {
    background: #ffffff1f;
    color: #fffc
}

.notif-banner.notif-info {
    background: linear-gradient(135deg, #4a9eff1a, #60a5fa14);
    border: 1px solid rgba(74, 158, 255, .25)
}

.notif-banner.notif-info .notif-banner-icon {
    background: #4a9eff26;
    color: #4a9eff
}

.notif-banner.notif-info .notif-banner-text strong {
    color: #4a9eff
}

.notif-banner.notif-info .notif-banner-btn {
    background: linear-gradient(135deg, #4a9eff, #60a5fa)
}

.notif-banner.notif-warning {
    background: linear-gradient(135deg, #fbbf241a, #f59e0b14);
    border: 1px solid rgba(251, 191, 36, .25)
}

.notif-banner.notif-warning .notif-banner-icon {
    background: #fbbf2426;
    color: #fbbf24
}

.notif-banner.notif-warning .notif-banner-text strong {
    color: #fbbf24
}

.notif-banner.notif-warning .notif-banner-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000
}

.notif-banner.notif-success {
    background: linear-gradient(135deg, #34d3991a, #10b98114);
    border: 1px solid rgba(52, 211, 153, .25)
}

.notif-banner.notif-success .notif-banner-icon {
    background: #34d39926;
    color: #34d399
}

.notif-banner.notif-success .notif-banner-text strong {
    color: #34d399
}

.notif-banner.notif-success .notif-banner-btn {
    background: linear-gradient(135deg, #34d399, #10b981)
}

.notif-banner.notif-error {
    background: linear-gradient(135deg, #ef44441a, #dc262614);
    border: 1px solid rgba(239, 68, 68, .25)
}

.notif-banner.notif-error .notif-banner-icon {
    background: #ef444426;
    color: #ef4444
}

.notif-banner.notif-error .notif-banner-text strong {
    color: #ef4444
}

.notif-banner.notif-error .notif-banner-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626)
}

@media(max-width:480px) {
    .notif-banner {
        margin: 4px 10px 0
    }

    .notif-banner-content {
        gap: 8px;
        padding: 10px 12px;
        flex-wrap: wrap
    }

    .notif-banner-icon {
        width: 30px;
        height: 30px
    }

    .notif-banner-text {
        font-size: 12px
    }

    .notif-banner-btn {
        padding: 6px 12px;
        font-size: 11px
    }
}