/**
 * Check proxy — giao diện đồng bộ html/checkproxy.html (scoped trong SPA #view-checkproxy).
 */
#view-checkproxy .checkproxy-surface {
    --cp-bg-dark: #020617;
    --cp-bg-card: rgba(15, 23, 42, 0.5);
    --cp-bg-card-hover: rgba(15, 23, 42, 0.7);
    --cp-border-light: rgba(255, 255, 255, 0.08);
    --cp-border-lighter: rgba(255, 255, 255, 0.15);
    --cp-text-main: #cbd5e1;
    --cp-text-muted: #64748b;
    --cp-text-white: #ffffff;
    --cp-accent-cyan: #06b6d4;
    --cp-accent-emerald: #10b981;
    --cp-accent-blue: #3b82f6;
    --cp-status-ok: #10b981;
    --cp-status-ok-bg: rgba(16, 185, 129, 0.15);
    --cp-status-err: #ef4444;
    --cp-status-err-bg: rgba(239, 68, 68, 0.15);
    --cp-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;

    font-family: var(--cp-font);
    background-color: var(--cp-bg-dark);
    color: var(--cp-text-main);
    /* min-height: calc(100vh - 120px); */
    overflow: hidden;
    position: relative;
    line-height: 1.5;
    padding-bottom: 48px;
}

#view-checkproxy .checkproxy-surface,
#view-checkproxy .checkproxy-surface * {
    box-sizing: border-box;
}

#view-checkproxy ::selection {
    background-color: rgba(6, 182, 212, 0.3);
    color: var(--cp-text-white);
}

#view-checkproxy .checkproxy-surface .cp-ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

#view-checkproxy .checkproxy-surface .cp-glow-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background-color: rgba(6, 182, 212, 0.15);
}

#view-checkproxy .checkproxy-surface .cp-glow-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background-color: rgba(168, 85, 247, 0.12);
}

#view-checkproxy .checkproxy-surface .cp-glow-3 {
    top: 30%;
    right: 20%;
    width: 300px;
    height: 300px;
    background-color: rgba(16, 185, 129, 0.08);
}

#view-checkproxy .checkproxy-surface .cp-container {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

#view-checkproxy .checkproxy-surface .cp-page-header {
    text-align: center;
}

#view-checkproxy .checkproxy-surface .cp-page-header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--cp-text-white);
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin-bottom: 8px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

#view-checkproxy .checkproxy-surface .cp-page-header h1 span {
    background: linear-gradient(to right, var(--cp-accent-cyan), var(--cp-accent-emerald));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.4));
}

#view-checkproxy .checkproxy-surface .cp-page-header p {
    color: var(--cp-text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

#view-checkproxy .checkproxy-surface .cp-glass-card {
    background: var(--cp-bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--cp-border-light);
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

#view-checkproxy .checkproxy-surface .cp-glass-card:hover {
    border-color: var(--cp-border-lighter);
    box-shadow: 0 20px 40px -15px rgba(6, 182, 212, 0.1);
}

#view-checkproxy .checkproxy-surface .cp-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

#view-checkproxy .checkproxy-surface .cp-form-label {
    color: var(--cp-text-white);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
}

#view-checkproxy .checkproxy-surface .cp-form-label .cp-dot {
    width: 8px;
    height: 8px;
    background-color: var(--cp-accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper {
    position: relative;
    border-radius: 24px;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(to right, rgba(6, 182, 212, 0), rgba(6, 182, 212, 0.4), rgba(168, 85, 247, 0));
    border-radius: 26px;
    filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper:focus-within::before {
    opacity: 1;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea {
    width: 100%;
    height: 200px;
    background-color: rgba(2, 6, 23, 0.6);
    color: #e2e8f0;
    border: 1px solid var(--cp-border-light);
    border-radius: 24px;
    padding: 24px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea:focus {
    border-color: rgba(6, 182, 212, 0.5);
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea::placeholder {
    color: #475569;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea::-webkit-scrollbar {
    width: 8px;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.5);
    border-radius: 10px;
    margin: 10px;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

#view-checkproxy .checkproxy-surface .cp-textarea-wrapper textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.5);
}

#view-checkproxy .checkproxy-surface .cp-controls-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    align-items: flex-end;
}

#view-checkproxy .checkproxy-surface .cp-dropdown {
    position: relative;
}

#view-checkproxy .checkproxy-surface .cp-dropdown-label {
    color: var(--cp-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    padding-left: 8px;
}

#view-checkproxy .checkproxy-surface .cp-dropdown-btn {
    width: 100%;
    background-color: rgba(2, 6, 23, 0.6);
    border: 1px solid var(--cp-border-light);
    border-radius: 999px;
    padding: 16px 24px;
    color: var(--cp-text-white);
    font-family: inherit;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

#view-checkproxy .checkproxy-surface .cp-dropdown-btn:hover,
#view-checkproxy .checkproxy-surface .cp-dropdown-btn:focus {
    border-color: var(--cp-border-lighter);
    background-color: rgba(15, 23, 42, 0.8);
}

#view-checkproxy .checkproxy-surface .cp-dropdown-btn .cp-icon-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

#view-checkproxy .checkproxy-surface .cp-dropdown-btn svg {
    color: var(--cp-text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

#view-checkproxy .checkproxy-surface .cp-dropdown.cp-is-open .cp-dropdown-btn svg.cp-chevron {
    transform: rotate(180deg);
}

#view-checkproxy .checkproxy-surface .cp-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cp-border-light);
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 50;
}

