#theme-editor .theme-editor-shell{width:min(100%,900px);margin:auto}
#theme-editor .theme-editor-hero{padding:22px;margin-bottom:14px;border:1px solid rgba(192,132,252,.2);border-radius:18px;background:linear-gradient(145deg,rgba(38,24,56,.96),rgba(15,11,22,.98))}
#theme-editor .theme-editor-hero h2{margin:0 0 7px;color:#f5eaff;font-size:clamp(20px,4vw,27px)}
#theme-editor .theme-editor-hero p{margin:0;color:#bcb0ca;font-size:13px;line-height:1.55}
#theme-editor .theme-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#theme-editor .theme-control-card{padding:16px;border:1px solid rgba(192,132,252,.17);border-radius:15px;background:rgba(18,14,25,.88)}
#theme-editor .theme-control-card h3{margin:0 0 12px;color:#eee2fb;font-size:13px}
#theme-editor .theme-color-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;color:#cfc2dc;font-size:12px}
#theme-editor input[type=color]{width:48px;height:34px;padding:3px;border:1px solid rgba(192,132,252,.35);border-radius:9px;background:#100c17}
#theme-editor input[type=range]{width:100%;accent-color:#b56cff}
#theme-editor .theme-range-head{display:flex;justify-content:space-between;gap:10px;color:#cfc2dc;font-size:12px;margin:13px 0 7px}
#theme-editor .theme-preview{padding:17px;border:1px solid rgba(192,132,252,.22);border-radius:16px;background:linear-gradient(145deg,#21172e,#100c17)}
#theme-editor .theme-preview-card{padding:15px;border-radius:12px;background:#17131e;border:1px solid rgba(192,132,252,.2)}
#theme-editor .theme-preview-title{font-size:16px;font-weight:800;margin-bottom:6px}
#theme-editor .theme-preview-copy{font-size:12px;color:#a69bb8;line-height:1.5;margin-bottom:12px}
#theme-editor .theme-preview-button{display:inline-block;padding:9px 13px;border-radius:10px;color:white;font-size:12px;font-weight:800}
#theme-editor .theme-editor-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}
#theme-editor .theme-editor-actions .btn{flex:1 1 150px}
#theme-editor .theme-editor-status{min-height:18px;margin:10px 2px 0;color:#c4a6e5;font-size:11px}
#theme-editor .theme-import-label{display:inline-flex;align-items:center;justify-content:center;flex:1 1 150px;min-height:42px;padding:10px 14px;border:1px solid rgba(192,132,252,.22);border-radius:11px;background:#1b1623;color:#eee5fa;font-size:13px;font-weight:650;cursor:pointer}
#theme-editor .theme-import-label input{display:none}
@media(max-width:560px){#theme-editor .theme-editor-grid{grid-template-columns:1fr}#theme-editor .theme-editor-hero{padding:17px}}

/* Пользовательская тема включается только после изменения настроек */
html.smoy-custom-theme body{
 background:radial-gradient(ellipse at 50% -15%,color-mix(in srgb,var(--smoy-user-accent) 20%,transparent),transparent 48%),var(--smoy-user-bg)!important;
 color:var(--smoy-user-text)!important
}
html.smoy-custom-theme .category-box,
html.smoy-custom-theme .section .box{
 border-radius:var(--smoy-user-radius)!important;
 border-color:color-mix(in srgb,var(--smoy-user-accent) 32%,transparent)!important;
 box-shadow:0 12px 34px rgba(0,0,0,.28),0 0 var(--smoy-user-glow) color-mix(in srgb,var(--smoy-user-accent) 18%,transparent)!important
}
html.smoy-custom-theme .category-header,
html.smoy-custom-theme .res-card,
html.smoy-custom-theme .online-room-card{border-color:color-mix(in srgb,var(--smoy-user-accent) 28%,transparent)!important}
html.smoy-custom-theme .step-title,
html.smoy-custom-theme .cat-name,
html.smoy-custom-theme .res-title,
html.smoy-custom-theme .bio-name{color:var(--smoy-user-text)!important}
html.smoy-custom-theme .btn-accent,
html.smoy-custom-theme .btn-blue,
html.smoy-custom-theme .step-num{
 background:linear-gradient(135deg,var(--smoy-user-accent),color-mix(in srgb,var(--smoy-user-accent) 65%,#240b3b))!important
}
html.smoy-custom-theme input:focus,
html.smoy-custom-theme select:focus,
html.smoy-custom-theme textarea:focus{border-color:var(--smoy-user-accent)!important}
html.smoy-custom-theme input[type=checkbox],
html.smoy-custom-theme input[type=radio],
html.smoy-custom-theme input[type=range]{accent-color:var(--smoy-user-accent)!important}

/* Hover animation: JSON import button */
#theme-editor .theme-import-label {
    transition: transform .2s ease, box-shadow .2s ease,
                border-color .2s ease, background .2s ease;
    cursor: pointer;
}

#theme-editor .theme-import-label:hover {
    transform: translateY(-2px);
    border-color: #b56cff;
    background: #261a35;
    box-shadow: 0 5px 18px rgba(181,108,255,.22);
}

#theme-editor .theme-import-label:active {
    transform: translateY(0) scale(.97);
}

