/* ===========================
   GLOBAL THEME — Modern Style
   =========================== */

:root {
    --primary: #1e88e5;
    --primary-dark: #1565c0;
    --accent: #00c853;
    --accent-dark: #00a844;
    --success: #28a745;        /* ✅ thêm dòng này */
    --success-dark: #1e7e34;   /* ✅ thêm dòng này */
    --danger: #e53935;
    --danger-dark: #c62828;
    --bg-main: #f4f6f8;
    --bg-card: #ffffff;
    --text-main: #333;
    --border-light: #e0e0e0;
    --radius: 10px;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* ===== Layout ===== */
body {
    font-family: "Inter", Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    padding: 40px;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
}

h2 {
    font-weight: 700;
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

/* ===== Inputs & Forms ===== */
textarea, input, select {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: #fafafa;
    transition: all 0.3s ease;
}

textarea:focus, input:focus, select:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    outline: none;
}

/* ===== Buttons ===== */
button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

button:hover {
    transform: translateY(-1px);
}

/* Color Variants */
.btn-check {
    background: var(--primary);
    color: #fff;
}
.btn-check:hover {
    background: var(--primary-dark);
}

.btn-copy {
    background: var(--accent);
    color: #fff;
}
.btn-copy:hover {
    background: var(--accent-dark);
}

.btn-die {
    background: var(--danger);
    color: #fff;
}
.btn-die:hover {
    background: var(--danger-dark);
}

/* ===== Results ===== */
.result-box {
    margin-top: 35px;
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.result-box h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

/* ===== Table ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 15px;
}

th, td {
    border: 1px solid var(--border-light);
    padding: 12px 10px;
    text-align: center;
}

th {
    background: #f1f3f5;
    color: var(--primary-dark);
    font-weight: 600;
    text-transform: uppercase;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:hover {
    background-color: #f0f9ff;
}

/* ===== Flex Layout ===== */
.flex {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.flex > div {
    flex: 1;
}

@media (min-width: 768px) {
    .flex {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* ===== Status Labels ===== */
.status-live,
.live {
    display: inline-block;
    min-width: 60px;
    padding: 6px 12px;
    background-color: var(--success);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.status-die,
.die {
    display: inline-block;
    min-width: 60px;
    padding: 6px 12px;
    background-color: var(--danger);
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

/* ===== Headings ===== */
.live-heading {
    color: var(--live);
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 16px 0;
}

.die-heading {
    color: var(--die);
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 16px 0;
}


/* ===== Progress Text ===== */
#proxy-progress {
    font-weight: 600;
    color: var(--primary-dark);
    margin-top: 20px;
}

.live-count {
    color: var(--accent-dark);
}

.die-count {
    color: var(--danger-dark);
}

/* ==== Align h3 & Copy button on same line ==== */
.title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.title-row h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
}

.title-row .btn-copy {
    margin: 0;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
}

#proxyInput {
    min-height: 140px;          /* hiển thị khoảng 5 dòng */
    line-height: 1.5;
    resize: vertical;           /* vẫn cho kéo dài thêm nếu cần */
    border: 2px solid var(--primary);  /* viền đậm hơn */
    box-shadow: 0 0 6px rgba(30, 136, 229, 0.2); /* ánh sáng xanh nhẹ */
    transition: all 0.3s ease;
}

#proxyInput:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 10px rgba(21, 101, 192, 0.3); /* đậm hơn khi foc*




/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    top: 25px;
    right: 25px;
    background: var(--primary-dark);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
