/* ================================= */
/* === ОСНОВНЫЕ СТИЛИ === */
/* ================================= */

body, html {
    font-family: 'Inter', sans-serif;
    height: 100%;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: #64748b #334155; 
    overflow-x: hidden;
}

main {
    min-height: 100vh;
    flex: 1;
}

/* ================================= */
/* === КАРТОЧКИ === */
/* ================================= */

.card {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease; 
}

.dark .card {
    background-color: #1f2937;
    border: 1px solid #374151;
}

.card-base {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2.5rem;
}

.card-group-steps .card-base:hover { 
    border-color: #6366F1; 
}

.card-group-benefits .card-base:hover { 
    border-color: #EC4899; 
}

.feature-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark .feature-card {
    background-color: #1E293B;
    border: 1px solid #334155;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.testimonial-card {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
}

.dark .testimonial-card {
    background-color: #1E293B;
    border-color: #334155;
}

.card-title {
    color: #E5E7EB;
    transition: color 0.3s ease;
}

.card-base:hover .card-title {
    color: #6366F1;
}

/* ================================= */
/* === КНОПКИ === */
/* ================================= */

.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-gradient:hover {
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -4px rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #0f172a;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.dark .btn-secondary {
    background-color: #334155;
    color: #f1f5f9;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.dark .btn-secondary:hover {
    background-color: #475569;
}

