:root {
    --bg-dark: #0a0e17;
    --panel-bg: rgba(16, 22, 35, 0.9);
    --accent-it: #00d2ff;
    --accent-car: #ff3c00;
    --text-main: #e0e6ed;
    --text-muted: #8899a6;
    --shadow-it: 0 0 20px rgba(0, 210, 255, 0.3);
    --shadow-car: 0 0 20px rgba(255, 60, 0, 0.3);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-x: hidden;
    background-color: var(--bg-dark);
    background-image:
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMGQyZmYiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTAgMGg0MHY0MEgwVjB6bTQwIDQwaDQwdjQwSDQwVjQweiIvPjwvZz48L2c+PC9zdmc+'),
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MCIgaGVpZ2h0PSI4MCIgdmlld0JveD0iMCAwIDgwIDgwIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmZjNjMDAiIGZpbGwtb3BhY2l0eT0iMC4wNSI+PHBhdGggZD0iTTAgMGg0MHY0MEgwVjB6bTQwIDQwaDQwdjQwSDQwVjQweiIvPjwvZz48L2c+PC9zdmc+');
    background-position: left top, right top;
    background-repeat: repeat-y, repeat-y;
    background-size: 50% auto, 50% auto;
}

body::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 100%;
    background: linear-gradient(to bottom, var(--accent-it), var(--accent-car));
    z-index: -1;
    opacity: 0.5;
}

.main-wrapper {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.header-main {
    text-align: center;
    margin-bottom: 2px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.header-main h1 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 0;
    animation: none !important;
}

.header-main h1 .it {
    color: #e0e6ed !important;
    text-shadow: var(--shadow-it);
    animation: none !important;
}

.header-main h1 .car {
    color: var(--accent-car);
    text-shadow: var(--shadow-car);
    animation: none !important;
}

/* Блок файла */
.file-block {
    background: var(--panel-bg);
    border: 2px solid #333;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-left: 4px solid var(--accent-it);
    border-right: 4px solid var(--accent-car);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.file-block h2 {
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    color: var(--accent-it);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.file-description {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.file-description a {
    color: #0066cc;
    text-decoration: none;
}

.file-description a:hover {
    color: #004499;
    text-decoration: underline;
}

/* Стили для списков в описании */
.file-description ul,
.file-description ol {
    margin: 15px 0;
    padding-left: 25px;
}

.file-description li {
    margin-bottom: 8px;
}

.file-description li:last-child {
    margin-bottom: 0;
}

.file-info {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05);
}

.file-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.file-info-item:last-child {
    border-bottom: none;
}

.file-info-label {
    font-weight: 500;
    color: var(--text-muted);
}

.file-info-value {
    color: var(--text-main);
/*   font-weight: 600; */
}

/* Кнопка скачивания: делаем массивнее и приятнее */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--accent-it), var(--accent-car));
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.download-btn:hover {
    transform: translateY(-4px);
    filter: brightness(1.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.download-btn i {
    font-size: 20px;
}

/* Форма пароля */
.password-form {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 30px;
    margin-top: auto;
}

.password-form h3 {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    color: var(--accent-it);
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-form p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.password-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.password-form input {
    width: 100%;
    padding: 12px 50px 12px 20px; /* Уменьшил чуть-чуть, чтобы глаз был ближе к краю */
    border: 1px solid #333;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
    font-size: 14px;
    box-sizing: border-box; /* ВАЖНО: чтобы паддинг не выталкивал ширину */
}

/* Скрываем стандартный глаз браузера */
.password-form input::-webkit-credentials-auto-fill-button,
.password-form input::-ms-reveal {
    display: none;
}

.password-form input:focus {
    outline: none;
    border-color: var(--accent-it);
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--text-muted) !important;
    transition: color 0.3s;
    z-index: 5;
    box-shadow: none !important;
    outline: none !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
}

.toggle-password:hover {
    color: var(--accent-it) !important;
}

.toggle-password i {
    font-size: 16px;
    display: inline-block !important;
}

.password-form button {
    width: 100%;
    padding: 12px 25px;
    background: var(--accent-it);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.password-form button:hover {
    background: var(--accent-car);
}

/* Ошибка пароля */
.password-error {
    background: rgba(245, 65, 65, 0.2);
    border: 1px solid #f56565;
    color: #f56565;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

/* Иконка замка */
.lock-icon {
    color: #f59e0b;
    font-size: 24px;
}

/* Навигация */
.back-link-2 {
    text-align: center;
}

.back-link-2 a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-it);
    text-decoration: none;
    font-size: 16px;
    padding: 12px 24px;
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    transition: var(--transition);
}

.back-link-2 a:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-it);
    box-shadow: var(--shadow-it);
}

.back-link {
    text-align: center;
    margin-top: 10px;
}

.back-link a {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-car);
    color: var(--bg-dark);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(255, 60, 0, 0.3);
}

.back-link a:hover {
    background: #ff5500;
    transform: translateY(-2px);
    box-shadow: var(--shadow-car);
}

/* Счетчик скачиваний */
.download-count {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px; /* такое же скругление, как у .file-info */
    padding: 20px 25px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.download-count-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.download-count-item:last-child {
    margin-bottom: 0;
}

.download-count i {
    color: var(--accent-it);
}

/* Модальное окно для просмотра картинок */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    border-radius: 10px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.image-modal-close:hover {
    color: var(--accent-it);
}

.image-modal-download {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-it);
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-modal-download:hover {
    background: var(--accent-car);
    transform: translateX(-50%) translateY(-2px);
}

/* Альтернативная прямая ссылка */
.alternative-download {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.alternative-link-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.alternative-link-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.alternative-link-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: 'Courier New', Courier, monospace;
}

.copy-link-btn {
    padding: 10px 15px;
    background: var(--accent-it);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-link-btn:hover {
    background: var(--accent-car);
}

.alternative-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-it);
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.alternative-link:hover {
    color: var(--accent-car);
    text-decoration: underline;
}