* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --dark-bg: #0a0a0f;
    --dark-surface: #14141c;
    --dark-elevated: #1a1a24;
    --dark-border: #2a2a38;
    --brand-500: #6366f1;
    --brand-100: #a5b4fc;
    --text-white: #ffffff;
    --text-muted: #6b6b7b;
    --text-dark-muted: #4a4a5a;

    /* Цвета статусов как на скриншоте */
    --success: #22c55e;
    --success-light: #4ade80;
    --success-bg: rgba(34, 197, 94, 0.05);
    --success-border: rgba(34, 197, 94, 0.2);
    --success-bg-strong: rgba(34, 197, 94, 0.1);

    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-bg: rgba(239, 68, 68, 0.05);
    --danger-border: rgba(239, 68, 68, 0.2);
    --danger-bg-strong: rgba(239, 68, 68, 0.1);

    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-bg: rgba(245, 158, 11, 0.05);
    --warning-border: rgba(245, 158, 11, 0.2);
    --warning-bg-strong: rgba(245, 158, 11, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Фон с градиентом */
.bg-gradient {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(99,102,241,0.08), transparent, rgba(99,102,241,0.03));
    pointer-events: none;
    z-index: 0;
}

/* Сетка точек */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(99,102,241,0.12) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* === MAIN CONTAINER === */
.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 672px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* === CARD === */
.card {
    position: relative;
    width: 100%;
    background: rgba(20,20,28,0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden;
}

.card-shine {
    position: absolute;
    inset-x: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

.card-content {
    position: relative;
    z-index: 1;
}

/* === HEADER === */
h1 {
    font-size: 30px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    background: linear-gradient(to bottom right, #ffffff, var(--brand-100));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* === DROP ZONE === */
.drop-zone {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 16px;
    border: 2px dashed var(--dark-border);
    background: rgba(255,255,255,0.02);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: rgba(99,102,241,0.5);
    background: rgba(99,102,241,0.05);
}

.drop-zone input[type="file"] {
    display: none;
}

.upload-icon-wrap {
    margin-bottom: 16px;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--brand-500);
    margin: 0 auto;
    transition: transform 0.2s;
}

.drop-zone:hover .upload-icon {
    transform: scale(1.1);
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 6px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-dark-muted);
}

/* === BACK LINK === */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--dark-elevated);
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.back-link:hover {
    background: var(--dark-border);
    color: var(--text-white);
    border-color: rgba(255,255,255,0.1);
}

.back-link svg {
    width: 16px;
    height: 16px;
}

/* === LOADER === */
.loader-wrap {
    animation: fadeIn 0.3s ease;
}

.loader-content {
    text-align: center;
    padding: 20px 0;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--dark-border);
    border-top-color: var(--brand-500);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 20px;
}

.loader-stage {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: var(--dark-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-500), var(--brand-100));
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.loader-progress {
    font-size: 13px;
    color: var(--text-dark-muted);
    margin-bottom: 24px;
    font-weight: 600;
}

/* STAGES */
.stages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.stage {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--dark-elevated);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.stage.waiting {
    opacity: 0.35;
}

.stage.active {
    opacity: 1;
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.3);
    color: var(--text-white);
    box-shadow: 0 0 20px rgba(99,102,241,0.1);
}

.stage.done {
    opacity: 1;
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.3);
    color: #4ade80;
}

.stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dark-border);
    flex-shrink: 0;
    transition: all 0.3s;
}

.stage.active .stage-dot {
    background: var(--brand-500);
    box-shadow: 0 0 8px rgba(99,102,241,0.5);
}

.stage.done .stage-dot {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.5);
}

/* ============================================
   МОДАЛЬНОЕ ОКНО РЕЗУЛЬТАТОВ (как на скриншоте)
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    width: 100%;
    max-width: 1280px;
    max-height: 90vh;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

/* Шапка модалки */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--dark-border);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(to bottom right, #ffffff, var(--brand-100));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--dark-elevated);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.close-btn:hover {
    background: #ef4444;
    color: white;
    border-color: transparent;
}

.close-btn svg {
    width: 20px;
    height: 20px;
}

/* Сводка в модалке */
.modal-summary {
    display: flex;
    gap: 12px;
    padding: 20px 32px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 24px;
    background: var(--dark-elevated);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    min-width: 90px;
    backdrop-filter: blur(12px);
    transition: all 0.2s;
}

