* {
    -webkit-user-select: none;
    user-select: none;
}

input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}

/* Typography Foundation */
body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(ellipse at 20% 50%, rgba(129, 140, 248, 0.15) 0%, rgba(6, 8, 13, 0) 50%), 
                radial-gradient(ellipse at 80% 80%, rgba(72, 187, 120, 0.08) 0%, rgba(6, 8, 13, 0) 50%), 
                linear-gradient(to bottom, #06080d, #0a0d14);
    background-attachment: fixed;
    color: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-y: auto;
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-user-select: none;
    user-select: none;
}

/* Glassmorphic Card Base */
.glass-card {
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.5rem;
}

/* Panic Mode Breathing Circle */
.breathing-circle-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-circle-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-background {
    fill: none;
    stroke: rgba(71, 85, 105, 0.3);
    stroke-width: 4;
    stroke-linecap: round;
}

.circle-progress {
    fill: none;
    stroke: #a5b4fc;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 502.65;
    stroke-dashoffset: 502.65;
    filter: drop-shadow(0 0 8px rgba(165, 180, 252, 0.4));
}

.circle-progress-animating {
    animation: circleFillCycle 12s linear infinite;
}

@keyframes circleFillCycle {
    0% {
        stroke-dashoffset: 502.65;
    }
    33.33% {
        stroke-dashoffset: 0;
    }
    66.67% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: 502.65;
    }
}

.breathing-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 400;
    color: #a5b4fc;
    font-family: 'Fraunces', Georgia, serif;
    letter-spacing: 0.05em;
    text-align: center;
    user-select: none;
}

.breathing-text-inhale {
    animation: textInhale 12s linear infinite;
}

.breathing-text-hold {
    animation: textHold 12s linear infinite;
}

.breathing-text-exhale {
    animation: textExhale 12s linear infinite;
}

@keyframes textInhale {
    0%, 3% { opacity: 0; }
    4%, 32% { opacity: 1; }
    33%, 100% { opacity: 0; }
}

@keyframes textHold {
    0%, 32% { opacity: 0; }
    33%, 65% { opacity: 1; }
    66%, 100% { opacity: 0; }
}

@keyframes textExhale {
    0%, 65% { opacity: 0; }
    66%, 95% { opacity: 1; }
    96%, 100% { opacity: 0; }
}

/* Modal Animation */
@keyframes fadeIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.2s ease-out;
}

/* Pulsing Glow for SOS Button */
@keyframes sosGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(249, 115, 115, 0.15), 
                    inset 0 0 20px rgba(249, 115, 115, 0.05);
    }
    50% {
        box-shadow: 0 0 30px rgba(249, 115, 115, 0.25), 
                    inset 0 0 20px rgba(249, 115, 115, 0.1);
    }
}

.sos-pulse {
    animation: sosGlow 2s ease-in-out infinite;
}

/* Smooth transitions */
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: none;
}

/* Custom Scrollbar Styling for Modal Settings */
.custom-scroll {
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    padding-right: 10px;
}

/* Кастомный тонкий скроллбар для Webkit (Chrome, Safari, Edge) */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin: 12px 0; /* Отступ сверху и снизу, чтобы бегунок не заходил на скругления */
}

.custom-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}