/* ══════════════════════════════════════════════════════════
   PeponRuota — FULL-SCREEN SLOT-MACHINE PRIZE WHEEL
   Flashy, animated, brilliant casino vibes ✨🎰🎡
   ══════════════════════════════════════════════════════════ */

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

/* ── Animated Background ───────────────────────────────── */

body {
    font-family: 'Poppins', sans-serif;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background: #080414;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 0, 100, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(255, 180, 0, 0.13) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 200, 255, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 90%, rgba(120, 0, 255, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 70%, rgba(0, 255, 100, 0.08) 0%, transparent 40%),
        linear-gradient(135deg, #080414 0%, #150a2e 25%, #1a0820 50%, #0d1a2e 75%, #080414 100%);
    z-index: 0;
    animation: bgPulse 6s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 50, 100, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 30% 60%, rgba(255, 200, 0, 0.45), transparent),
        radial-gradient(1px 1px at 50% 10%, rgba(0, 255, 200, 0.4), transparent),
        radial-gradient(2px 2px at 70% 40%, rgba(255, 100, 0, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 90% 80%, rgba(120, 0, 255, 0.4), transparent),
        radial-gradient(2px 2px at 15% 85%, rgba(255, 215, 0, 0.55), transparent),
        radial-gradient(1px 1px at 85% 15%, rgba(0, 200, 255, 0.45), transparent),
        radial-gradient(1.5px 1.5px at 45% 45%, rgba(255, 0, 200, 0.35), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 50, 100, 0.35), transparent),
        radial-gradient(1px 1px at 25% 35%, rgba(0, 255, 150, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 55% 25%, rgba(255, 180, 0, 0.3), transparent),
        radial-gradient(1px 1px at 75% 60%, rgba(100, 0, 255, 0.35), transparent);
    z-index: 0;
    animation: sparkle 3s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0%   { filter: brightness(1) hue-rotate(0deg) saturate(1); }
    33%  { filter: brightness(1.15) hue-rotate(8deg) saturate(1.2); }
    66%  { filter: brightness(1.05) hue-rotate(-6deg) saturate(1.1); }
    100% { filter: brightness(1.1) hue-rotate(4deg) saturate(1.15); }
}

@keyframes sparkle {
    0%   { opacity: 0.5; transform: scale(1); }
    50%  { opacity: 1; transform: scale(1.03); }
    100% { opacity: 0.6; transform: scale(0.97); }
}

/* ── Layout ─────────────────────────────────────────────── */

.ruota-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

.ruota-left {
    width: 35%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.ruota-right {
    width: 65%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
    overflow: visible;
    gap: 8px;
}

/* ── Title ─────────────────────────────────────────────── */

.ruota-title {
    font-size: 2.4rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, #ff6b35, #ffd700, #ff3860, #a855f7, #00d4ff, #ffd700, #ff6b35);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShine 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.4))
            drop-shadow(0 0 40px rgba(168, 85, 247, 0.2));
    position: relative;
    z-index: 2;
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px));
}

.ruota-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff6b35, #ffd700, #a855f7, #00d4ff, transparent);
    border-radius: 2px;
    animation: titleUnderline 3s ease-in-out infinite alternate;
}

@keyframes titleShine {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes titleUnderline {
    from { opacity: 0.4; transform: scaleX(0.6); }
    to   { opacity: 1; transform: scaleX(1); }
}

/* ── Join Command Indicator ────────────────────────────── */

.ruota-join-command[hidden] {
    display: none;
}

.ruota-join-command {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15), rgba(0, 206, 201, 0.1));
    border: 2px solid rgba(0, 184, 148, 0.5);
    border-radius: 12px;
    animation: joinPulse 2s ease-in-out infinite alternate;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0, 184, 148, 0.15);
}

.ruota-join-command__label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.ruota-join-command__cmd {
    font-size: 1.2rem;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    color: #00ffb3;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 179, 0.3);
    text-shadow: 0 0 12px rgba(0, 255, 179, 0.5);
    letter-spacing: 0.05em;
}

@keyframes joinPulse {
    from { box-shadow: 0 0 15px rgba(0, 184, 148, 0.15); border-color: rgba(0, 184, 148, 0.4); }
    to   { box-shadow: 0 0 30px rgba(0, 184, 148, 0.3); border-color: rgba(0, 255, 179, 0.7); }
}

