/* Убираем все отступы */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    padding-top: 0 !important;
    margin-top: 0 !important;
    background: #f5f5f5;
    min-height: auto;
    position: relative;
    overflow-x: hidden;
}

/* Стили для контейнера */
.container {
    max-width: 800px;
    margin: 0 auto;
    margin-top: 0;
    background: linear-gradient(135deg, #e6f3e6 0%, #f0f8e6 30%, #e6f0e6 70%, #f0f8e6 100%);
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    min-height: 98vh;
}

/* Фон: молния + тёплое зарево */
.bg-lightning {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px;
}

.bg-glow {
    position: absolute;
    inset: -8%;
    transform-origin: center center;
    background:
        radial-gradient(circle at 50% 46%,
            rgba(255, 72, 8, 0.88) 0%,
            rgba(255, 110, 18, 0.62) 16%,
            rgba(255, 150, 36, 0.40) 34%,
            rgba(255, 186, 64, 0.22) 52%,
            rgba(255, 210, 110, 0.10) 70%,
            rgba(255, 224, 150, 0.04) 84%,
            transparent 100%),
        linear-gradient(160deg,
            rgba(255, 168, 64, 0.28) 0%,
            rgba(255, 96, 24, 0.16) 45%,
            rgba(255, 176, 72, 0.22) 100%);
    animation: glowPulse 2.2s ease-in-out infinite;
}

.bg-lightning svg {
    position: relative;
    z-index: 1;
    width: 165%;
    max-width: none;
    height: 92%;
    fill: #f6b22a;
    stroke: #e08e00;
    stroke-width: 1.2;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 48px rgba(255, 196, 40, 0.65));
    transform-origin: center center;
    animation: lightningPulse 2.2s ease-in-out infinite;
}

@keyframes lightningPulse {
    0%, 100% { transform: scale(0.78); opacity: 0.32; }
    50% { transform: scale(1.12); opacity: 0.78; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.12; transform: scale(0.86); }
    50% { opacity: 1; transform: scale(1.12); }
}

/* Стили заголовка из aistyles.css */
.top-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    width: 100%;
    text-align: center;
    box-shadow: none;
    border-radius: 0;
    cursor: default;
    box-sizing: border-box;
    
    /* На больших экранах - скругления только сверху */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    
    /* Фиксированное позиционирование */
    position: fixed !important;
    top: 0;
    z-index: 1000;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    
    /* Адаптивная ширина и позиционирование */
    width: min(800px, calc(100% - 40px));
    max-width: calc(100% - 40px);
    left: 50%;
    transform: translateX(-50%);
}

.header-back {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: none;
    background: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.header-back:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-back svg {
    display: block;
}

.header-center {
    flex: 1;
    text-align: center;
    min-width: 0;
    padding-right: 40px;
    pointer-events: none;
}

.header-sub {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.92;
    margin-top: 2px;
    letter-spacing: 0.03em;
}

.top-panel-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    cursor: default;
    pointer-events: none;
}

.header-google-mark {
    display: inline;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    margin-left: 6px;
    opacity: 0.88;
    text-transform: lowercase;
    vertical-align: middle;
}

.google-captcha-switch {
    margin: 10px auto 4px;
    max-width: 340px;
    text-align: center;
}

.google-captcha-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #3c4043;
    background: #fff;
    border: 2px solid #4285f4;
    box-shadow: 0 3px 12px rgba(66, 133, 244, 0.22);
}

.google-captcha-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(66, 133, 244, 0.32);
}

.google-captcha-btn .g-mark {
    font-weight: 800;
    background: linear-gradient(90deg, #4285f4, #ea4335, #fbbc05, #34a853);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.yandex-captcha-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #3c4043;
    background: #fff;
    border: 2px solid #fc3f1d;
    box-shadow: 0 3px 12px rgba(252, 63, 29, 0.20);
}

.yandex-captcha-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(252, 63, 29, 0.30);
}

.yandex-captcha-btn .y-mark {
    font-weight: 800;
    color: #fc3f1d;
}

.container-content {
    padding: 10px;
    padding-top: 82px;
    position: relative;
    z-index: 1;
}