#view-checkproxy .checkproxy-surface .cp-dropdown.cp-is-open .cp-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#view-checkproxy .checkproxy-surface .cp-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--cp-text-main);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s ease;
    text-align: left;
}

#view-checkproxy .checkproxy-surface .cp-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cp-text-white);
}

#view-checkproxy .checkproxy-surface .cp-dropdown-item.cp-is-active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cp-accent-cyan);
    font-weight: 600;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary {
    position: relative;
    width: 100%;
    background: linear-gradient(to right, var(--cp-accent-cyan), var(--cp-accent-blue));
    border: none;
    border-radius: 999px;
    padding: 16px 32px;
    color: var(--cp-text-white);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 58px;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(6, 182, 212, 0.6);
}

#view-checkproxy .checkproxy-surface .cp-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary:hover:not(:disabled)::after {
    left: 100%;
    transition: 0.7s ease-in-out;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary .cp-spinner {
    animation: cp-checkproxy-spin 1s linear infinite;
    display: none;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary.cp-is-loading .cp-spinner {
    display: block;
}

#view-checkproxy .checkproxy-surface .cp-btn-primary.cp-is-loading .cp-icon-play {
    display: none;
}

@keyframes cp-checkproxy-spin {
    100% {
        transform: rotate(360deg);
    }
}

#view-checkproxy .checkproxy-surface .cp-results-section {
    animation: cp-checkproxy-fade-in 0.5s ease;
}

@keyframes cp-checkproxy-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#view-checkproxy .checkproxy-surface .cp-results-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid var(--cp-border-light);
    border-bottom: 1px solid var(--cp-border-light);
    margin: 0 -32px;
    background: rgba(2, 6, 23, 0.3);
}

#view-checkproxy .checkproxy-surface .cp-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

#view-checkproxy .checkproxy-surface .cp-stat-ok {
    color: var(--cp-status-ok);
    display: flex;
    align-items: center;
    gap: 6px;
}

#view-checkproxy .checkproxy-surface .cp-stat-err {
    color: var(--cp-status-err);
    display: flex;
    align-items: center;
    gap: 6px;
}

#view-checkproxy .checkproxy-surface .cp-stat-divider {
    color: var(--cp-text-muted);
    font-weight: 400;
}

#view-checkproxy .checkproxy-surface .cp-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

#view-checkproxy .checkproxy-surface .cp-btn-secondary {
    background: transparent;
    border: 1px solid var(--cp-border-lighter);
    color: var(--cp-text-main);
    padding: 10px 20px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

#view-checkproxy .checkproxy-surface .cp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cp-text-white);
    border-color: var(--cp-border-light);
}

#view-checkproxy .checkproxy-surface .cp-table-wrapper {
    margin: 0 -32px -32px -32px;
    overflow-x: auto;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
}

#view-checkproxy .checkproxy-surface .cp-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
}

#view-checkproxy .checkproxy-surface .cp-table-wrapper th {
    padding: 16px 24px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--cp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--cp-border-light);
    background: rgba(2, 6, 23, 0.4);
}

#view-checkproxy .checkproxy-surface .cp-table-wrapper td {
    padding: 18px 24px;
    font-size: 0.95rem;
    color: var(--cp-text-main);
    border-bottom: 1px solid var(--cp-border-light);
    vertical-align: middle;
}

#view-checkproxy .checkproxy-surface .cp-table-wrapper td.cp-mono {
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
}

#view-checkproxy .checkproxy-surface tr.cp-main-row {
    transition: background-color 0.2s ease;
}

#view-checkproxy .checkproxy-surface tr.cp-main-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

#view-checkproxy .checkproxy-surface tr.cp-main-row.cp-has-error td {
    border-bottom: none;
}

#view-checkproxy .checkproxy-surface .cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid transparent;
}