/* ── Cam Frame ─────────────────────────────────────────── */

.ruota-cam-frame {
    flex: 1;
    border: 3px solid rgba(255, 100, 50, 0.5);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    min-height: 200px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(255, 100, 50, 0.12),
        0 0 60px rgba(168, 85, 247, 0.06),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px));
}

.ruota-cam-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff6b35, #a855f7, #00d4ff, #ffd700, #ff3860, #ff6b35);
    z-index: -1;
    animation: borderGlow 4s linear infinite;
    background-size: 400% 400%;
}

@keyframes borderGlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ruota-cam-label {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    letter-spacing: 0.3em;
}

/* ── Participants Panel ────────────────────────────────── */

.ruota-participants-panel {
    background: linear-gradient(145deg, rgba(30, 10, 60, 0.95), rgba(15, 5, 40, 0.98));
    border: 2px solid rgba(168, 85, 247, 0.35);
    border-radius: 16px;
    padding: 16px;
    max-height: 35vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 0 25px rgba(168, 85, 247, 0.1),
        0 0 50px rgba(255, 100, 50, 0.05),
        inset 0 1px 0 rgba(168, 85, 247, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px));
}

.ruota-participants-panel::-webkit-scrollbar {
    width: 6px;
}

.ruota-participants-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.ruota-participants-panel::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.4);
    border-radius: 3px;
}

.ruota-participants-title {
    font-size: 1rem;
    font-weight: 700;
    color: #a855f7;
    margin-bottom: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

.ruota-participants-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ruota-participant {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.ruota-participant--current {
    background: linear-gradient(135deg, rgba(255, 100, 50, 0.2), rgba(168, 85, 247, 0.15));
    border-color: rgba(255, 100, 50, 0.5);
    box-shadow: 0 0 15px rgba(255, 100, 50, 0.15);
    animation: currentGlow 1.5s ease-in-out infinite alternate;
}

@keyframes currentGlow {
    from { box-shadow: 0 0 10px rgba(255, 100, 50, 0.15); }
    to   { box-shadow: 0 0 25px rgba(168, 85, 247, 0.3); }
}

.ruota-participant--done {
    opacity: 0.35;
    text-decoration: line-through;
}

.ruota-participant__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 100, 50, 0.35), rgba(168, 85, 247, 0.3));
    font-size: 0.7rem;
    font-weight: 700;
    color: #ff9f43;
    flex-shrink: 0;
    text-shadow: 0 0 8px rgba(255, 159, 67, 0.5);
}

.ruota-participant__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ruota-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-style: italic;
    padding: 20px 0;
}

/* ── Wheel Container ───────────────────────────────────── */

.ruota-wheel-container {
    position: relative;
    width: min(520px, 55vh);
    height: min(520px, 55vh);
    cursor: pointer;
    transition: transform 0.15s ease;
    overflow: visible;
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px));
}

.ruota-wheel-container:hover {
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px)) scale(1.01);
}

.ruota-wheel-container:active {
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px)) scale(0.99);
}

#ruota-canvas {
    width: 100%;
    height: 100%;
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    filter: drop-shadow(0 0 40px rgba(255, 100, 50, 0.2))
            drop-shadow(0 0 80px rgba(168, 85, 247, 0.1));
    will-change: transform;
}

/* ── Pointer (top triangle) ────────────────────────────── */

.ruota-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 36px solid #daa520;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6))
            drop-shadow(0 0 20px rgba(218, 165, 32, 0.5));
    z-index: 10;
    animation: pointerPulse 2s ease-in-out infinite alternate;
}

@keyframes pointerPulse {
    from { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)) drop-shadow(0 0 15px rgba(218,165,32,0.4)); }
    to   { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)) drop-shadow(0 0 30px rgba(218,165,32,0.7)); }
}

/* ── Current Player ────────────────────────────────────── */

.ruota-current-player {
    margin-top: 24px;
    text-align: center;
    animation: fadeInUp 0.5s ease;
    position: relative;
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px));
}

.ruota-current-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ruota-current-name {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b35, #ffd700, #a855f7, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.5));
    margin-top: 4px;
    animation: nameGlow 2s ease-in-out infinite alternate;
}

@keyframes nameGlow {
    from { filter: drop-shadow(0 0 15px rgba(255, 107, 53, 0.3)); }
    to   { filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.6)); }
}

/* ── Prize Overlay ─────────────────────────────────────── */