.summary-label {
    font-size: 11px;
    color: var(--text-dark-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item .count {
    font-weight: 900;
    color: var(--text-white);
    font-size: 26px;
    line-height: 1;
}

.summary-item.clean {
    background: var(--success-bg);
    border-color: var(--success-border);
}
.summary-item.clean .count {
    color: var(--success-light);
}

.summary-item.banned {
    background: var(--danger-bg);
    border-color: var(--danger-border);
}
.summary-item.banned .count {
    color: var(--danger-light);
}

.summary-item.warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
}
.summary-item.warning .count {
    color: var(--warning-light);
}

/* Тело модалки с прокруткой */
.modal-body {
    overflow-y: auto;
    padding: 0 32px 32px 32px;
    flex: 1;
    min-height: 0;
    scroll-behavior: smooth;
}

/* Сетка карточек */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* ============================================
   КАРТОЧКА АККАУНТА (точно как на скриншоте)
   ============================================ */

.account-card {
    position: relative;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid;
    background: var(--dark-elevated);
    transition: all 0.2s ease;
    animation: cardSlide 0.4s ease;
    overflow: hidden;
}

/* Цвета рамки по статусу */
.account-card.clean {
    border-color: var(--success-border);
    background: var(--success-bg);
}

.account-card.banned {
    border-color: var(--danger-border);
    background: var(--danger-bg);
}

.account-card.warning {
    border-color: var(--warning-border);
    background: var(--warning-bg);
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.account-card.clean:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.account-card.banned:hover {
    border-color: rgba(239, 68, 68, 0.4);
}

.account-card.warning:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

/* Верхняя строка: аватар + инфо + бейдж */
.card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Аватарка */
.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--dark-surface);
    border: 2px solid var(--dark-border);
    transition: all 0.2s;
}

.card-avatar:hover {
    border-color: var(--brand-500);
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-avatar .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-dark-muted);
    font-weight: 800;
}

.avatar-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Инфо блок */
.card-info {
    flex: 1;
    min-width: 0;
}

.card-nickname {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.card-steamid {
    font-size: 11px;
    color: var(--text-dark-muted);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    margin-top: 2px;
    line-height: 1.4;
}

/* Бейдж статуса */
.status-badge {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    line-height: 1;
}

.status-badge.clean {
    background: var(--success);
    color: white;
}

.status-badge.banned {
    background: var(--danger);
    color: white;
}

.status-badge.warning {
    background: var(--warning);
    color: white;
}

/* Детали в карточке */
.card-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-row {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
}

.detail-row.clean {
    background: var(--success-bg-strong);
    color: var(--success-light);
}

.detail-row.banned {
    background: var(--danger-bg-strong);
    color: var(--danger-light);
}

.detail-row.warning {
    background: var(--warning-bg-strong);
    color: var(--warning-light);
}

.detail-label {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    font-size: 11px;
}

/* Ссылки в карточке */
.card-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.card-links a {
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-fear {
    color: #818cf8;
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.2);
}
.link-fear:hover {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
}

.link-steam {
    color: #7dd3fc;
    background: rgba(56,189,248,0.1);
    border-color: rgba(56,189,248,0.2);
}
.link-steam:hover {
    background: rgba(56,189,248,0.2);
    color: #bae6fd;
}

.link-yooma {
    color: #fca5a5;
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.2);
}
.link-yooma:hover {
    background: rgba(239,68,68,0.2);
    color: #fecaca;
}

/* ERROR */
.error-message {
    display: none;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    padding: 14px;
    margin-top: 16px;
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ANIMATIONS */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes cardSlide {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--dark-border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3e3e4e;
}

/* DROP ZONE ACTIVE STATE */
.drop-zone.dragover {
    border-color: rgba(99, 102, 241, 0.5) !important;
    background-color: rgba(99, 102, 241, 0.05) !important;
}

/* SAVE BANNER */
.save-banner {
    margin: 0 32px 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* MOBILE */
@media (max-width: 768px) {
    .card {
        padding: 24px 20px;
    }
    h1 {
        font-size: 24px;
    }
    .modal-container {
        max-height: 95vh;
        border-radius: 20px;
    }
    .modal-header {
        padding: 16px 20px;
    }
    .modal-header h2 {
        font-size: 20px;
    }
    .modal-summary {
        padding: 12px 20px;
        gap: 8px;
    }
    .summary-item {
        padding: 10px 16px;
        min-width: 70px;
    }
    .summary-item .count {
        font-size: 20px;
    }
    .modal-body {
        padding: 0 20px 20px 20px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .account-card {
        padding: 14px;
    }
    .save-banner {
        margin: 0 20px 12px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 8px;
    }
    .modal-header {
        padding: 12px 16px;
    }
    .modal-summary {
        padding: 10px 16px;
    }
    .modal-body {
        padding: 0 16px 16px 16px;
    }
    .card-avatar {
        width: 40px;
        height: 40px;
    }
    .status-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
}