* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Courier New', monospace;
            background: linear-gradient(135deg, #0a0a2e 0%, #16213e 50%, #0f3460 100%);
            min-height: 100vh;
            padding: 20px;
            position: relative;
            overflow-x: auto;
        }

         /* Звездный фон */ 

         body::before { 
            content: ''; 
            position: fixed; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            background-image: 

                    radial-gradient(2px 2px at 20px 30px, #eee, rgb(0 0 0 / 0%)), 

                    radial-gradient(2px 2px at 60px 70px, #fff, rgb(0 0 0 / 0%)), 

                    radial-gradient(1px 1px at 50px 50px, #fff, rgb(0 0 0 / 0%)), 

                    radial-gradient(1px 1px at 130px 80px, #fff, rgb(0 0 0 / 0%)), 

                    radial-gradient(2px 2px at 90px 10px, #fff, rgb(0 0 0 / 0%)); 
            background-repeat: repeat; 
            background-size: 200px 200px; 
            pointer-events: none; 
            z-index: 1; 

         } 
        

        @keyframes twinkle {
            0% { opacity: 0.7; }
            100% { opacity: 1; }
        }

        .main-container {
            display: flex;
            flex-direction: column;
            gap: 24px;
            max-width: 1600px;
            margin: 0 auto;
            padding: 40px 20px;
            position: relative;
            z-index: 2;
        }

        /* Статистика */
        .cards-row {
            display: flex;
            gap: 24px;
            flex-wrap: nowrap;
            overflow-x: auto;
            padding: 40px 60px;
            scrollbar-width: thin;
            scrollbar-color: #0ff #1a1a3a;
            margin: -20px -40px;
        }

        .cards-row::-webkit-scrollbar {
            height: 8px;
        }

        .cards-row::-webkit-scrollbar-track {
            background: #1a1a3a;
            border-radius: 4px;
        }

        .cards-row::-webkit-scrollbar-thumb {
            background: #0ff;
            border-radius: 4px;
        }

        /* Карточка */
        .card {
            flex: 0 0 380px;
            background: rgb(15 15 50 / 95%);
            border: 2px solid;
            border-radius: 16px;
            padding: 28px;
            box-shadow:
                    0 8px 32px rgb(0 0 0 / 40%),
                    inset 0 1px 0 rgb(255 255 255 / 10%);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 16px 48px rgb(0 255 255 / 30%);



        }


        /* Парсер - зеленый */
        .parser-card {
            border-color: #00ff41;
            box-shadow: 0 0 20px rgb(0 255 65 / 30%);
            flex: 1 1 auto
        }

        .parser-card h2 {
            color: #00ff41;
            font-size: 1.4em;
            margin-bottom: 20px;
            text-shadow: 0 0 8px #00ff41;
        }

        /* Результаты - желтый */
        .results-card {
            border-color: #fd0;
            box-shadow: 0 0 20px rgb(255 221 0 / 30%);
            flex: 0 0 420px;
        }

        .results-card h2 {
            color: #fd0;
            font-size: 1.4em;
            margin-bottom: 20px;
            text-shadow: 0 0 8px #fd0;
        }

        /* Поля ввода */
        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            margin-top: 20px;
            display: block;
            color: #0ff;
            font-size: 0.9em;
            margin-bottom: 8px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            background: rgb(0 40 80 / 60%);
            border: 2px solid #0ff;
            color: #0ff;
            padding: 14px 16px;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            font-size: 1em;
            transition: all 0.3s ease;
        }

        .form-label{
           white-space: nowrap;

        }

        #num_pages{
            max-width: 120px;
        }

        .num-pages-wrapper {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 20px;
            margin-bottom: 20px;
            margin-right: 600px;
            text-align: center;
            font-weight: bold;
            border-color: #ff0; /* Желтая рамка для отличия */
            background: rgb(0 20 40 / 80%);
        }
        
        /* Стили для стрелок в числовом поле */
        .form-group input[type="number"].pages-input {
            appearance: textfield;
        }
        
        .form-group input[type="number"].pages-input::-webkit-inner-spin-button,
        .form-group input[type="number"].pages-input::-webkit-outer-spin-button {
            opacity: 0.5;
            height: 20px;
        }

        .form-group input:focus {
            outline: none;
            border-color: #fd0;
            box-shadow: 0 0 12px rgb(0 255 255 / 40%);
            background: rgb(0 60 120 / 80%);
        }

        .form-group input::placeholder {
            color: rgb(0 255 255 / 40%);
        }

        /* Чекбоксы */
        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin: 20px 0;
        }

        .checkbox-wrapper {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px 0;
        }

        .checkbox-wrapper input[type="checkbox"] {
            width: 22px;
            height: 22px;
            accent-color: #fd0;
            cursor: pointer;
        }

        .checkbox-wrapper label {
            color: #fd0;
            font-size: 0.95em;
            cursor: pointer;
            flex: 1;
            user-select: none;
        }

        /* Кнопки */
        .button-group {
            display: flex;
            justify-content: center;        /* центрирует кнопки */
            align-items: center;
            gap: 24px;                      /* отступ между кнопками */
            margin-top: 30px;               /* отступ от карточки */
            margin-bottom: 60px;            /* отступ снизу — для удобства скролла */
            flex-wrap: wrap;                /* на мобильных — переносится */
        }

        .btn {
            text-align: center;
            flex: 1;
            padding: 14px 20px;
            font-size: 0.95em;
            font-weight: 700;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-family: 'Courier New', monospace;
            transition: all 0.3s ease;
            text-shadow: 0 0 4px rgb(0 0 0 / 70%);
        }

        .btn-primary {
            text-align: center;
            margin-right: 560px;
            max-width: 300px;
            background: linear-gradient(135deg, #00ff41 0%, #0c3 100%);
            color: #000;
            box-shadow: 0 4px 15px rgb(0 255 65 / 40%);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgb(0 255 65 / 60%);
        }

        .btn-secondary {
            margin-right: 30px;
            max-width: 200px;
            background: linear-gradient(135deg, #ff6b00 0%, #f40 100%);
            color: #fff;
            box-shadow: 0 4px 15px rgb(255 107 0 / 40%);
        }

        .btn-secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgb(255 107 0 / 60%);
        }

        .btn-download {
            display: flex;
            justify-content: center;
            gap: 8px;
            padding: 12px 20px;
            text-decoration: none;
            font-weight: bold;
        }

        .btn-download .material-icons {
            font-size: 1.2em; 
            vertical-align: middle;
        }

        .btn-back {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            text-decoration: none;
            font-weight: 500;
            border: 1px solid #00ff41;
            background: transparent;
            color: #00ff41;
            box-shadow: 0 0 10px rgb(0 255 65 / 30%);
            transition: all 0.3s ease;
        }
        
        .btn-back .material-icons {
            font-size: 1.2em;
            vertical-align: middle;
        }

        /* Результаты в разработке */
        .results-content {
            border-radius: 16px;
            padding: 5px;
            margin: 10px 0;
            color: #fff;  /* белый текст */
        }
        
        .results-content strong {
            color: #ffd700;  /* золотистый для заголовков */
            font-weight: 600;
            display: inline-block;
            min-width: 120px;
        }

        .results-content.empty {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 120px;
            color: rgb(0 255 255 / 40%);
            font-style: italic;
        }

        .status-message {
            padding: 12px 16px;
            border-radius: 6px;
            margin-bottom: 16px;
            font-weight: 600;
            border-left: 4px solid;
        }

        .status-success {
            background: rgb(0 255 65 / 15%);
            border-left-color: #00ff41;
            color: #00ff41;
        }

        .status-error {
            background: rgb(255 0 65 / 15%);
            border-left-color: #ff0041;
            color: #ff0041;
        }

        .status-info {
            background: rgb(0 255 255 / 15%);
            border-left-color: #0ff;
            color: #0ff;
        }

        /* Заголовок */
        .header {
            text-align: center;
            margin-bottom: 8px;
        }

        .header h1 {
            color: #0ff;
            font-size: 2.2em;
            text-shadow: 0 0 12px #0ff, 0 0 24px #ff006e;
            letter-spacing: 2px;
            margin-bottom: 4px;
        }

        .header p {
            color: #fd0;
            font-size: 1em;
            text-shadow: 0 0 6px #fd0;
        }

        .error-messages {
            color: #ff006e;
            margin-top: 5px;
        }


        .link-registration{
            color: #fd0;
            text-align: center;
            margin: 40px 0;
        }

        a {
            color: #fd0;
        }

        /* Статистика */
        .stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr; /* Две равные колонки */
            gap: 16px;
            margin-top: 16px;
        }

        .stat-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgb(0 20 60 / 50%);
            border: 1px solid #0ff;
            border-radius: 8px;
            padding: 12px 16px;
            font-family: 'Courier New', monospace;
            color: #0ff;
        }

        .stat-item label {
            font-weight: 600;
            font-size: 0.9em;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .stat-item input {
            background: transparent;
            border: none;
            color: #fd0;
            font-family: 'Courier New', monospace;
            font-size: 1em;
            font-weight: 700;
            text-align: right;
            width: 80px;
            padding: 0;
            margin-left: 12px;
            cursor: default;
            outline: none;
        }

        img.stat-image {
          max-width: 100%;
          height: auto;
          transition: max-width 0.3s ease;
        }

        img.stat-image:hover {
          max-width: 80%;
        }


        /* Адаптивность */
        @media (width <= 768px) {
            .main-container {
                padding: 20px 16px;
                gap: 20px;
            }

            .cards-row {
                flex-direction: column;
                overflow: visible;
            }

            .card {
                flex: none;
                width: 100%;
            }

            .header h1 {
                font-size: 1.8em;
            }

            .button-group {
                flex-direction: column;
            }

           /* Чекбоксы - маленькие */
            .checkbox-wrapper input[type="checkbox"] {
                width: 18px;
                height: 18px;
                margin-right: 12px;
                accent-color: #fd0;
            }

            /* Placeholder с переносами строк */
            textarea#url-input::placeholder {
                color: rgb(0 255 255 / 50%);
                white-space: pre-line;
                font-size: 0.95em;
                line-height: 1.6;
            }  

            .num-pages-wrapper {
                flex-direction: column;
                align-items: flex-start;
                gap: 5px;
            }
            
            .pages-wrapper .pages-input {
                width: 100%; /* На мобильных поле на всю ширину */
            }
            
            /* ===== АНИМАЦИЯ КОРАБЛЯ ===== */
            .ship-animation-container {
                position: relative;
                width: 100%;
                height: 300px;
                overflow: hidden;
                border-radius: 20px;
                background: linear-gradient(135deg, #0a0a2a 0%, #1a1a4a 100%);
                box-shadow: 0 10px 30px rgb(0 255 255 / 20%);
                border: 2px solid #0ff;
                margin-bottom: 30px;
            }
            
            /* Звёздный фон */
            .stars {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: transparent;
            }
            
            .star {
                position: absolute;
                background-color: #fff;
                border-radius: 50%;
                animation: twinkle 1.5s infinite alternate;
            }
            
            @keyframes twinkle {
                0% { opacity: 0.2; transform: scale(1); }
                100% { opacity: 1; transform: scale(1.2); }
            }
            
            /* Корабль с анимацией приближения */
            .spaceship {
                position: absolute;
                bottom: 20%;
                left: 50%;
                transform: translateX(-50%) scale(0.1);
                width: 200px;
                height: auto;
                opacity: 0;
                animation: approach 2.5s ease-out forwards;
                filter: drop-shadow(0 0 20px rgb(0 255 255 / 50%));
                z-index: 10;
            }
            
            @keyframes approach {
                0% {
                    transform: translateX(-50%) scale(0.1);
                    opacity: 0;
                    bottom: 50%;
                }

                30% {
                    opacity: 0.3;
                }

                60% {
                    transform: translateX(-50%) scale(0.5);
                    opacity: 0.8;
                    bottom: 30%;
                }

                100% {
                    transform: translateX(-50%) scale(1);
                    opacity: 1;
                    bottom: 20%;
                }
            }
            
            /* След от корабля (двигатели) */
            .engine-trail {
                position: absolute;
                bottom: 15%;
                left: 50%;
                transform: translateX(-50%);
                width: 60px;
                height: 80px;
                background: radial-gradient(ellipse at center, rgb(255 100 0 / 80%) 0%, rgb(255 0 0 / 40%) 50%, transparent 80%);
                border-radius: 50%;
                filter: blur(10px);
                animation: trailPulse 0.5s infinite alternate;
                z-index: 5;
            }
            
            @keyframes trailPulse {
                0% { opacity: 0.5; transform: translateX(-50%) scale(0.8); }
                100% { opacity: 1; transform: translateX(-50%) scale(1.2); }
            }
            
            /* Планета внизу */
            .planet {
                position: absolute;
                bottom: -50px;
                left: 50%;
                transform: translateX(-50%);
                width: 300px;
                height: 300px;
                background: radial-gradient(circle at 30% 30%, #4a4a8a, #1a1a3a);
                border-radius: 50%;
                box-shadow: 0 0 50px rgb(100 100 255 / 30%);
                z-index: 1;
            }
            
            .planet-ring {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%) rotate(15deg);
                width: 400px;
                height: 80px;
                border: 3px solid rgb(200 200 255 / 30%);
                border-radius: 50%;
                box-shadow: 0 0 30px rgb(100 100 255 / 20%);
            }
            
            /* Адаптивность для анимации */
            @media (width <= 768px) {
                .ship-animation-container {
                    height: 200px;
                }
                
                .spaceship {
                    width: 120px;
                }
                
                .planet {
                    width: 200px;
                    height: 200px;
                    bottom: -30px;
                }
                
                .planet-ring {
                    width: 260px;
                    height: 60px;
                }
                
                .engine-trail {
                    width: 40px;
                    height: 60px;
                }
            }
        }