.btn-gradient-new {
    background: linear-gradient(to right, #6366F1, #EC4899);
    transition: all 0.3s ease;
}

.btn-gradient-new:hover {
    background: linear-gradient(to left, #6366F1, #EC4899);
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-indigo {
    background: linear-gradient(to right, #6366f1, #818cf8);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-indigo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.4);
}

.btn-red {
    background: linear-gradient(to right, #ef4444, #f87171);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.btn-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
}

.upload-btn {
    background: linear-gradient(to right, #6366F1, #EC4899);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.glowing-button {
    color: #8B5CF6;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
    animation: pulse-glow 2s infinite ease-in-out;
}

/* ================================= */
/* === ПЕРЕКЛЮЧАТЕЛИ === */
/* ================================= */

.theme-switch-wrapper {
    align-items: center;
}

.theme-switch {
    height: 24px;
    width: 48px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    background-color: white;
    content: "";
    height: 18px;
    width: 18px;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: #1e293b;
}

.toggle-slider {
    cursor: pointer;
    border-radius: 20px;
    transition: .3s;
    height: 20px;
    width: 40px;
}

@media (min-width: 640px) {
    .toggle-slider {
        height: 24px;
        width: 48px;
    }
}

.toggle-slider:before {
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    height: 14px;
    width: 14px;
}

@media (min-width: 640px) {
    .toggle-slider:before {
        height: 18px;
        width: 18px;
    }
}

input:checked + .toggle-slider {
    background-color: #4f46e5;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

@media (min-width: 640px) {
    input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }
}

/* ================================= */
/* === ЧАТ === */
/* ================================= */

.chat-widget {
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 250px;
    max-width: 90vw;
    max-height: 80vh;
    cursor: move;
    user-select: none;
}

.chat-widget.dragging {
    opacity: 0.8;
    transform: rotate(2deg) scale(1.02);
    transition: none;
    z-index: 9999;
}

.chat-widget.draggable {
    transition: all 0.3s ease;
}

.chat-header {
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #374151;
    background-color: #1f2937;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    cursor: move;
}

.chat-header button {
    cursor: pointer !important;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    gap: 0.5rem;
    background-color: #ffffff;
}

.dark .chat-messages {
    background-color: #111827;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #374151;
    background-color: #1f2937;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.chat-input-container,
.chat-input-container *,
#chat-history,
#chat-input {
    cursor: auto !important;
}

.message-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0.5rem 0;
    opacity: 0;
    transform: translateY(10px);
    animation: slideIn 0.3s forwards;
}

.message-container.sent {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.message-container.received {
    justify-content: flex-start;
}

.message-container.system {
    justify-content: center;
    margin: 1rem 0;
}

.message-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-content {
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.system-message {
    text-align: center;
    font-style: italic;
    color: #9ca3af;
    font-size: 0.875rem;
    padding: 0.5rem;
}

.message-timestamp {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.typing-indicator {
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background-color: #374151;
    border-radius: 1.25rem;
    border-bottom-left-radius: 0.25rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: bounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: -0.4s;
}

.quick-replies {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0;
    border-top: 1px solid #374151;
    background-color: #1f2937;
}

.quick-reply-btn {
    background-color: #374151;
    color: #e5e7eb;
    border: 1px solid #4b5563;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.quick-reply-btn:hover {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.chat-image {
    max-width: 200px;
    border-radius: 8px;
    margin-top: 5px;
}

.resize-handle {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-widget:hover .resize-handle {
    opacity: 0.6;
}

.resize-handle:hover {
    opacity: 1 !important;
    background: rgba(99, 102, 241, 0.5) !important;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ИСПРАВЛЕНИЯ ДЛЯ IPHONE ===== */
@media (max-width: 768px) {
    .chat-widget {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .chat-header {
        flex-shrink: 0 !important;
        border-radius: 0 !important;
        padding-top: max(1rem, env(safe-area-inset-top, 20px)) !important;
    }
    
    .chat-messages {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .chat-input-container {
        flex-shrink: 0 !important;
        border-radius: 0 !important;
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 20px)) !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .chat-input-container input,
    .chat-input-container textarea {
        font-size: 16px !important; /* Предотвращает зум на iOS */
        -webkit-appearance: none !important;
    }
    
    /* Отключаем resize на мобильных */
    .chat-widget {
        resize: none !important;
    }
    
    .resize-handle {
        display: none !important;
    }
    
    /* Блокируем скролл страницы когда чат открыт */
    body.chat-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* ================================= */
/* === УВЕДОМЛЕНИЯ === */
/* ================================= */

.notification {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    will-change: transform, opacity;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-progress {
    animation: progress-bar 5s linear forwards;
}

.notification:hover .notification-progress {
    animation-play-state: paused;
}

.notification .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.dark .notification {
    border-color: rgba(255, 255, 255, 0.1);
}

.support-notification {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 350px;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.support-notification.show {
    transform: translateX(0);
}

.support-notification .notification-header {
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

.support-notification .notification-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    fill: currentColor;
}

.support-notification .notification-body {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.95;
}

.support-notification .notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.support-notification .notification-close:hover {
    opacity: 1;
}

.support-badge {
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.flash-alert {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.alert-fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out;
}

.flash-alert.fade-out {
    animation: fade-out 0.5s forwards 5s;
}

/* ================================= */
/* === АНИМАЦИИ === */
/* ================================= */

.hero-title {
    animation: fadeInDown 1s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.hero-button {
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: both;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animate-fade-in-up {
    animation: fade-in-up 0.4s ease-out forwards;
}

.animate-bounce-in {
    animation: bounce-in 0.6s ease-out forwards;
}

.pulse-dot {
    animation: pulse-glow 2s infinite;
    background: #ffffff;
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.notification-dot {
    animation: pulse 2s infinite;
}

/* ================================= */
/* === KEYFRAMES === */
/* ================================= */

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes progress-bar {
    from { 
        width: 100%; 
        opacity: 0.3;
    }
    to { 
        width: 0%; 
        opacity: 0.1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce-in {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes text-glow-pulse {
    0% {
        text-shadow: 0 0 5px #c084fc, 0 0 10px #c084fc;
        opacity: 0.8;
    }
    50% {
        text-shadow: 0 0 15px #c084fc, 0 0 25px #c084fc;
        opacity: 1;
    }
    100% {
        text-shadow: 0 0 5px #c084fc, 0 0 10px #c084fc;
        opacity: 0.8;
    }
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

@keyframes glow {
    from { 
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.5); 
    }
    to { 
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 0 30px rgba(99, 102, 241, 0.4); 
    }
}

@keyframes pulse-glow {
    0%, 100% {
        color: #8B5CF6;
        text-shadow: 0 0 8px rgba(167, 139, 250, 1);
        transform: scale(1);
    }
    50% {
        color: #8B5CF6; 
        text-shadow: 0 0 20px rgb(134, 48, 247);
        transform: scale(1.01);
    }
}

/* ================================= */
/* === ИКОНКИ И ЭФФЕКТЫ === */
/* ================================= */

.feature-icon {
    margin: 0 auto 1.5rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.step-number {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.gradient-icon-1 {
    background: linear-gradient(to bottom right, #10B981, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-icon-2 {
    background: linear-gradient(to bottom right, #F59E0B, #EF4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-icon-3 {
    background: linear-gradient(to bottom right, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-icon-4 {
    background: linear-gradient(to bottom right, #34D399, #1D4ED8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-icon-5 {
    background: linear-gradient(to bottom right, #F9A8D4, #F472B6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-icon-6 {
    background: linear-gradient(to bottom right, #60A5FA, #818CF8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-icon-7 {
    background: linear-gradient(to bottom right, #D8B4FE, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text {
    color: inherit;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .gradient-text {
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.2);
}

.gradient-text-main {
    background: linear-gradient(135deg, #a8eb12 0%, #00bf72 50%, #008793 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.3s ease, border 0.3s ease;
}

.dark .glass-effect {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.online-badge {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-radius: 20px;
    transition: all 0.3s ease;
}

/* ================================= */
/* === ТАБЫ И ИНТЕРФЕЙС === */
/* ================================= */

.tab-content {
    animation: fadeIn 0.5s ease-in-out;
}

.tab-button {
    transition: all 0.3s ease-in-out;
}

.tab-button.tab-highlight {
    color: #c084fc !important;
    text-shadow: 0 0 10px #c084fc, 0 0 20px #c084fc;
    animation: text-glow-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.payment-tab {
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: none;
    background-color: transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-grow: 1;
    width: 50%;
}

.dark .payment-tab {
    color: #9ca3af;
}

.payment-tab.active-tab {
    background-color: white;
    color: #111827;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.dark .payment-tab.active-tab {
    background-color: #111827;
    color: white;
}

.desktop-tab {
    transition: all 0.2s ease;
}

.desktop-tab.active {
    border-bottom: 3px solid #8b5cf6;
}

.mobile-tab-option:active {
    background-color: rgba(99, 102, 241, 0.1);
}

#mobile-tabs-dropdown {
    animation: slideDown 0.2s ease;
}

#mobile-chevron {
    transition: transform 0.2s ease;
}

/* ================================= */
/* === ФОРМЫ И ВАЛИДАЦИЯ === */
/* ================================= */

.field-valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.field-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-weak { 
    background-color: #ef4444; 
    width: 25%; 
}

.strength-medium { 
    background-color: #f59e0b; 
    width: 50%; 
}

.strength-good { 
    background-color: #3b82f6; 
    width: 75%; 
}

.strength-strong { 
    background-color: #10b981; 
    width: 100%; 
}

.captcha-container {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    user-select: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark .captcha-container {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border-color: #6b7280;
}

.captcha-container:hover {
    border-color: #6366f1;
    transform: scale(1.02);
}

.captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #374151;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    letter-spacing: 3px;
}

.dark .captcha-text {
    color: #e5e7eb;
}

.custom-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #6366f1;
    border-radius: 3px;
    background-color: transparent;
    cursor: pointer;
    flex-shrink: 0;
    /* Убираем margin-top: 2px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

.custom-checkbox:checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    margin-top: -1px; /* Небольшая корректировка для центрирования галочки */
}

.dark .custom-checkbox {
    border-color: #6366f1;
}

.dark .custom-checkbox:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* ================================= */
/* === МОДАЛЬНЫЕ ОКНА И OVERLAY === */
/* ================================= */

.modal {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
    animation: modal-appear 0.3s ease-out;
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-transition {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.modal-transition.hidden {
    opacity: 0;
    transform: scale(0.95);
}

.modal-transition.show {
    opacity: 1;
    transform: scale(1);
}

.modal-overlay {
    backdrop-filter: blur(8px);
}

.menu-overlay {
    backdrop-filter: blur(8px);
    background: rgba(26, 32, 44, 0.9);
}

.mobile-menu-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.dark .mobile-menu-overlay {
    background-color: #0f172a;
}

/* ================================= */
/* === МЕНЮ И НАВИГАЦИЯ === */
/* ================================= */

.menu-panel {
    background: #2d3748;
    border: 1px solid #4a5568;
}

.menu-item {
    transition: all 0.2s ease;
    border-radius: 8px;
}

.menu-item:hover {
    background: #20242b;
    transform: translateX(4px);
}

/* ================================= */
/* === DROP ZONES === */
/* ================================= */

.drop-zone.drag-over label {
    background-color: rgb(99 102 241 / 0.1);
    border-color: rgb(99 102 241);
}

.dark .drop-zone.drag-over label {
    background-color: rgb(99 102 241 / 0.2);
    border-color: rgb(129 140 248);
}

.drop-area {
    border: 2px dashed #4B5563;
    background-color: #111827;
    transition: border-color 0.3s, background-color 0.3s;
}

.drop-area.hover {
    border-color: #6366F1;
    background-color: #1D2635;
}

/* ================================= */
/* === HERO SECTION === */
/* ================================= */

.hero-section {
    background: linear-gradient(135deg, #051937 0%, #004d7a 25%, #008793 50%, #00bf72 75%, #a8eb12 100%);
}

/* ================================= */
/* === SWIPER === */
/* ================================= */

.custom-swiper-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #4f46e5;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 18px;
    transition: all 0.3s ease;
}

.custom-swiper-btn:hover {
    background: #4338ca;
    transform: scale(1.1);
}

.custom-swiper-btn::after {
    font-size: 18px !important;
}

.swiper-pagination-bullet {
    background: #6366f1 !important;
    width: 12px !important;
    height: 12px !important;
}

.swiper-button-prev, .swiper-button-next {
    color: #6366f1 !important;
    font-weight: bold !important;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ================================= */
/* === PROSE И СТАТЬИ === */
/* ================================= */

.prose {
    line-height: 1.75;
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
}

.prose p, .prose ul, .prose blockquote {
    margin-bottom: 1.25em;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1rem;
}

.prose blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 1rem;
    font-style: italic;
    color: #64748b;
}

.dark .prose blockquote {
    border-left-color: #475569;
    color: #94a3b8;
}

/* ================================= */
/* === СКРОЛЛБАРЫ === */
/* ================================= */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(150, 150, 150, 0.4);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(150, 150, 150, 0.7);
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(150,150,150,0.4) transparent;
}

#modal-notification-list::-webkit-scrollbar,
.max-h-96::-webkit-scrollbar,
.max-h-80::-webkit-scrollbar,
.chat-history::-webkit-scrollbar,
#chat-history::-webkit-scrollbar {
    width: 8px;
}

#modal-notification-list::-webkit-scrollbar-track,
.max-h-96::-webkit-scrollbar-track,
.max-h-80::-webkit-scrollbar-track,
.chat-history::-webkit-scrollbar-track,
#chat-history::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

#modal-notification-list::-webkit-scrollbar-thumb,
.max-h-96::-webkit-scrollbar-thumb,
.max-h-80::-webkit-scrollbar-thumb,
.chat-history::-webkit-scrollbar-thumb,
#chat-history::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.dark #modal-notification-list::-webkit-scrollbar-thumb,
.dark .max-h-96::-webkit-scrollbar-thumb,
.dark .max-h-80::-webkit-scrollbar-thumb,
.dark .chat-history::-webkit-scrollbar-thumb,
.dark #chat-history::-webkit-scrollbar-thumb {
    background: #475569;
}

#modal-notification-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.dark #modal-notification-list {
    scrollbar-color: #475569 transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark html::-webkit-scrollbar-track,
.dark body::-webkit-scrollbar-track {
    background: #334155;
}

.dark html::-webkit-scrollbar-thumb,
.dark body::-webkit-scrollbar-thumb {
    background: #64748b;
}

.dark html::-webkit-scrollbar-thumb:hover,
.dark body::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ================================= */
/* === УТИЛИТЫ === */
/* ================================= */

.transition-colors {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.transition-shadow {
    transition: box-shadow 0.2s ease;
}

.rotate-180 {
    transform: rotate(180deg);
}

#file-btn {
    cursor: pointer;
}

#card-brand-icon {
    transition: opacity 0.2s ease-in-out;
    height: 35px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ================================= */
/* === АДАПТИВНОСТЬ === */
/* ================================= */

@media (max-width: 768px) {
    .card {
        padding: 1rem;
    }

    #card-brand-icon {
        height: 28px;
    }

    body {
        font-size: 15px;
    }

    .payment-tab {
        padding: 0.4rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .custom-swiper-btn {
        width: 36px;
        height: 36px;
        background: rgba(79, 70, 229, 0.6);
        font-size: 16px;
    }

    .shadow-2xl, .shadow-lg {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                    0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    }
}

@media (max-width: 640px) {
    .text-2xl { 
        font-size: 1.25rem; 
    }
    
    .text-xl { 
        font-size: 1.125rem; 
    }

    button {
        min-height: 44px;
    }

    .mobile-container {
        padding: 8px !important;
        margin-top: 8px !important;
    }
    
    .mobile-form {
        padding: 16px !important;
        border-radius: 16px !important;
        margin: 0 !important;
    }
    
    .mobile-title {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    
    .mobile-subtitle {
        font-size: 16px !important;
        margin-top: 8px !important;
        margin-bottom: 16px !important;
    }
    
    .mobile-input {
        padding: 14px 12px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }
    
    .mobile-button {
        padding: 16px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        margin-top: 8px !important;
    }
    
    .captcha-container {
        padding: 12px !important;
        margin: 8px 0 !important;
    }
    
    .captcha-text {
        font-size: 18px !important;
        letter-spacing: 1.5px !important;
    }
    
    .mobile-modal {
        margin: 8px !important;
        padding: 16px !important;
        max-height: 95vh !important;
        border-radius: 16px !important;
    }
    
    .mobile-modal-content {
        max-height: 70vh !important;
        font-size: 13px !important;
    }
    
    .mobile-checkbox-label {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }
    
    .mobile-link {
        font-size: 13px !important;
        margin-top: 16px !important;
        margin-bottom: 32px !important;
    }
    
    .form-field-spacing {
        margin-bottom: 14px !important;
    }
    
    .form-header {
        margin-bottom: 16px !important;
    }
    
    .logo-icon {
        width: 24px !important;
        height: 24px !important;
    }
}

@media (max-width: 375px) {
    .mobile-container {
        padding: 4px !important;
        margin-top: 4px !important;
    }
    
    .mobile-form {
        padding: 12px !important;
    }
    
    .mobile-title {
        font-size: 18px !important;
    }
    
    .mobile-subtitle {
        font-size: 14px !important;
    }
    
    .captcha-text {
        font-size: 16px !important;
        letter-spacing: 1px !important;
    }
    
    .mobile-modal {
        margin: 4px !important;
        padding: 12px !important;
    }
    
    .mobile-input {
        padding: 12px 10px !important;
    }
    
    .form-field-spacing {
        margin-bottom: 12px !important;
    }
    
    .footer-link {
        font-size: 12px !important;
        padding: 0.75rem 0.5rem 1rem !important;
    }
}

@media (min-width: 641px) {
    .form-field-spacing {
        margin-bottom: 24px !important;
    }
    
    .captcha-container {
        margin: 16px 0 !important;
    }
    
    .mobile-button {
        margin-top: 16px !important;
    }
    
    .mobile-link {
        margin-top: 24px !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .mobile-input:focus {
        transform: none !important;
    }
    
    .captcha-container:active {
        transform: scale(0.98) !important;
    }
    
    .mobile-button:active {
        transform: translateY(1px) !important;
    }
}

@media print {
    body { 
        background: white !important; 
    }
    
    .no-print { 
        display: none !important; 
    }
}

/* ================================= */
/* === ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ === */
/* ================================= */

.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    background-color: white;
    bottom: 3px;
    content: "";
    height: 18px;
    left: 3px;
    position: absolute;
    transition: .3s;
    width: 18px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider:before {
    transform: translateX(26px);
    background-color: #1e293b;
}

.toggle-slider {
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    transition: .3s;
    height: 20px;
    width: 40px;
}

@media (min-width: 640px) {
    .toggle-slider {
        height: 24px;
        width: 48px;
    }
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (min-width: 640px) {
    .toggle-slider:before {
        height: 18px;
        width: 18px;
    }
}

input:checked + .toggle-slider {
    background-color: #4f46e5;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

@media (min-width: 640px) {
    input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }
}

.cookie-toggle {
    position: relative;
    display: inline-block;
}