.ruota-overlay[hidden] {
    display: none;
}

.ruota-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center,
        rgba(10, 5, 40, 0.94) 0%,
        rgba(5, 2, 20, 0.97) 50%,
        rgba(0, 0, 0, 0.98) 100%);
    animation: overlayFadeIn 0.5s ease;
    overflow: hidden;
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes overlayFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to   { opacity: 1; backdrop-filter: blur(8px); }
}

.ruota-overlay-content {
    text-align: center;
    animation: prizePopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
    padding: 40px 60px;
    border-radius: 30px;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ruota-overlay-player {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 24px;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(167, 139, 250, 0.2);
    letter-spacing: 0.02em;
}

.ruota-overlay-prize {
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700, #ffed4a, #fff6b7, #ffd700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: prizeShine 2.5s linear infinite;
    filter: drop-shadow(0 0 50px rgba(218, 165, 32, 0.7))
            drop-shadow(0 0 100px rgba(255, 200, 0, 0.3));
    letter-spacing: 0.02em;
}

@keyframes prizeShine {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.ruota-overlay-prize--none {
    background: linear-gradient(135deg, #636e72, #b2bec3, #dfe6e9, #b2bec3, #636e72);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: prizeShine 2.5s linear infinite;
    filter: drop-shadow(0 0 30px rgba(100, 100, 120, 0.5));
}

.ruota-overlay-prize--respin {
    background: linear-gradient(135deg, #00b894, #00cec9, #81ecec, #55efc4, #00cec9, #00b894);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: prizeShine 2s linear infinite;
    filter: drop-shadow(0 0 50px rgba(0, 206, 201, 0.7))
            drop-shadow(0 0 100px rgba(0, 206, 201, 0.3));
}

/* ── Confetti Particles ────────────────────────────────── */

.ruota-confetti {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall linear forwards;
    z-index: 1;
}

@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    25%  { opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0.5); opacity: 0; }
}

/* ── Admin Controls ────────────────────────────────────── */

.ruota-admin-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
    background: linear-gradient(145deg, rgba(20, 8, 50, 0.92), rgba(8, 4, 25, 0.95));
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 14px;
    padding: 12px 24px;
    backdrop-filter: blur(15px);
    z-index: 50;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(168, 85, 247, 0.1),
        inset 0 1px 0 rgba(168, 85, 247, 0.15);
}

.ruota-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.ruota-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}

.ruota-btn:hover::after {
    opacity: 1;
}

.ruota-btn--open {
    background: linear-gradient(135deg, #00b894, #00cec9);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
}

.ruota-btn--open:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 184, 148, 0.5);
}

.ruota-btn--close {
    background: linear-gradient(135deg, #e17055, #d63031);
    box-shadow: 0 4px 15px rgba(214, 48, 49, 0.3);
}

.ruota-btn--close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(214, 48, 49, 0.5);
}

.ruota-btn--reset {
    background: linear-gradient(135deg, #636e72, #b2bec3);
    box-shadow: 0 4px 15px rgba(99, 110, 114, 0.3);
}

.ruota-btn--reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 110, 114, 0.5);
}

.ruota-btn--edit {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.ruota-btn--edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(108, 92, 231, 0.5);
}

