        * { margin: 0; padding: 0; box-sizing: border-box; }
        html, body { height: 100%; overflow-x: hidden; width: 100%; }
        body {
            font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f4f7fc;
            color: #1e2a3a;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('/img/delweb_v2_sm.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            opacity: 0.1;
            z-index: -1;
            pointer-events: none;
        }
        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 20px;
            flex: 1;
            width: 100%;
            overflow-x: hidden;
            display: flex;
            flex-direction: column;
        }
        header {
            background: rgba(255, 255, 255, 0.9);
            padding: 16px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            margin-bottom: 5px;
            border-radius: 16px;
        }
        .logo-wrapper {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .header-logo {
            height: 50px;
            width: auto;
            display: block;
        }
        .logo-text {
            font-size: 0.9rem;
            font-weight: 400;
            color: #1e2a3a;
        }
        .logo-text span {
            display: block;
            font-size: 0.7rem;
            color: #4b5563;
        }
        .auth-buttons-desktop {
            display: none;
        }
        .auth-buttons-desktop button {
            border: 1px solid #3b82f6;
            background: white;
            padding: 8px 18px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .auth-buttons-desktop {
            display: none;
        }

        .auth-buttons-desktop button:first-child { background: #3b82f6; color: white; border: none; }
        .auth-buttons-desktop button:hover { opacity: 0.9; transform: scale(0.98); }
        .mobile-menu-btn {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #1e2a3a;
            padding: 8px;
            display: flex;          /* или block, но flex для центрирования */
            align-items: center;
            justify-content: center;
        }
        .mobile-menu-overlay {
            position: fixed;
            top: 0;
            right: -100%;
            width: 80%;
            max-width: 300px;
            height: 100%;
            background: white;
            box-shadow: -2px 0 10px rgba(0,0,0,0.1);
            z-index: 1001;
            transition: right 0.3s ease;
            display: flex;
            flex-direction: column;
            padding: 20px;
        }
        .mobile-menu-overlay.active { right: 0; }
        .mobile-menu-header { display: flex; justify-content: flex-end; margin-bottom: 30px; }
        .mobile-menu-close { background: none; border: none; font-size: 28px; cursor: pointer; color: #1e2a3a; }
        .mobile-menu-buttons { display: flex; flex-direction: column; gap: 15px; }
        .mobile-menu-buttons button {
            padding: 12px;
            border-radius: 10px;
            font-size: 1rem;
            cursor: pointer;
        }
        .mobile-menu-buttons button:first-child { background: #3b82f6; color: white; border: none; }
        .mobile-menu-buttons button:last-child { background: white; border: 1px solid #3b82f6; color: #3b82f6; }
        .mobile-menu-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            display: none;
        }
        .mobile-menu-backdrop.active { display: block; }
        .upload-area {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(2px);
            border: 2px dashed #cbd5e1;
            border-radius: 20px;
            padding: 48px;
            text-align: center;
            cursor: pointer;
            margin: 20px 0;
            transition: all 0.2s;
            word-break: break-word;
            min-height: 20vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: 1.1rem;
            line-height: 1.4;
        }
        .upload-area strong:first-child {
            font-size: 2rem;
            color: #1e3a8a;
            display: block;
        }
        .upload-area strong:nth-child(2) {
            font-size: 1.5rem;
            color: #3b82f6;
            display: block;
        }
        .upload-area.dragover { border-color: #3b82f6; background: rgba(239, 246, 255, 0.9); }
        .file-list-container {
            position: relative;
            width: 100%;
            margin: 20px 0;
        }
        .file-list-container h3 {
            margin-bottom: 50px !important;
            font-size: 1.2rem;
            color: #1e2a3a;
            text-align: center;
        }
        .file-list {
            display: flex;
            flex-direction: row;
            gap: 20px;
            overflow-x: auto;
            overflow-y: visible;
            padding: 10px 20px;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            /* Никакого justify-content — это важно */
        }
        .file-list::-webkit-scrollbar {
            height: 6px;
        }
        .file-list::-webkit-scrollbar-track {
            background: #e2e8f0;
            border-radius: 10px;
        }
        .file-list::-webkit-scrollbar-thumb {
            background: #3b82f6;
            border-radius: 10px;
        }
        .file-item {
            flex-shrink: 0;
            width: 150px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 16px;
            padding: 12px 8px 8px 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transition: transform 0.2s;
            cursor: pointer;
            text-align: center;
            display: flex;
            flex-direction: column;
            position: relative;
        }
        .file-item:hover {
            transform: translateY(-2px);
        }
        .remove-file {
            position: absolute;
            top: 6px;
            right: 6px;
            background: #ef4444;
            color: white;
            border: none;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 12px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            z-index: 10;
        }
        .remove-file:hover {
            background: #dc2626;
            transform: scale(1.1);
        }
        .file-name {
            font-weight: bold;
            font-size: 0.85rem;
            color: #1e2a3a;
            text-align: center;
            word-break: break-word;
            margin-top: 10px;
            padding: 0 5px;
        }
        .file-size {
            font-size: 0.7rem;
            color: #6c757d;
            text-align: center;
            margin-top: 5px;
        }
        .scroll-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: #3b82f6;
            color: white;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 20px;
            font-weight: bold;
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            z-index: 20;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }
        .scroll-btn:hover {
            background: #2563eb;
            transform: translateY(-50%) scale(1.05);
        }
        .scroll-left { left: 0; }
        .scroll-right { right: 0; }
        .actions-container { 
            display: flex; 
            flex-wrap: wrap; 
            gap: 24px; 
            margin: 20px 0; 
        }
        .action-panel {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(2px);
            flex: 1;
            padding: 24px;
            border-radius: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            width: 100%;
            text-align: center;
        }
        .action-panel h3 {
            margin-bottom: 20px;
            font-size: 1.3rem;
            text-align: center;
            word-break: break-word;
            color: #1e2a3a;
        }
        #freeActions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 12px;
            margin-top: 5px;
        }
        .action-btn {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 10px 18px;
            cursor: pointer;
            font-weight: 500;
            border-radius: 10px;
            font-size: 0.85rem;
            transition: all 0.2s ease;
            text-align: center;
            white-space: normal;
            word-break: keep-all;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            justify-self: stretch;
            min-width: 0;
        }
        .action-btn:hover {
            background: #2563eb;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }
        .action-btn:active {
            transform: translateY(0);
        }
        .param-panel {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(4px);
            padding: 30px;
            margin: 30px auto;
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.15);
            max-width: 500px;
            width: 90%;
            text-align: center;
            position: relative;
        }
        .param-panel h4 {
            margin-bottom: 25px;
            font-size: 1.3rem;
            color: #1e2a3a;
            text-align: center;
        }
        .param-group {
            margin-bottom: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            width: 100%;
        }
        .param-group label {
            font-weight: 500;
            color: #1e2a3a;
            font-size: 0.95rem;
        }
        .param-group select,
        .param-group input {
            padding: 10px 15px;
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            font-size: 0.95rem;
            width: 100%;
            max-width: 280px;
            background: white;
        }
        .param-group input[type="range"] {
            width: 100%;
            max-width: 280px;
        }
        .param-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 25px;
            flex-wrap: wrap;
        }
        .confirm-btn {
            background: #22c55e !important;
            padding: 12px 28px !important;
            min-width: 120px;
        }
        .confirm-btn:hover {
            background: #16a34a !important;
        }
        .cancel-btn {
            background: #6c757d !important;
            padding: 12px 28px !important;
            min-width: 120px;
        }
        .cancel-btn:hover {
            background: #5a6268 !important;
        }
        .progress-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            visibility: hidden;
        }
        .progress-card { background: white; padding: 32px; text-align: center; border-radius: 20px; min-width: 250px; }
        .radial-progress { width: 60px; height: 60px; border-radius: 50%; border: 4px solid #e2e8f0; border-top-color: #3b82f6; animation: spin 1s linear infinite; margin: 0 auto 16px; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .download-button {
            background: #22c55e;
            color: white;
            border: none;
            padding: 14px 32px;
            margin: 20px 0;
            cursor: pointer;
            font-weight: bold;
            border-radius: 20px;
            display: inline-block;
            transition: all 0.3s ease;
            font-size: 1rem;
            box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
        }
        .download-button:hover {
            background: #16a34a;
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
        }
        @keyframes pulse {
            0% { transform: scale(1); background-color: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
            50% { transform: scale(1.05); background-color: #16a34a; box-shadow: 0 0 0 15px rgba(34,197,94,0); }
            100% { transform: scale(1); background-color: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0); }
        }
        @keyframes pulse-mobile {
            0% { transform: scale(1); background-color: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0.7); }
            30% { transform: scale(1.1); background-color: #16a34a; box-shadow: 0 0 0 20px rgba(34,197,94,0); }
            60% { transform: scale(1.05); background-color: #1e9a3e; box-shadow: 0 0 0 10px rgba(34,197,94,0); }
            100% { transform: scale(1); background-color: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,0); }
        }
        .pulse-animation {
            animation: pulse 0.8s ease-in-out 4 !important;
        }
        .counter {
            text-align: center;
            font-size: 1rem;
            font-weight: 300;
            color: #6c757d;
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(2px);
            padding: 16px;
            border-radius: 16px;
            margin-top: auto;
            margin-bottom: 0;
        }
        #fileCounter { font-weight: 600; font-size: 1.3rem; color: #3b82f6; }
        .footer-content { background: #0f172a; color: #94a3b8; padding: 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-top: auto; }
        .footer-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
        .footer-logo { height: 50px; width: auto; display: block; }
        .footer-text { max-width: 600px; }
        .footer-text p { margin: 3px 0; font-size: 0.8rem; line-height: 1.4; }
        .footer-right { text-align: right; }
        .footer-right a { color: #94a3b8; text-decoration: none; display: inline-block; margin-left: 15px; transition: color 0.2s; font-size: 0.8rem; }
        .footer-right a:hover { color: white; }
        .footer-right a:first-child { margin-left: 0; }
        .footer-desktop-text { display: block; }
        .custom-alert {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 24px;
            border-radius: 20px;
            box-shadow: 0 20px 35px rgba(0,0,0,0.2);
            z-index: 2000;
            text-align: center;
            max-width: 90%;
            width: 400px;
            border-top: 4px solid #ef4444;
            display: none;
        }
        .custom-alert button { background: #3b82f6; color: white; border: none; padding: 8px 20px; border-radius: 8px; cursor: pointer; margin-top: 10px; }
        .overlay-blur {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.4);
            z-index: 1999;
            display: none;
        }
        .compression-stats { background: #e8f5e9; padding: 12px; border-radius: 10px; margin-top: 10px; font-size: 13px; color: #2e7d32; }
        @media (max-width: 768px) {
            .container { padding: 12px; }
            .header-logo {  display: none; }
            .footer-logo { display: none; }
            .footer-desktop-text { display: none; }
            .upload-area {
                min-height: 15vh;
                padding: 30px 15px;
                font-size: 0.95rem;
            }
            .upload-area strong:first-child {
                font-size: 1.3rem;
            }
            .upload-area strong:nth-child(2) {
                font-size: 1rem;
            }
            .logo-text { font-size: 0.9rem; }
            .logo-text span { font-size: 0.65rem; }
            .auth-buttons-desktop { display: none; }
            .mobile-menu-btn { display: block; }
            .logo-wrapper { gap: 0; }
            header { padding: 10px 15px; gap: 10px; }
            .file-list-container h3 {
                margin-bottom: 30px !important;
                font-size: 1rem;
            }
            .file-list {
                padding: 10px 20px;
                /* Никакого justify-content, никаких !important */
            }
            .file-name { font-size: 0.75rem; }
            .file-size { font-size: 0.65rem; }
            .remove-file {
                width: 20px;
                height: 20px;
                font-size: 11px;
                top: 6px;
                right: 6px;
            }
            .scroll-btn {
                width: 30px;
                height: 30px;
                font-size: 16px;
            }
            #freeActions {
                grid-template-columns: 1fr;
            }
            .action-btn {
                display: block;
                width: 100%;
                max-width: 280px;
                margin: 0 auto;
                text-align: center;
                white-space: normal;
                word-break: keep-all;
            }
            .action-panel h3 {
                font-size: 1rem;
                text-align: center;
            }
            .param-panel {
                padding: 20px;
                width: 95%;
                margin: 20px auto;
            }
            .param-panel h4 {
                font-size: 1.1rem;
                margin-bottom: 20px;
            }
            .param-group {
                margin-bottom: 15px;
                gap: 8px;
            }
            .param-group select,
            .param-group input {
                padding: 10px 12px;
                font-size: 0.9rem;
                max-width: 100%;
            }
            .param-buttons {
                gap: 12px;
                margin-top: 20px;
            }
            .confirm-btn, .cancel-btn {
                padding: 10px 20px !important;
                min-width: 100px;
                font-size: 0.9rem;
            }
            .pulse-animation {
                animation: pulse-mobile 0.6s ease-in-out 5 !important;
            }
            .download-button {
                padding: 16px 36px;
                font-size: 1.1rem;
                width: 90%;
                max-width: 300px;
                margin: 20px auto;
                display: block;
            }
            .actions-container { flex-direction: column; }
            .footer-content { flex-direction: row; justify-content: space-between; gap: 15px; }
            .footer-left { text-align: left; flex: 1; align-items: center; gap: 0; }
            .footer-right { text-align: right; }
            .counter { font-size: 0.85rem; padding: 12px; }
            #fileCounter { font-size: 1.1rem; }
        }
        @media (max-width: 930px) {
            .footer-desktop-text {
                display: none;
            }
        }
        @media (min-width: 769px) and (max-width: 1024px) {
            .footer-content { flex-direction: row; justify-content: space-between; }
            .footer-left { text-align: left; }
            .footer-right { text-align: right; }
            .footer-logo { display: block; height: 40px; }
            .param-panel {
                max-width: 450px;
                padding: 25px;
            }
        }
        @media (max-width: 480px) {
            .action-btn { display: block; width: 100%; margin: 8px 0; }
            .progress-card { min-width: 200px; padding: 20px; }
            .upload-area {
                padding: 20px 12px;
                font-size: 0.9rem;
            }
            .upload-area strong:first-child {
                font-size: 1.1rem;
            }
            .upload-area strong:nth-child(2) {
                font-size: 0.9rem;
            }
            .footer-left { gap: 0; }
            .footer-text p { font-size: 0.7rem; }
            .footer-right a { font-size: 0.7rem; margin-left: 8px; }
            .file-item {
                width: 130px;
                padding: 12px 8px 8px 8px;
            }
            .file-name { font-size: 0.7rem; }
            .param-panel {
                padding: 15px;
                width: 98%;
            }
            .param-panel h4 {
                font-size: 1rem;
            }
            .confirm-btn, .cancel-btn {
                padding: 8px 16px !important;
                min-width: 80px;
                font-size: 0.85rem;
            }
        }
        .operation-message {
            margin-bottom: 15px;
            padding: 10px;
            background: #f0f7ff;
            border-radius: 10px;
            text-align: center;
        }
        .operation-message strong {
            color: #1e3a8a;
            font-size: 1rem;
        }
        .operation-message small {
            display: block;
            margin-top: 5px;
            color: #666;
        }
        .warning-message {
            background: #fff3cd;
            border-left: 4px solid #ffc107;
            padding: 10px;
            margin: 10px 0;
            border-radius: 8px;
            font-size: 13px;
            color: #856404;
        }
        .custom-alert {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 25px;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.2);
            z-index: 2000;
            text-align: center;
            max-width: 90%;
            width: 450px;
            border-top: 5px solid #ef4444;
            display: none;
        }
        .custom-alert p {
            margin-bottom: 20px;
            font-size: 1rem;
            line-height: 1.5;
            color: #1e2a3a;
            white-space: pre-line;
        }

        .menu-divider {
            border: none;
            border-top: 1px solid #e2e8f0;
            margin: 12px 0;
        }

        .custom-alert button {
            background: #3b82f6;
            color: white;
            border: none;
            padding: 10px 24px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.2s;
        }
        .custom-alert button:hover {
            background: #2563eb;
            transform: scale(1.02);
        }
        #uploadExtra {
            margin: 0;
            padding: 5px 0;
        }
        .instruction-text {
            margin: 20px 0 0 0 !important;
        }
        #uploadHint {
            margin-bottom: 20px;
        }
        .file-list-container:has(.file-list:empty) {
            display: none;
        }
        .file-item {
            animation: none;
        }
                /* Переключатель режимов */
        .mode-switch {
            display: flex;
            gap: 8px;
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(4px);
            padding: 4px;
            border-radius: 40px;
            margin: 0 auto;
            justify-content: center;
        }
        .mode-btn {
            background: transparent;
            border: none;
            padding: 8px 20px;
            font-size: 0.9rem;
            font-weight: 500;
            border-radius: 40px;
            cursor: pointer;
            transition: all 0.2s;
            color: #4b5563;
        }
        .mode-btn.active {
            background: #3b82f6;
            color: white;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        @media (max-width: 768px) {
            .mode-btn { padding: 6px 12px; font-size: 0.75rem; }
            .mode-switch { margin: 0; }
        }
        .mode-link {
            background: #3b82f6;
            color: white;
            padding: 8px 20px;
            border-radius: 40px;
            text-decoration: none;
            font-weight: 500;
            font-size: 0.9rem;
            transition: all 0.2s;
            white-space: nowrap;
            margin-left: auto;      /* прижимаем вправо */
            margin-right: 15px;     /* отступ перед бургером */
        }
        .mode-link:hover {
            background: #2563eb;
            transform: translateY(-2px);
        }
        @media (max-width: 768px) {
            .mode-link {
                padding: 6px 12px;
                font-size: 0.75rem;
            }
        }




/* === Адаптация зоны загрузки для мобильных === */
.upload-area {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    padding: 30px 20px;
    text-align: center;
}

.upload-area #uploadHint {
    word-break: break-word;
    max-width: 100%;
    white-space: normal;
    display: inline-block;
    text-align: center;
}

.upload-area .instruction-text {
    word-break: break-word;
    max-width: 100%;
    text-align: center;
}

.landing-header {
    text-align: center;
}

.landing-header h1 {
    word-break: break-word;
}

.landing-header .subtitle {
    word-break: break-word;
}

@media (max-width: 768px) {
    .upload-area {
        padding: 20px 12px;
        font-size: 0.9rem;
    }
    .upload-area #uploadHint {
        font-size: 0.8rem;
        line-height: 1.6;
    }
    .landing-header h1 {
        font-size: 1.6rem;
    }
    .landing-header .subtitle {
        font-size: 0.95rem;
    }
}

/* === Адаптация текста в зоне загрузки === */
.desktop-only {
    display: inline;
}
.mobile-only {
    display: none;
}
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    .mobile-only {
        display: inline;
    }
    #uploadHint {
        font-size: 0.8rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ============================================
   ПРИЖАТИЕ ФУТЕРА К НИЗУ (БЕЗ ФИКСАЦИИ)
   ============================================ */

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Основной контейнер – растягивается на всё свободное место */
.container {
    flex: 1 0 auto;
    width: 100%;
    /* остальные стили не трогаем */
}

/* Футер – в нормальном потоке, не фиксируется */
.footer-content {
    flex-shrink: 0;
    margin-top: auto;
    /* отключаем возможные фиксации */
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
}

/* === Анимация фона зоны загрузки === */
@keyframes softPulse {
    0% { background-color: rgba(255,255,255,0.85); }
    50% { background-color: rgba(230, 240, 255, 0.92); } /* +10% синего */
    100% { background-color: rgba(255,255,255,0.85); }
}
.upload-area {
    animation: softPulse 8s ease-in-out infinite;
}

/* ============================================================
   ПРИНУДИТЕЛЬНАЯ ГОРИЗОНТАЛЬНАЯ ПРОКРУТКА ДЛЯ ТАБЛИЦ
   ============================================================ */

/* Убираем скрытие overflow-x у родительских контейнеров для таблиц */
.table-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    margin: 20px 0;
    padding: 0;
    box-sizing: border-box;
    /* Убираем влияние overflow-x: hidden от body и .container */
    position: relative;
    z-index: 1;
}