#theme-editor .theme-import-label:focus-within {
    outline: 2px solid #b56cff;
    outline-offset: 3px;
}

/* Smoy 2.0: применение цвета панелей из редактора */
html.smoy-custom-theme .section .box,
html.smoy-custom-theme .category-box,
html.smoy-custom-theme .top-bar,
html.smoy-custom-theme .category-content,
html.smoy-custom-theme .res-card,
html.smoy-custom-theme .online-room-card,
html.smoy-custom-theme .stats-bar,
html.smoy-custom-theme .chat-box,
html.smoy-custom-theme .fleet-bar,
html.smoy-custom-theme .move-log {
    background: var(--smoy-user-panel) !important;
    border-color: color-mix(
        in srgb,
        var(--smoy-user-accent) 32%,
        transparent
    ) !important;
}

html.smoy-custom-theme .section .box,
html.smoy-custom-theme .category-box,
html.smoy-custom-theme .res-card,
html.smoy-custom-theme .online-room-card {
    border-radius: var(--smoy-user-radius) !important;
}

html.smoy-custom-theme input[type="text"],
html.smoy-custom-theme input[type="number"],
html.smoy-custom-theme textarea,
html.smoy-custom-theme select {
    background: var(--smoy-user-panel) !important;
    color: var(--smoy-user-text) !important;
    border-color: color-mix(
        in srgb,
        var(--smoy-user-accent) 30%,
        transparent
    ) !important;
}

/* Smoy 2.0: исправление приоритета цветов пользовательской темы */
html.smoy-custom-theme #home .category-box,
html.smoy-custom-theme #home .category-box:hover,
html.smoy-custom-theme .section .box,
html.smoy-custom-theme .section .box:hover,
html.smoy-custom-theme #home .category-content,
html.smoy-custom-theme #home .category-header,
html.smoy-custom-theme #home .res-card,
html.smoy-custom-theme #home .res-card:hover,
html.smoy-custom-theme #service-header.top-bar {
    background: var(--smoy-user-panel) !important;
    border-color: color-mix(
        in srgb,
        var(--smoy-user-accent) 32%,
        transparent
    ) !important;
}

html.smoy-custom-theme #home .category-box,
html.smoy-custom-theme .section .box,
html.smoy-custom-theme #home .res-card {
    border-radius: var(--smoy-user-radius) !important;
}

html.smoy-custom-theme #home .category-header,
html.smoy-custom-theme #home .category-content {
    color: var(--smoy-user-text) !important;
}


/* Smoy 2.0: эффекты колеса фортуны */
#wheel .wheel-container {
    transition: filter .3s ease;
}

#wheel .wheel-container.is-spinning {
    animation: wheelGlow 1s ease-in-out infinite alternate;
}

@keyframes wheelGlow {
    from {
        filter: drop-shadow(0 10px 20px rgba(126, 34, 206, .22));
    }
    to {
        filter: drop-shadow(0 10px 30px rgba(192, 132, 252, .55));
    }
}

#wheel #winner-box.is-visible {
    animation: wheelWinnerReveal .55s cubic-bezier(.18,.89,.32,1.28) both;
    box-shadow:
        0 0 24px rgba(168, 85, 247, .2),
        inset 0 0 18px rgba(168, 85, 247, .06);
}

@keyframes wheelWinnerReveal {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(.92);
    }
    70% {
        opacity: 1;
        transform: translateY(-2px) scale(1.025);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    #wheel .wheel-container.is-spinning,
    #wheel #winner-box.is-visible {
        animation: none !important;
    }
}

