* {
    box-sizing: border-box;
    cursor: none;
}

html, body {
    margin: 0;
    min-height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background:
            radial-gradient(circle at 20% 20%, rgba(120, 180, 255, 0.18), transparent 25%),
            radial-gradient(circle at 80% 30%, rgba(255, 100, 180, 0.16), transparent 25%),
            radial-gradient(circle at 50% 80%, rgba(120, 255, 200, 0.14), transparent 25%),
            linear-gradient(135deg, #06112b 0%, #0b1f4d 40%, #10265d 70%, #081633 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.stars,
.confetti,
.cursor-layer,
.trail-layer,
.glow-orbs,
.grid-layer,
.particle-layer,
.light-rays,
.mirror-glints {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid-layer {
    background:
            linear-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px),
            linear-gradient(90deg, rgba(199, 125, 255, 0.08) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.12), rgba(0,0,0,0.92));
    opacity: 0.45;
    animation: gridDrift 16s linear infinite;
}

.grid-layer::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at center, rgba(0,229,255,0.14), transparent 55%);
    transform: rotateX(70deg) scale(1.35);
    transform-origin: center bottom;
    opacity: 0.6;
}

@keyframes gridDrift {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(52px) translateX(26px); }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.22;
    animation: floatOrb linear infinite;
}

@keyframes floatOrb {
    0% { transform: translateY(0) translateX(0) scale(1); }
    50% { transform: translateY(-30px) translateX(20px) scale(1.08); }
    100% { transform: translateY(0) translateX(0) scale(1); }
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: white;
    opacity: 0.7;
    animation: twinkle 2.4s infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 1; transform: scale(2); }
}

.particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.75;
    mix-blend-mode: screen;
    transition: transform 0.12s linear;
}

.disco-ball-wrap {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 150px;
    height: 190px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.92;
}

.disco-hanger {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 34px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(180,210,255,0.2));
    box-shadow: 0 0 10px rgba(255,255,255,0.35);
    border-radius: 999px;
}

.disco-ball {
    position: absolute;
    top: 28px;
    left: 50%;
    width: 108px;
    height: 108px;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
            radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.18) 22%, rgba(120,170,255,0.15) 35%, rgba(35,55,100,0.92) 72%),
            linear-gradient(90deg, rgba(255,255,255,0.22) 0 8%, transparent 8% 16%, rgba(255,255,255,0.12) 16% 24%, transparent 24% 32%, rgba(255,255,255,0.18) 32% 40%, transparent 40% 48%, rgba(255,255,255,0.14) 48% 56%, transparent 56% 64%, rgba(255,255,255,0.18) 64% 72%, transparent 72% 80%, rgba(255,255,255,0.1) 80% 88%, transparent 88% 100%),
            linear-gradient(rgba(255,255,255,0.24) 0 8%, transparent 8% 16%, rgba(255,255,255,0.1) 16% 24%, transparent 24% 32%, rgba(255,255,255,0.16) 32% 40%, transparent 40% 48%, rgba(255,255,255,0.1) 48% 56%, transparent 56% 64%, rgba(255,255,255,0.2) 64% 72%, transparent 72% 80%, rgba(255,255,255,0.08) 80% 88%, transparent 88% 100%);
    box-shadow:
            0 0 24px rgba(255,255,255,0.28),
            0 0 55px rgba(88,166,255,0.22),
            inset -12px -18px 22px rgba(0,0,0,0.35),
            inset 14px 12px 20px rgba(255,255,255,0.18);
    animation: discoSwing 4.8s ease-in-out infinite, discoRotate 7s linear infinite;
    overflow: hidden;
}

.disco-ball::before {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.75), transparent 30%);
    opacity: 0.8;
    filter: blur(1px);
}

.disco-ball::after {
    content: "";
    position: absolute;
    inset: -15%;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.12);
    animation: discoRotateReverse 9s linear infinite;
}

.light-ray {
    position: absolute;
    top: 62px;
    left: 50%;
    width: 240px;
    height: 18px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(255,255,255,0.38), rgba(0,229,255,0.18), transparent 78%);
    filter: blur(4px);
    opacity: 0.28;
    border-radius: 999px;
    animation: pulseRay 2.4s ease-in-out infinite;
}

.mirror-glint {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 12px white, 0 0 24px rgba(0,229,255,0.8);
    opacity: 0.6;
    animation: glintBlink 1.8s ease-in-out infinite;
}

.player-panel {
    margin-top: 1.4rem;
    width: min(100%, 680px);
    display: grid;
    gap: 1rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 22px;
    background: rgba(8, 18, 44, 0.4);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    pointer-events: auto;
}

.player-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.8rem 1rem;
}

.icon-btn {
    min-width: 70px;
    padding: 0.88rem 1rem;
    font-size: 1.15rem;
}

.volume-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: min(100%, 360px);
    color: rgba(255,255,255,0.86);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0,229,255,0.9), rgba(199,125,255,0.95));
    outline: none;
    box-shadow: 0 0 14px rgba(0,229,255,0.22);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 18px rgba(0,229,255,0.45);
    cursor: none;
    border: none;
}

.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.7), 0 0 18px rgba(0,229,255,0.45);
    cursor: none;
    border: none;
}

.eq-wrap {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 0.35rem;
    min-height: 82px;
    padding-top: 0.3rem;
}