/* Сама таблица – гарантированно шире экрана */
.table-container table {
    display: block !important;      /* превращаем в блочный элемент */
    width: max-content !important;  /* ширина по содержимому, а не 100% */
    min-width: 100% !important;     /* чтобы на больших экранах не сжималась */
    max-width: none !important;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    table-layout: auto !important;  /* отключаем фиксированную ширину */
}

/* Ячейки – запрещаем перенос, чтобы таблица не сжималась */
.table-container td,
.table-container th {
    white-space: nowrap !important;
    padding: 12px 16px;
    word-break: keep-all;
}

/* Стилизация скроллбара */
.table-container::-webkit-scrollbar {
    height: 8px !important;
}
.table-container::-webkit-scrollbar-track {
    background: #e2e8f0 !important;
    border-radius: 10px !important;
}
.table-container::-webkit-scrollbar-thumb {
    background: #3b82f6 !important;
    border-radius: 10px !important;
}

/* На случай, если таблица всё равно не выходит за пределы – даём принудительную ширину */
.table-container table {
    min-width: 750px !important; /* подберите под свои таблицы */
}

/* ============================================================
   ФИНАЛЬНЫЕ СТИЛИ ДЛЯ ФУТЕРА (БЕЗ ФИКСАЦИИ)
   ============================================================ */