.ruota-btn--edit.ruota-btn--edit-active {
    background: linear-gradient(135deg, #00b894, #55efc4);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.ruota-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.ruota-status {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    min-width: 180px;
    text-align: center;
}

/* ── Unauthorized ──────────────────────────────────────── */

.ruota-unauthorized[hidden] {
    display: none;
}

.ruota-unauthorized {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #05050f;
    z-index: 9999;
    gap: 16px;
}

.ruota-unauthorized h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #daa520, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ruota-unauthorized p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.ruota-unauthorized .ruota-btn {
    background: linear-gradient(135deg, #daa520, #ffd700);
    color: #000;
    font-weight: 800;
    padding: 14px 32px;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(218, 165, 32, 0.4);
}

/* ── Animations ────────────────────────────────────────── */

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

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

@keyframes prizePopIn {
    from { opacity: 0; transform: scale(0.3) rotate(-5deg); }
    60%  { transform: scale(1.05) rotate(1deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes lightPulse {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}

/* ── Floating particles (decorative) ───────────────────── */

.ruota-layout::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(2px 2px at 5% 15%, rgba(255, 100, 50, 0.4), transparent),
        radial-gradient(2px 2px at 95% 85%, rgba(168, 85, 247, 0.35), transparent),
        radial-gradient(2px 2px at 40% 60%, rgba(0, 200, 255, 0.3), transparent),
        radial-gradient(2.5px 2.5px at 75% 25%, rgba(255, 50, 100, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 20% 80%, rgba(0, 255, 150, 0.25), transparent),
        radial-gradient(2px 2px at 60% 10%, rgba(255, 200, 0, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 85% 50%, rgba(255, 0, 200, 0.25), transparent);
    animation: floatParticles 10s ease-in-out infinite alternate;
}

@keyframes floatParticles {
    0%   { transform: translateY(0) translateX(0); }
    33%  { transform: translateY(-8px) translateX(5px); }
    66%  { transform: translateY(5px) translateX(-3px); }
    100% { transform: translateY(-3px) translateX(2px); }
}

/* ══════════════════════════════════════════════════════════
   Edit Mode — Layout editor for sections
   ══════════════════════════════════════════════════════════ */

/* Section outlines */
.ruota-edit-active .ruota-edit-section {
    outline: 2px dashed rgba(218, 165, 32, 0.5);
    outline-offset: 4px;
    cursor: move;
    overflow: visible !important;
}

.ruota-edit-active .ruota-edit-section:hover {
    outline-color: rgba(218, 165, 32, 0.9);
}

/* Disable wheel hover/active scale in edit mode */
.ruota-edit-active .ruota-wheel-container:hover,
.ruota-edit-active .ruota-wheel-container:active {
    transform: translate(var(--edit-x, 0px), var(--edit-y, 0px));
}

/* Section label */
.ruota-edit-label {
    position: absolute;
    top: -24px;
    left: 8px;
    background: rgba(218, 165, 32, 0.9);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px 4px 0 0;
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

/* Resize handles */
.ruota-edit-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #daa520;
    border: 2px solid #fff;
    border-radius: 2px;
    z-index: 100;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    transition: background 0.15s, transform 0.15s;
}

.ruota-edit-handle:hover {
    background: #ffd700;
    transform: scale(1.3);
}

.ruota-edit-handle--nw { top: -6px;    left: -6px;   cursor: nw-resize; }
.ruota-edit-handle--n  { top: -6px;    left: 50%;    margin-left: -6px; cursor: n-resize; }
.ruota-edit-handle--ne { top: -6px;    right: -6px;  cursor: ne-resize; }
.ruota-edit-handle--e  { top: 50%;     right: -6px;  margin-top: -6px;  cursor: e-resize; }
.ruota-edit-handle--se { bottom: -6px; right: -6px;  cursor: se-resize; }
.ruota-edit-handle--s  { bottom: -6px; left: 50%;    margin-left: -6px; cursor: s-resize; }
.ruota-edit-handle--sw { bottom: -6px; left: -6px;   cursor: sw-resize; }
.ruota-edit-handle--w  { top: 50%;     left: -6px;   margin-top: -6px;  cursor: w-resize; }

/* Panel splitter (vertical divider) */
.ruota-edit-splitter {
    position: fixed;
    top: 0;
    width: 8px;
    height: 100vh;
    background: rgba(218, 165, 32, 0.3);
    cursor: col-resize;
    z-index: 200;
    transform: translateX(-50%);
    transition: background 0.2s;
}

.ruota-edit-splitter:hover,
.ruota-edit-splitter--active {
    background: rgba(218, 165, 32, 0.7);
}

/* Edit toolbar */
.ruota-edit-toolbar {
    position: fixed;
    top: 14px;
    right: 14px;
    background: linear-gradient(145deg, rgba(15, 10, 40, 0.95), rgba(5, 5, 20, 0.98));
    border: 1px solid rgba(218, 165, 32, 0.5);
    border-radius: 12px;
    padding: 10px 16px;
    z-index: 200;
    display: flex;
    gap: 12px;
    align-items: center;
    backdrop-filter: blur(12px);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 215, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

.ruota-edit-toolbar__lock {
    color: #fff;
    font-size: 0.8rem;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.ruota-edit-toolbar__lock input {
    accent-color: #daa520;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Size info tooltip */
.ruota-edit-size-info {
    position: absolute;
    bottom: -22px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #daa520;
    font-size: 0.6rem;
    font-family: monospace;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
}