.result-info {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.result-error {
    font-size: 24px;
    color: #dc3545;
    line-height: 1.6;
    text-align: center;
    padding: 20px;
    background-color: #f8d7da;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    font-weight: bold;
}

.result-error.blocked {
    font-size: 32px;
    color: #721c24;
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
    padding: 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#digital-clock {
    margin: 20px 0;
}

.clock-display {
    font-family: 'Courier New', monospace;
    font-size: 48px;
    font-weight: bold;
    color: #dc3545;
    text-align: center;
    background: #000;
    color: #00ff00;
    padding: 15px 25px;
    border-radius: 10px;
    border: 2px solid #333;
    display: inline-block;
    min-width: 200px;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    animation: clockPulse 2s infinite;
}

@keyframes clockPulse {
    0% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 0, 0.6); }
    100% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.3); }
}

.colon {
    animation: colonBlink 1s infinite;
}

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

/* Дополнительные стили специфичные для login_cabinet.php */
.form-group {
    margin-bottom: 10px;
}

#passwordHints + .form-group {
    margin-bottom: 6px;
}

#passwordHints + .form-group .input-fields-container {
    margin: 8px auto;
}

#passwordHints ~ .virtual-keyboard {
    margin-top: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.form-group input[type="text"], 
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.phone-display {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.phone-display h3 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 16px;
}

.phone-number {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.support-message {
    display: block;
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    border: 2px solid #007bff;
    transition: all 0.3s;
    cursor: pointer;
}

.support-message:hover {
    background-color: #e3f2fd;
    text-decoration: none;
    color: #333;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.support-message:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.support-message .phone {
    color: #007bff;
    font-weight: bold;
    display: block;
    margin-top: 8px;
    font-size: 18px;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-rounded {
    border-radius: 50px !important;
}

.btn-narrow {
    flex: 0 0 auto;
    min-width: 140px;
    padding: 12px 16px;
}

.combined-phone-container {
    background-color: #e3f2fd;
    padding: 8px 12px;
    border: 2px solid #007bff;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    animation: bluePulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 10px;
}

.combined-phone-container:hover {
    background-color: #bbdefb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.container-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.container-text {
    flex: 1;
    text-align: left;
}

.header-text {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 2px;
}

.container-content-text {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.2;
}

.combined-phone-container .header-text {
    color: #0056b3;
}

.combined-phone-container .container-content-text {
    color: #004085;
}

.support-message-compact .header-text {
    color: #c62828;
}

.support-message-compact .container-content-text {
    color: #b71c1c;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.support-sign {
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.03em;
    opacity: 0.65;
    text-transform: lowercase;
}

.support-message-compact .container-icon {
    color: #c62828;
    font-size: 0;
    display:flex;
    align-items:center;
    justify-content:center;
}

.support-message-compact .container-icon img {
    width:40px;
    height:40px;
    transform: rotate(10deg);
    filter: invert(10%) sepia(100%) saturate(4000%) hue-rotate(350deg) brightness(85%) contrast(120%);
}

@media (max-width:768px){
    .support-message-compact .container-icon img{width:36px;height:36px;}
}
@media (max-width:400px){
    .support-message-compact .container-icon img{width:32px;height:32px;}
}

#passwordHints .support-message-compact {
    margin-bottom: 6px;
}

#passwordHints .support-message-compact:last-child {
    margin-bottom: 4px;
}

.support-message-compact {
    background-color: #ffebee;
    padding: 8px 12px;
    border: 2px solid #f44336;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    animation: redPulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.support-message-compact:hover {
    background-color: #ffcdd2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
    text-decoration: none;
}

.support-miranda {
    background-color: #f3e5f5;
    border-color: #9c27b0;
    animation: purplePulse 2s infinite;
}

.support-miranda .header-text {
    color: #6a1b9a;
}

.support-miranda .container-content-text {
    color: #7b1fa2;
}

.support-miranda .support-phone-num {
    color: #9c27b0;
    text-shadow:
        0 0 6px rgba(206, 147, 216, 0.95),
        0 0 14px rgba(156, 39, 176, 0.75),
        0 0 24px rgba(123, 31, 162, 0.45);
}

.support-miranda .container-icon img {
    filter: invert(18%) sepia(80%) saturate(2800%) hue-rotate(265deg) brightness(90%) contrast(110%);
}

.support-miranda:hover {
    background-color: #e1bee7;
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.35);
}

@keyframes purplePulse {
    0% {
        border-color: #ab47bc;
        box-shadow: 0 0 0 0 rgba(156, 39, 176, 0.45);
        background-color: #f3e5f5;
    }
    50% {
        border-color: #7b1fa2;
        box-shadow: 0 0 0 8px rgba(156, 39, 176, 0);
        background-color: #e1bee7;
    }
    100% {
        border-color: #ab47bc;
        box-shadow: 0 0 0 0 rgba(156, 39, 176, 0);
        background-color: #f3e5f5;
    }
}