footer.footer-content,
.footer-content {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 20px !important;
    background: #0f172a !important;
    color: #94a3b8 !important;
    padding: 32px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-logo {
    height: 50px;
    width: auto;
    display: block;
}
.footer-text {
    max-width: 600px;
}
.footer-text p {
    margin: 3px 0;
    font-size: 0.8rem;
    line-height: 1.4;
}
.footer-right {
    text-align: right;
}
.footer-right a {
    color: #94a3b8;
    text-decoration: none;
    display: inline-block;
    margin-left: 15px;
    transition: color 0.2s;
    font-size: 0.8rem;
}
.footer-right a:hover {
    color: white;
}
.footer-right a:first-child {
    margin-left: 0;
}
.footer-desktop-text {
    display: block;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .footer-logo {
        display: none;
    }
    .footer-desktop-text {
        display: none;
    }
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 15px;
        padding: 20px 16px;
    }
    .footer-left {
        text-align: left;
        flex: 1;
        align-items: center;
        gap: 0;
    }
    .footer-right {
        text-align: right;
    }
    .footer-text p {
        font-size: 0.7rem;
    }
    .footer-right a {
        font-size: 0.7rem;
        margin-left: 8px;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
    .footer-left {
        text-align: left;
    }
    .footer-right {
        text-align: right;
    }
    .footer-logo {
        display: block;
        height: 40px;
    }
}

/* SEO-ссылки в футере (если есть) */
.footer-seo-links {
    width: 100%;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.footer-seo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
}
.footer-seo-grid a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
    white-space: nowrap;
}
.footer-seo-grid a:hover {
    color: #ffffff;
}
.footer-seo-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
}
.footer-seo-links a:hover {
    color: white;
}
/* ===== ГАРАНТИЯ ОТКРЕПЛЕНИЯ ФУТЕРА ===== */
footer.footer-content,
.footer-content {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

/* ============================================================
   СТИЛИ ДЛЯ СЕНДВИЧ-МЕНЮ С АНИМАЦИЕЙ
   ============================================================ */

/* Общие стили для ссылок-кнопок в меню */
.menu-link {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.menu-link:active {
    transform: scale(0.97);
}

/* Специальный стиль для ссылки "Управление ключом" */
.menu-link.secondary {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #4b5563;
}
.menu-link.secondary:hover {
    background: #94a3b8;
    color: white;
    border-color: #6c757d;
}

/* Блок авторизации (поле + кнопка) */
.menu-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.menu-auth input {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.menu-auth input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.menu-auth input::placeholder {
    color: #94a3b8;
}

.menu-auth button {
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #22c55e;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-auth button:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

.menu-auth button:active {
    transform: scale(0.97);
}

.menu-auth button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Статус авторизации в меню */
.menu-auth-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    text-align: center;
    background: #f1f5f9;
    color: #4b5563;
    margin-top: 4px;
}
.menu-auth-status.success {
    background: #d4edda;
    color: #155724;
}
.menu-auth-status.error {
    background: #f8d7da;
    color: #721c24;
}
.menu-auth-status.info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Адаптив: в мобильном меню делаем отступы */
.mobile-menu-buttons .menu-link,
.mobile-menu-buttons .menu-auth {
    margin-bottom: 4px;
}

/* ============================================================
   АНИМАЦИЯ ДЛЯ ССЫЛОК И КНОПОК В СЕНДВИЧ-МЕНЮ
   ============================================================ */

/* Общие стили для ссылок-кнопок в меню */
.menu-link {
    display: block;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    background: white;
    border: 1px solid #3b82f6;
    color: #3b82f6;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.menu-link:active {
    transform: scale(0.97);
}

/* Специальный стиль для ссылки "Управление ключом" */
.menu-link.secondary {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #4b5563;
}
.menu-link.secondary:hover {
    background: #94a3b8;
    color: white;
    border-color: #6c757d;
}

/* Блок авторизации (поле + кнопка) */
.menu-auth {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.menu-auth input {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.menu-auth input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.menu-auth input::placeholder {
    color: #94a3b8;
}

.menu-auth button {
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: #22c55e;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-auth button:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

.menu-auth button:active {
    transform: scale(0.97);
}

.menu-auth button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Статус авторизации в меню */
.menu-auth-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    text-align: center;
    background: #f1f5f9;
    color: #4b5563;
    margin-top: 4px;
}
.menu-auth-status.success {
    background: #d4edda;
    color: #155724;
}
.menu-auth-status.error {
    background: #f8d7da;
    color: #721c24;
}
.menu-auth-status.info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Адаптив: в мобильном меню делаем отступы */
.mobile-menu-buttons .menu-link,
.mobile-menu-buttons .menu-auth {
    margin-bottom: 4px;
}