* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 540px;
    padding: 40px 30px;
    text-align: center;
    min-height: 700px;
}

.logo {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-logo {
    width: 230px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
    object-fit: contain;
}

.logo h1 {
    color: #fe6e36;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 5px;
}

.description {
    color: #666666;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 16px;
}

/* ============================== */
/*  Загрузка файла                */
/* ============================== */

.upload-area {
    border: 2px dashed #dddddd;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fafafa;
}

.upload-area:hover {
    border-color: #ff7700;
    background-color: rgba(255, 119, 0, 0.05);
}

.upload-area.dragover {
    border-color: #ff7700;
    background-color: rgba(255, 119, 0, 0.1);
}

.upload-icon {
    font-size: 48px;
    color: #ff7700;
    margin-bottom: 15px;
}

.upload-text {
    color: #888888;
    margin-bottom: 15px;
}

.upload-text h3 {
    color: #333333;
    margin-bottom: 8px;
}

.browse-btn {
    display: inline-block;
    background-color: #ff7700;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.browse-btn:hover {
    background-color: #ff5500;
}

.file-input {
    display: none;
}

.selected-file {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: none;
    border: 1px solid #eeeeee;
}

.file-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.file-name span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-btn {
    color: #ff7700;
    cursor: pointer;
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background-color: #eeeeee;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #ff7700;
    width: 0%;
    transition: width 0.15s ease;
}

.progress-label {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    text-align: left;
    min-height: 18px;
}

.scan-btn {
    background-color: #ff7700;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 15px;
}

.scan-btn:hover {
    background-color: #ff5500;
}

.scan-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Спиннер загрузки */
.loading {
    display: none;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid rgba(255, 119, 0, 0.3);
    border-radius: 50%;
    border-top: 4px solid #ff7700;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ============================================ */
/*  СЕКЦИИ ПРОВЕРОК (check-section)             */
/* ============================================ */

.check-section {
    margin-top: 20px;
    border-radius: 14px;
    border: 1px solid #e2e2e2;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.check-section:first-child {
    margin-top: 28px;
}

/* Заголовок секции */
.check-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f8f9fb 0%, #eef0f4 100%);
    border-bottom: 1px solid #e2e2e2;
}

.check-section-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.check-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.2px;
}

/* Тело секции */
.check-section-body {
    text-align: left;
}


/* ============================================ */
/*  ЗАГЛУШКИ (модули в разработке)              */
/* ============================================ */

.stub-body {
    padding: 28px 20px;
    text-align: center;
    background: repeating-linear-gradient(
        -45deg,
        #fafbfc,
        #fafbfc 8px,
        #f4f5f7 8px,
        #f4f5f7 16px
    );
}

.stub-content {
    max-width: 320px;
    margin: 0 auto;
}

.stub-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.7;
}

.stub-text {
    font-size: 15px;
    font-weight: 700;
    color: #999;
    margin-bottom: 6px;
}

.stub-subtext {
    font-size: 12px;
    color: #b0b0b0;
    line-height: 1.5;
}


/* ============================================ */
/*  ОБЛАСТЬ РЕЗУЛЬТАТОВ (внутри check-section)  */
/* ============================================ */

/* ---- Статус-баннер ---- */

.result-banner {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-banner-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.result-banner-text {
    flex: 1;
    min-width: 0;
}

.result-banner-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
}

.result-banner-desc {
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.85;
}

/* Зелёный баннер */
.banner-safe {
    background: linear-gradient(135deg, #e6f9ec 0%, #d0f5db 100%);
    border-bottom: 1px solid #b8e6c8;
}
.banner-safe .result-banner-icon {
    background: linear-gradient(135deg, #4cd964, #34c759);
    color: #fff;
}
.banner-safe .result-banner-title {
    color: #1b7a33;
}
.banner-safe .result-banner-desc {
    color: #2d8a3e;
}

/* Жёлтый баннер */
.banner-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-bottom: 1px solid #ffe082;
}
.banner-warning .result-banner-icon {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    color: #fff;
}
.banner-warning .result-banner-title {
    color: #a46500;
}
.banner-warning .result-banner-desc {
    color: #8d6400;
}

/* Красный баннер */
.banner-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-bottom: 1px solid #ef9a9a;
}
.banner-danger .result-banner-icon {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    color: #fff;
}
.banner-danger .result-banner-title {
    color: #b71c1c;
}
.banner-danger .result-banner-desc {
    color: #c62828;
}

/* Инфо баннер */
.banner-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-bottom: 1px solid #90caf9;
}
.banner-info .result-banner-icon {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: #fff;
}
.banner-info .result-banner-title {
    color: #1565c0;
}
.banner-info .result-banner-desc {
    color: #1976d2;
}

/* Ошибка баннер */
.banner-error {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    border-bottom: 1px solid #f48fb1;
}
.banner-error .result-banner-icon {
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
}
.banner-error .result-banner-title {
    color: #880e4f;
}
.banner-error .result-banner-desc {
    color: #ad1457;
}


/* ---- Блок статистики ---- */

.result-stats {
    display: flex;
    gap: 1px;
    background-color: #e8e8e8;
    margin: 0;
}

.result-stat-item {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    background-color: #f9fafb;
}

