:root {
    --bg-primary: #0f0f13;
    --bg-secondary: #1a1b23;
    --accent-primary: #7b61ff;
    --accent-secondary: #ff4d77;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --success: #00e6b2;
    --error: #ff4d77;
    --glass-bg: rgba(30, 30, 40, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #15151c 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-primary);
    padding: 20px;
    touch-action: manipulation;
}

body::before {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.15;
    top: -150px;
    left: -150px;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    opacity: 0.1;
    bottom: -250px;
    right: -250px;
    z-index: -1;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 320px;
    padding: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.button-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.toggle-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, var(--bg-secondary), #15151e);
    color: var(--accent-primary);
    cursor: pointer;
    position: relative;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
    z-index: 2;
}

.toggle-btn::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1d1e28, #171821);
    z-index: -1;
    transition: all 0.4s ease;
}

.toggle-btn:active {
    transform: scale(0.97);
}

.toggle-btn.active {
    color: var(--error);
    box-shadow:
        0 0 25px rgba(219, 43, 66, 0.4),
        0 0 0 3px rgba(219, 43, 66, 0.2),
        inset 0 2px 5px rgba(255, 255, 255, 0.1);
}

.toggle-btn.active::before {
    background: linear-gradient(145deg, #251d24, #1d1719);
}

.icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.toggle-btn.active .icon-wrapper {
    transform: scale(1.1);
}

.icon {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.status {
    margin-top: 30px;
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    height: 20px;
    transition: all 0.3s ease;
}

.visualizer {
    margin-top: 30px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
}

.bar {
    width: 6px;
    background: linear-gradient(to top, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    height: 10px;
    opacity: 0.6;
    transition: height 0.2s ease;
}

.toggle-btn.active~.visualizer .bar {
    animation: visualizerPulse 1.5s infinite alternate;
}

.bar:nth-child(2) {
    animation-delay: 0.2s;
}

.bar:nth-child(3) {
    animation-delay: 0.4s;
}

.bar:nth-child(4) {
    animation-delay: 0.6s;
}

.bar:nth-child(5) {
    animation-delay: 0.8s;
}

.bar:nth-child(6) {
    animation-delay: 1.0s;
}

.bar:nth-child(7) {
    animation-delay: 1.2s;
}

@keyframes visualizerPulse {
    0% {
        height: 10px;
        opacity: 0.6;
    }

    100% {
        height: 40px;
        opacity: 1;
    }
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid transparent;
    opacity: 0;
    z-index: 1;
}

.toggle-btn.active+.pulse-ring {
    border-color: var(--error);
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% {
        width: 120px;
        height: 120px;
        opacity: 0.8;
    }

    100% {
        width: 180px;
        height: 180px;
        opacity: 0;
    }
}

.connection-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    margin: 0 auto;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.toggle-btn.active~.connection-dot {
    background: var(--error);
    box-shadow: 0 0 10px var(--error);
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 25px 20px;
        max-width: 300px;
    }

    .app-title {
        font-size: 24px;
        margin-bottom: 35px;
    }

    .button-wrapper {
        width: 110px;
        height: 110px;
    }

    .icon-wrapper {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 350px) {
    .container {
        padding: 20px 15px;
        max-width: 280px;
    }

    .button-wrapper {
        width: 100px;
        height: 100px;
    }

    .app-title {
        font-size: 22px;
    }
}