#view-checkproxy .checkproxy-surface .cp-badge.cp-badge--ok {
    background: var(--cp-status-ok-bg);
    color: var(--cp-status-ok);
    border-color: rgba(16, 185, 129, 0.3);
}

#view-checkproxy .checkproxy-surface .cp-badge.cp-badge--err {
    background: var(--cp-status-err-bg);
    color: var(--cp-status-err);
    border-color: rgba(239, 68, 68, 0.3);
}

#view-checkproxy .checkproxy-surface .cp-cell-time {
    color: var(--cp-accent-cyan);
    font-weight: 600;
}

#view-checkproxy .checkproxy-surface .cp-cell-empty {
    color: var(--cp-text-muted);
}

#view-checkproxy .checkproxy-surface .cp-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

#view-checkproxy .checkproxy-surface tr.cp-error-row td {
    padding: 0;
    border-bottom: 1px solid var(--cp-border-light);
}

#view-checkproxy .checkproxy-surface .cp-error-content {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
    padding: 16px 24px 16px 60px;
    color: var(--cp-text-main);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

#view-checkproxy .checkproxy-surface .cp-error-content svg {
    color: var(--cp-status-err);
    flex-shrink: 0;
}

/* SEO / nội dung (đồng bộ html/checkproxy.html) */
#view-checkproxy .checkproxy-surface .cp-seo-section {
    margin-top: 20px;
    /* padding: 40px; */
    color: var(--cp-text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

#view-checkproxy .checkproxy-surface .cp-seo-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cp-text-white);
    margin-bottom: 24px;
    line-height: 1.3;
}

#view-checkproxy .checkproxy-surface .cp-seo-section h2 .cp-seo-highlight {
    background: linear-gradient(to right, var(--cp-accent-cyan), var(--cp-accent-emerald));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#view-checkproxy .checkproxy-surface .cp-seo-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cp-text-white);
    margin-top: 32px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#view-checkproxy .checkproxy-surface .cp-seo-section h3::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 24px;
    background: var(--cp-accent-cyan);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

#view-checkproxy .checkproxy-surface .cp-seo-section p {
    margin-bottom: 16px;
    text-align: justify;
}

#view-checkproxy .checkproxy-surface .cp-seo-section strong {
    color: var(--cp-text-main);
    font-weight: 700;
}

#view-checkproxy .checkproxy-surface .cp-seo-section ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 24px;
}

#view-checkproxy .checkproxy-surface .cp-seo-section ul li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
}

#view-checkproxy .checkproxy-surface .cp-seo-section ul li::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--cp-accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
}

#view-checkproxy .checkproxy-surface .cp-seo-faq {
    margin-top: 40px;
    background: rgba(2, 6, 23, 0.4);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--cp-border-light);
}

#view-checkproxy .checkproxy-surface .cp-seo-faq h3 {
    margin-top: 0;
}

#view-checkproxy .checkproxy-surface .cp-faq-item {
    border-bottom: 1px solid var(--cp-border-light);
    padding: 20px 0;
}

#view-checkproxy .checkproxy-surface .cp-faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#view-checkproxy .checkproxy-surface .cp-faq-question {
    font-weight: 700;
    color: var(--cp-text-main);
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

#view-checkproxy .checkproxy-surface .cp-faq-question svg {
    color: var(--cp-accent-emerald);
    flex-shrink: 0;
    margin-top: 2px;
}

#view-checkproxy .checkproxy-surface .cp-faq-answer {
    color: var(--cp-text-muted);
    font-size: 0.95rem;
    padding-left: 36px;
    line-height: 1.7;
}

#view-checkproxy .checkproxy-surface .cp-faq-answer code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--cp-accent-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    #view-checkproxy .checkproxy-surface .cp-controls-grid {
        grid-template-columns: 1fr;
    }

    #view-checkproxy .checkproxy-surface .cp-page-header h1 {
        font-size: 2.5rem;
    }

    #view-checkproxy .checkproxy-surface .cp-glass-card {
        padding: 20px;
    }

    #view-checkproxy .checkproxy-surface .cp-results-action-bar,
    #view-checkproxy .checkproxy-surface .cp-table-wrapper {
        margin-left: -20px;
        margin-right: -20px;
    }

    #view-checkproxy .checkproxy-surface .cp-table-wrapper {
        margin-bottom: -20px;
    }

    #view-checkproxy .checkproxy-surface .cp-results-action-bar {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    #view-checkproxy .checkproxy-surface .cp-seo-section {
        padding: 24px 20px;
    }

    #view-checkproxy .checkproxy-surface .cp-seo-section h2 {
        font-size: 1.5rem;
    }

    #view-checkproxy .checkproxy-surface .cp-seo-faq {
        padding: 24px 20px;
    }
}