.result-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #333;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.result-stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value-safe {
    color: inherit;
}

.stat-value-warning {
    color: inherit;
}

.stat-value-danger {
    color: inherit;
}


/* ---- Заголовок списка файлов ---- */

.files-section-header {
    padding: 14px 20px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fcfcfc;
}


/* ---- Карточки файлов ---- */

.files-risk-list {
    padding: 12px 16px 4px;
}

.file-risk-card {
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}

.file-risk-card:last-child {
    margin-bottom: 8px;
}

.file-risk-card:hover {
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Шапка карточки */
.file-risk-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.file-risk-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.file-risk-card-medium .file-risk-icon-wrap {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ffcc80;
}

.file-risk-card-high .file-risk-icon-wrap {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 1px solid #ef9a9a;
}

.file-risk-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    line-height: 1.35;
}

/* Бэйдж риска */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.badge-medium {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #e65100;
    border: 1px solid #ffcc80;
}

.badge-high {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.badge-medium .badge-dot {
    background-color: #ff9800;
}

.badge-high .badge-dot {
    background-color: #f44336;
}

/* Разделитель внутри карточки */
.file-risk-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e8e8e8 15%, #e8e8e8 85%, transparent 100%);
    margin: 0 14px;
}

/* Описания рисков */
.file-risk-descriptions {
    margin: 0;
    padding: 10px 14px 12px;
    list-style: none;
    background-color: #fcfcfd;
}

.file-risk-descriptions li {
    position: relative;
    font-size: 12.5px;
    color: #555;
    line-height: 1.55;
    padding: 6px 0 6px 22px;
    border-bottom: 1px dashed #efefef;
}

.file-risk-descriptions li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.file-risk-descriptions li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.file-risk-card-medium .file-risk-descriptions li::before {
    background-color: #ffb74d;
    box-shadow: 0 0 0 3px rgba(255, 183, 77, 0.2);
}

.file-risk-card-high .file-risk-descriptions li::before {
    background-color: #ef5350;
    box-shadow: 0 0 0 3px rgba(239, 83, 80, 0.2);
}


/* ---- Футер результатов ---- */

.result-footer {
    margin-top: 12px;
    padding: 16px 20px;
    text-align: center;
}

.new-scan-btn {
    display: inline-block;
    color: #ff7700;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 24px;
    border-radius: 8px;
    border: 2px solid #ff7700;
    background: transparent;
    transition: all 0.25s ease;
    text-decoration: none;
}

.new-scan-btn:hover {
    background-color: #ff7700;
    color: #fff;
}

/* ---- Дата проверки ---- */

.result-date {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    padding: 0 20px;
    margin-top: 14px;
}


/* ============================================ */
/*  Адаптивность / Responsiveness               */
/* ============================================ */

/* Планшеты */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .container {
        padding: 30px 20px;
        min-height: auto;
    }

    .logo h1 {
        font-size: 32px;
    }

    .custom-logo {
        width: 180px;
    }

    .upload-area {
        padding: 28px 16px;
    }

    .result-banner {
        padding: 18px 16px;
        gap: 12px;
    }

    .result-banner-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .file-risk-header {
        flex-wrap: wrap;
    }

    .check-section-header {
        padding: 12px 16px;
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 24px 14px;
        border-radius: 12px;
    }

    .logo h1 {
        font-size: 26px;
    }

    .custom-logo {
        width: 150px;
    }

    .description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .upload-area {
        padding: 24px 12px;
        margin-bottom: 20px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .browse-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .scan-btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .check-section-header {
        padding: 10px 14px;
        gap: 8px;
    }

    .check-section-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .check-section-title {
        font-size: 13px;
    }

    .stub-body {
        padding: 20px 14px;
    }

    .stub-icon {
        font-size: 26px;
    }

    .stub-text {
        font-size: 13px;
    }

    .stub-subtext {
        font-size: 11px;
    }

    .result-banner {
        padding: 16px 14px;
        gap: 10px;
        flex-direction: column;
        text-align: center;
    }

    .result-banner-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .result-banner-title {
        font-size: 15px;
    }

    .result-banner-desc {
        font-size: 12px;
    }

    .result-stats {
        flex-direction: column;
    }

    .result-stat-item {
        padding: 10px 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .result-stat-value {
        font-size: 18px;
        margin-bottom: 0;
    }

    .result-stat-label {
        font-size: 10px;
    }

    .files-risk-list {
        padding: 10px 10px 4px;
    }

    .file-risk-header {
        padding: 10px 10px;
        flex-wrap: wrap;
    }

    .file-risk-icon-wrap {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .file-risk-name {
        font-size: 12px;
    }

    .risk-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .file-risk-descriptions {
        padding: 8px 10px 10px;
    }

    .file-risk-descriptions li {
        font-size: 11.5px;
        padding-left: 18px;
    }

    .files-section-header {
        padding: 10px 14px 8px;
        font-size: 11px;
    }

    .new-scan-btn {
        font-size: 13px;
        padding: 7px 20px;
    }

    .progress-label {
        font-size: 11px;
    }
}

/* Маленькие мобильные */
@media (max-width: 360px) {
    .container {
        padding: 18px 10px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .custom-logo {
        width: 120px;
    }

    .upload-area {
        padding: 18px 10px;
    }
}