@keyframes redPulse {
    0% { 
        border-color: #f44336; 
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4);
        background-color: #ffebee;
    }
    50% { 
        border-color: #d32f2f; 
        box-shadow: 0 0 0 8px rgba(244, 67, 54, 0);
        background-color: #ffcdd2;
    }
    100% { 
        border-color: #f44336; 
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
        background-color: #ffebee;
    }
}

/* Связь устройства, отвечающего по номеру: «в сети» / «7 ч назад». */
.support-dev-state {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 1px 7px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
}

.support-dev-state.offline {
    background: rgba(97, 97, 97, 0.14);
    color: #616161;
}

/* Устройство не в сети — блок мерцает серым, а не цветом (перекрывает и красный, и «миранду»). */
.support-message-compact.dev-offline,
.support-message-compact.support-miranda.dev-offline {
    background-color: #f5f5f5;
    border-color: #bdbdbd;
    animation: greyPulse 2s infinite;
}

.support-message-compact.dev-offline:hover {
    background-color: #eeeeee;
    box-shadow: 0 2px 8px rgba(97, 97, 97, 0.25);
}

.support-message-compact.dev-offline .header-text,
.support-message-compact.dev-offline .container-content-text,
.support-message-compact.dev-offline .container-icon {
    color: #757575;
}

.support-message-compact.dev-offline .support-phone-num {
    color: #616161;
    text-shadow: none;
}

.support-message-compact.dev-offline .container-icon img {
    filter: grayscale(1) opacity(0.55);
}

@keyframes greyPulse {
    0% {
        border-color: #bdbdbd;
        box-shadow: 0 0 0 0 rgba(117, 117, 117, 0.35);
        background-color: #f5f5f5;
    }
    50% {
        border-color: #9e9e9e;
        box-shadow: 0 0 0 8px rgba(117, 117, 117, 0);
        background-color: #e0e0e0;
    }
    100% {
        border-color: #bdbdbd;
        box-shadow: 0 0 0 0 rgba(117, 117, 117, 0);
        background-color: #f5f5f5;
    }
}

.input-fields-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
}

.phone-fields-container {
    gap: 2px;
}

.password-fields-container {
    gap: 10px;
}

.input-field {
    border: 2px solid #eee !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: bold !important;
    color: #333 !important;
    background-color: #f8f9fa !important;
    transition: all 0.3s !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: none !important;
    cursor: default !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}

.phone-field {
    width: 44px !important;
    height: 52px !important;
    font-size: 32px !important;
    line-height: 52px !important;
    border: 2px solid #eee !important;
}

.password-field {
    width: 60px !important;
    height: 70px !important;
    font-size: 42px !important;
    line-height: 70px !important;
}

.input-field:focus {
    outline: none;
}

.input-field.active {
    border-color: #007bff;
    background-color: #e3f2fd;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.input-field.filled {
    background-color: #f0f8f0 !important;
    border-color: #c8e6c9 !important;
}

.phone-field.filled {
    background-color: #f9fbff !important;
    border-color: #d6e7ff !important;
}

.phone-prefix, .phone-separator {
    font-size: 32px;
    font-weight: 900;
    color: #000 !important;
    margin: 0 2px;
}