.eq-bar {
    width: 12px;
    border-radius: 999px 999px 6px 6px;
    background: linear-gradient(to top, rgba(58,134,255,0.55), rgba(0,229,255,0.95), rgba(255,255,255,0.95));
    box-shadow: 0 0 12px rgba(0,229,255,0.22);
    transform-origin: bottom center;
    transition: height 0.14s ease;
}

@keyframes discoSwing {
    0%, 100% { transform: translateX(-50%) rotate(-5deg); }
    50% { transform: translateX(-50%) rotate(5deg); }
}

@keyframes discoRotate {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

@keyframes discoRotateReverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes pulseRay {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.42; }
}

@keyframes glintBlink {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.95; transform: scale(1.25); }
}

.app {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    width: min(1100px, 92vw);
    max-width: 1100px;
}

.card {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: clamp(1.2rem, 2vw, 2rem);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 28px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.12);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.16);
    font-size: 0.86rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    margin-bottom: 1rem;
}

.panel-title {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 3.2rem);
    font-weight: 900;
    line-height: 1.1;
}

.panel-text,
.subline,
.helper-text {
    color: rgba(255,255,255,0.82);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-top: 0.8rem;
    line-height: 1.6;
}

.helper-text {
    min-height: 1.7em;
    margin-top: 0.7rem;
    color: #ffb3d9;
    font-size: 0.95rem;
}

.name-form {
    margin-top: 1.7rem;
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.name-input {
    width: min(100%, 420px);
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(7, 15, 40, 0.45);
    color: white;
    font-size: 1rem;
    outline: none;
    box-shadow: inset 0 0 0 1px transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
    pointer-events: auto;
}

.name-input::placeholder {
    color: rgba(255,255,255,0.45);
}

.name-input:focus {
    border-color: rgba(121, 197, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.18);
    transform: translateY(-1px);
}

.name-input.shake {
    animation: inputShake 0.35s ease;
    border-color: rgba(255, 102, 196, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 102, 196, 0.15);
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.btn-row {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
}

button {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.28);
    padding: 0.95rem 1.35rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.28);
    pointer-events: auto;
}

button:hover {
    transform: scale(1.06);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 14px 34px rgba(0,0,0,0.34);
}

.primary-btn {
    background: linear-gradient(135deg, rgba(90,160,255,0.34), rgba(199,125,255,0.3));
}

.secondary-btn {
    background: rgba(255,255,255,0.08);
}

.greeting-wrap {
    min-height: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.greeting {
    margin: 0 auto;
    width: min(100%, 950px);
    font-size: clamp(2.2rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-transform: uppercase;
    text-align: center;
    user-select: none;
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.18));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 0.2em;
    column-gap: 0.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.word {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-right: 0.28em;
    max-width: 100%;
}

.letter {
    display: inline-block;
    animation: rainbow 2s linear infinite, blink 0.65s infinite alternate, jump 1.1s ease-in-out infinite, wobble 1.8s ease-in-out infinite;
    text-shadow: 0 0 6px currentColor, 0 0 12px currentColor, 0 0 24px currentColor, 0 0 40px currentColor;
    will-change: transform, opacity, color;
}

@keyframes rainbow {
    0%   { color: #ff3b3b; }
    14%  { color: #ff9f1c; }
    28%  { color: #ffe74c; }
    42%  { color: #56f000; }
    56%  { color: #00e5ff; }
    70%  { color: #3a86ff; }
    84%  { color: #c77dff; }
    100% { color: #ff3b3b; }
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

@keyframes jump {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    25% { transform: translateY(-18px) scale(1.08) rotate(-4deg); }
    50% { transform: translateY(4px) scale(0.97) rotate(3deg); }
    75% { transform: translateY(-10px) scale(1.04) rotate(-2deg); }
}

@keyframes wobble {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(60deg); }
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 16px;
    opacity: 0.9;
    top: -20px;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    border-radius: 2px;
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(120vh) rotate(720deg); opacity: 0.9; }
}

.cursor-dot {
    position: fixed;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    transform: translate(-50%, -50%);
    z-index: 9999;
    box-shadow: 0 0 12px #ffffff, 0 0 24px #66ccff, 0 0 36px #c77dff;
    mix-blend-mode: screen;
}

.cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.75);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9998;
    box-shadow: 0 0 12px rgba(255,255,255,0.6), 0 0 18px rgba(58,134,255,0.5);
    transition: width 0.12s ease, height 0.12s ease, border 0.12s ease;
}

.trail {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9997;
    opacity: 0.8;
    animation: fadeTrail 0.8s linear forwards;
    mix-blend-mode: screen;
}

@keyframes fadeTrail {
    0% { opacity: 0.95; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
}

.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
}

@media (max-width: 900px) {
    .disco-ball-wrap {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: 150px;
        margin-bottom: 0.8rem;
    }

    .light-ray {
        width: 180px;
    }
}

@media (max-width: 700px) {
    .app { padding: 1rem; }
    .card { padding: 1.1rem; border-radius: 22px; }
    .greeting { width: 100%; letter-spacing: 0.03em; line-height: 1.3; }
    .word { margin-right: 0.18em; }
    .name-form { flex-direction: column; }
    .name-input, .name-form button { width: 100%; }
    .cursor-ring { width: 28px; height: 28px; }
    .cursor-dot { width: 12px; height: 12px; }
    .player-panel { padding: 0.85rem; }
    .player-top { flex-direction: column; }
    .volume-wrap { width: 100%; }
    .eq-bar { width: 10px; }
}