.input-hint {
    text-align: center;
    margin: 15px auto 20px;
    font-size: 22px !important;
    color: #333;
    font-weight: 700 !important;
    animation: hintPulse 1.5s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes hintPulse {
    0% { 
        opacity: 0.7;
        transform: scale(1);
        color: #333;
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
        color: #007bff;
    }
    100% { 
        opacity: 0.7;
        transform: scale(1);
        color: #333;
    }
}

.password-field svg, .phone-field svg {
    margin-top: -2px;
}

.password-field svg {
    width: 32px !important;
    height: 32px !important;
}

.phone-field svg {
    width: 24px !important;
    height: 24px !important;
}

.virtual-keyboard {
    margin: 25px auto;
    padding: 20px;
    background: linear-gradient(135deg, 
        #e8f4f8 0%, 
        #d6e9f7 10%, 
        #c8dff6 20%, 
        #b8d4f5 30%, 
        #a8c9f4 40%, 
        #9abef3 50%, 
        #8cb3f2 60%, 
        #7ea8f1 70%, 
        #709df0 80%, 
        #6292ef 90%, 
        #5487ee 100%);
    border-radius: 15px;
    border: 2px solid #5487ee;
    display: grid;
    grid-template-columns: repeat(4, 65px);
    gap: 10px;
    justify-content: center;
    max-width: 340px;
    box-shadow: 0 4px 12px rgba(84, 135, 238, 0.25);
}

.keyboard-row {
    display: contents;
}

.keyboard-btn {
    width: 65px;
    height: 65px;
    border: 2px solid #007bff;
    border-radius: 12px;
    background-color: white;
    color: #007bff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyboard-btn:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.keyboard-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
}

.keyboard-btn-pressed {
    background-color: #0056b3 !important;
    color: white !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4) !important;
}

.keyboard-backspace {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.keyboard-backspace:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.keyboard-backspace.keyboard-btn-pressed {
    background-color: #004085 !important;
    border-color: #004085 !important;
}

.keyboard-clear-all {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.keyboard-clear-all:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.keyboard-clear-all.keyboard-btn-pressed {
    background-color: #bd2130 !important;
    border-color: #bd2130 !important;
}

@keyframes bluePulse {
    0% { 
        border-color: #007bff; 
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
        background-color: #e3f2fd;
    }
    50% { 
        border-color: #0056b3; 
        box-shadow: 0 0 0 8px rgba(0, 123, 255, 0);
        background-color: #bbdefb;
    }
    100% { 
        border-color: #007bff; 
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
        background-color: #e3f2fd;
    }
}

.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 92%;
    overflow: visible;
    animation: modalShow 0.25s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 20px;
    text-align: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.modal-body .captcha-container {
    margin: 0;
    text-align: left;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.modal-body .g-recaptcha {
    transform-origin: 0 0;
}

#captcha-container {
    width: 100%;
    max-width: 320px;
    min-height: 100px;
    margin: 0 auto;
}

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

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
}

.password-toggle:hover {
    color: #333;
}

.captcha-container {
    margin: 10px 0 10px 0;
    text-align: left;
}

.action-buttons {
    display: none;
    margin-top: 20px;
}

.action-buttons.show {
    display: block;
}

/* Мобильные стили */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        height: auto;
    }
    
    body {
        padding: 0;
        background: #f5f5f5;
        min-height: auto;
        position: relative;
        overflow-x: hidden;
        padding-top: 0;
    }
    
    .top-panel-header {
        position: fixed !important;
        top: 0;
        left: 0;
        transform: none;
        max-width: none;
        width: 100%;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        padding: 6px 8px;
        margin: 0;
    }
    
    .top-panel-title {
        font-size: 18px;
    }

    .header-sub {
        font-size: 10px;
        letter-spacing: 0.01em;
    }

    .header-center {
        padding-right: 40px;
    }
    
    .container {
        margin: 0;
        margin-top: 0;
        padding: 0;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: linear-gradient(135deg, #e6f3e6 0%, #f0f8e6 30%, #e6f0e6 70%, #f0f8e6 100%);
        position: relative;
        overflow: hidden;
        min-height: 93vh;
    }
    
    .bg-lightning {
        border-radius: 0;
    }
    
    .container-content {
        padding: 8px;
        padding-top: 68px;
    }
    
    .result-error {
        font-size: 20px;
    }
    
    .result-error.blocked {
        font-size: 28px;
        padding: 25px;
    }
    
    .clock-display {
        font-size: 36px;
        padding: 12px 20px;
        min-width: 180px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .phone-field {
        width: 32px !important;
        height: 38px !important;
        font-size: 22px !important;
        line-height: 38px !important;
        border: 2px solid #f0f0f0 !important;
    }
    
    .password-field {
        width: 40px !important;
        height: 50px !important;
        font-size: 28px !important;
        line-height: 50px !important;
    }
    
    .phone-field svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .password-field svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .phone-fields-container {
        gap: 1px;
    }
    
    .password-fields-container {
        gap: 4px;
    }
    
    .phone-prefix, .phone-separator {
        font-size: 22px;
        font-weight: 900;
        margin: 0;
        color: #000 !important;
    }
    
    .input-hint {
        font-size: 20px !important;
        margin: 10px auto 15px;
    }
    
    .header-text {
        font-size: 16px !important;
    }
    
    .container-content-text {
        font-size: 20px !important;
    }
    
    .keyboard-btn {
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
    
    .support-message-compact .container-icon {
        font-size: 36px;
        -webkit-filter: hue-rotate(320deg) saturate(1.5) brightness(0.8);
        filter: hue-rotate(320deg) saturate(1.5) brightness(0.8);
    }
    
    .virtual-keyboard {
        padding: 12px;
        margin: 10px auto;
        grid-template-columns: repeat(4, 55px);
        gap: 6px;
        max-width: 300px;
        background: linear-gradient(135deg, 
            #e8f4f8 0%, 
            #d6e9f7 10%, 
            #c8dff6 20%, 
            #b8d4f5 30%, 
            #a8c9f4 40%, 
            #9abef3 50%, 
            #8cb3f2 60%, 
            #7ea8f1 70%, 
            #709df0 80%, 
            #6292ef 90%, 
            #5487ee 100%);
        border: 2px solid #5487ee;
        box-shadow: 0 4px 12px rgba(84, 135, 238, 0.25);
    }
}

/* Для очень маленьких экранов */
@media (max-width: 400px) {
    .container {
        min-height: 88vh !important;
    }
    
    .modal-content {
        max-width: 95%;
        width: 95%;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-body .g-recaptcha {
        transform: scale(1.0);
        transform-origin: 0 0;
        margin-left: -3px;
    }
    
    .phone-field {
        width: 28px !important;
        height: 34px !important;
        font-size: 20px !important;
        line-height: 34px !important;
        border: 2px solid #f0f0f0 !important;
    }
    
    .password-field {
        width: 35px !important;
        height: 45px !important;
        font-size: 24px !important;
        line-height: 45px !important;
    }
    
    .phone-field svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    .password-field svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .phone-fields-container {
        gap: 0px !important;
    }
    
    .password-fields-container {
        gap: 3px !important;
    }
    
    .phone-prefix, .phone-separator {
        font-size: 20px;
        font-weight: 900;
        margin: 0;
        color: #000 !important;
    }
    
    .input-hint {
        font-size: 18px !important;
        margin: 8px auto 12px;
    }
    
    .header-text {
        font-size: 15px !important;
    }
    
    .container-content-text {
        font-size: 19px !important;
    }
    
    .support-message-compact .container-icon {
        font-size: 32px;
        -webkit-filter: hue-rotate(320deg) saturate(1.5) brightness(0.8);
        filter: hue-rotate(320deg) saturate(1.5) brightness(0.8);
    }
}

@media (max-width: 350px) {
    .modal-body .g-recaptcha {
        transform: scale(0.95);
        transform-origin: 0 0;
        margin-left: -9px;
    }
}

/* === ПЛАВАЮЩИЕ КНОПКИ === */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

.floating-btn {
    background-color: #0066cc;
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.4);
    opacity: 0.7;
    visibility: hidden;
    transform: translateY(20px);
}

.floating-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-btn:hover {
    background-color: #0052a3;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.6);
    opacity: 1.0;
}

.floating-btn:active {
    background-color: #003d7a;
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 102, 204, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.4);
}

.floating-btn .arrow-left-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.floating-btn .home-icon {
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9,22 9,12 15,12 15,22'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Кнопки "НАЗАД" и "ДОМОЙ" (всегда видимы) */
.floating-always-visible {
    opacity: 0.7 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Мобильные стили для плавающих кнопок */
@media (max-width: 768px) {
    .floating-buttons {
        right: 15px;
        bottom: 75px;
        gap: 12px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        border-radius: 25px;
    }
    
    .floating-btn .arrow-left-icon,
    .floating-btn .home-icon {
        width: 20px;
        height: 20px;
    }
} 

/* === Viewport height fix for mobile browsers and PWA === */
:root {
    /* Small viewport height (accounts for browser UI) */
    --container-vh: 100svh;
}

@media (display-mode: standalone) {
    :root {
        /* Dynamic viewport height in standalone (PWA) */
        --container-vh: 100dvh;
    }
}

/* Override min-height to use JS-calculated viewport height */
.container {
    min-height: var(--app-height, 98vh);
}

@media (max-width: 768px) {
    .container {
        min-height: var(--app-height, 93vh);
    }
}

@media (max-width: 400px) {
    .container {
        min-height: var(--app-height, 88vh) !important;
    }
} 

.support-message-compact .phone-svg {
} 

/* Увеличиваем класс support-phone-icon */
.support-phone-icon {
    width:48px;
    height:48px;
    -webkit-filter: invert(10%) sepia(100%) saturate(4000%) hue-rotate(350deg) brightness(85%) contrast(120%);
    filter: invert(10%) sepia(100%) saturate(4000%) hue-rotate(350deg) brightness(85%) contrast(120%);
    transform: rotate(10deg);
    transition: transform 0.3s ease;
}

/* Адаптивные размеры для иконки телефона */
@media (max-width: 768px) {
    .support-phone-icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 400px) {
    .support-phone-icon {
        width: 40px;
        height: 40px;
    }
} 