/* ── Hero ── */
.gn-hero {
    background: linear-gradient(135deg, #0d1b3e 0%, #001529 100%);
    position: relative;
    padding: 8rem 4rem;
    overflow: hidden;
}

.gn-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* IP 徽章：右上角绝对定位 */
.gn-hero-ip-badge {
    position: absolute;
    right: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 7px 10px 7px 14px;
    border-radius: 12px;
}

.gn-hero-ip-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    white-space: nowrap;
}

.gn-hero-ip-value {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}

.gn-hero-ip-value:hover {
    color: #FF8F32;
}

.gn-hero-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.gn-hero-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FF8F32;
}

.gn-hero-copy-btn svg {
    width: 13px;
    height: 13px;
}

.gn-hero-divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
    flex-shrink: 0;
}

/* 标题区：居中 */
.gn-hero-inner {
    position: relative;
    text-align: center;
}

.gn-ping-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.gn-ping-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #10b981;
    border-radius: 50%;
    animation: gn-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes gn-ping {
    75%, 100% {
        transform: scale(3);
        opacity: 0;
    }
}

.gn-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.gn-hero-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.gn-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.gn-wave svg {
    display: block;
    width: calc(100% + 2px);
    height: 90px;
    rotate: 180deg;
}

/* ── Layout ── */
.gn-main {
    background: #f4f6f9;
    padding: 40px 0 64px;
    margin-top: -2px;
}

.gn-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gn-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .gn-grid-2 {
        grid-template-columns: 1fr;
    }

    .gn-hero-title {
        font-size: 26px;
    }

    .gn-mtr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .gn-mtr-input-row {
        width: 100%;
    }

    .gn-input {
        width: 100%;
    }
}

/* ── Card ── */
.gn-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 32px;
    /*box-shadow: var(--card-shadow);*/
    border: 1px solid #f1f5f9;
}

.gn-intro-card {
    padding: 24px 32px;
}

.gn-intro-text {
    font-size: 15px;
    color: #475569;
    line-height: 1.75;
    margin: 0;
}

.gn-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.gn-card-icon {
    width: 18px;
    height: 18px;
    color: #FF8F32;
    flex-shrink: 0;
}

.gn-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Filter List ── */
.gn-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gn-filter-list li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 185px;
    height: 46px;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.18s;
    background: #f8fafc;
    user-select: none;
}

.gn-filter-list li:hover {
    border-color: #ffc89a;
    background: #fff7ed;
}

.gn-filter-list .selected-li {
    color: #FF8F32;
    background: #fff7ed;
    border-color: #ffc89a;
    font-weight: 600;
}

.gn-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
}

/* ── Network Info ── */
.gn-network-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gn-network-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.gn-network-label {
    color: #475569;
    min-width: 80px;
    flex-shrink: 0;
}

.gn-network-value {
    color: #0052D9;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 13px;
}

.gn-network-value:hover {
    text-decoration: underline;
}

.gn-network-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gn-dl-link {
    color: #0052D9;
    font-size: 13px;
    text-decoration: underline;
}

.gn-dl-link:hover {
    color: #FF8F32;
}

.network-separator {
    color: #475569;
    margin: 0 2px;
}

/* ── MTR Section ── */
.gn-mtr-header {
    display: grid;
    grid-template-columns: 2fr 1.5fr;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gn-mtr-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 0 0 0 34px;
}

.gn-input {
    flex: 1;
    height: 44px;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #fafafa;
    color: #475569;
}

.gn-input:focus {
    border-color: #FF8F32;
    background: #fff;
}

@media (max-width: 768px) {
    .gn-input {
        min-width: 0;
        flex: 1;
    }
}

.gn-btn-primary {
    height: 44px;
    padding: 0 28px;
    background: #FF8F32;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gn-btn-primary:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.gn-btn-primary:active {
    transform: scale(0.97);
}

.gn-btn-loading {
    background: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.gn-btn-stop {
    background: #e74c3c !important;
    cursor: pointer !important;
}

.gn-btn-stop:hover {
    background: #c0392b !important;
    transform: translateY(-1px);
}

/* ── MTR Dark Panel ── */
.gn-mtr-panel {
    background-color: #000000;
    border-radius: 10px;
    overflow: hidden;
}

.gn-table-scroll {
    overflow-x: auto;
    padding: 24px;
}

.gn-table-scroll::-webkit-scrollbar {
    height: 5px;
}

.gn-table-scroll::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.gn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 700px;
}

.gn-table thead tr {
    background: rgba(255,255,255,0.1);
}

.gn-table th {
    padding: 6px 14px;
    text-align: left;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gn-table td {
    padding: 12px 14px;
    color: #e2e8f0;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.gn-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.gn-loading {
    display: inline-block;
    color: #fff;
    animation: gn-blink 1s step-start infinite;
}

@keyframes gn-blink {
    50% {
        opacity: 0;
    }
}

/* ── Error ── */
.gn-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ef4444;
    font-size: 13px;
    margin-top: 10px;
}

.gn-error-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: url("../images/result-error.png") center/cover no-repeat;
}

/* ── Modal ── */
.gn-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.55);
    overflow: auto;
}

.gn-modal-box {
    background: #fff;
    margin: 8% auto;
    padding: 28px 32px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: gn-modal-in 0.25s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

@keyframes gn-modal-in {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gn-modal-close {
    float: right;
    font-size: 26px;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.gn-modal-close:hover {
    color: #475569;
}

.gn-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 16px;
}

.gn-modal-data {
    flex: 1;
    overflow: auto;
}

.gn-modal-table-wrap {
    height: 100%;
}

.gn-modal-table-wrap .gn-table-scroll {
    max-height: 55vh;
    overflow-y: auto;
}

.gn-no-data {
    padding: 32px;
    text-align: center;
    color: #475569;
    font-size: 14px;
}

/* ── Download Card ── */
.gn-download-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.gn-download-body {
    display: flex;
    gap: 12px;
    align-items: center;
}

.gn-download-select {
    display: none;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: auto;
}

/* 自定义下拉 */
.gn-custom-select {
    position: relative;
    flex: 1;
    min-width: 0;
}

.gn-cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: #334155;
    background: #fafafa;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, background 0.2s;
}

.gn-cs-trigger:hover,
.gn-custom-select.open .gn-cs-trigger {
    border-color: #ffc89a;
    background: #fff;
}

.gn-cs-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gn-cs-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #94a3b8;
    margin-left: 8px;
    transition: transform 0.2s;
}

.gn-custom-select.open .gn-cs-arrow {
    transform: rotate(180deg);
}

.gn-cs-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 200;
    display: none;
    overflow: hidden;
}

.gn-custom-select.open .gn-cs-list {
    display: block;
}

.gn-cs-list li {
    padding: 11px 16px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gn-cs-list li:hover {
    color: #FF8F32;
}

.gn-cs-list li.selected {
    color: #FF8F32;
}

.gn-download-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.gn-download-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 12px 0 0;
    font-size: 12px;
    color: #475569;
}

.gn-download-size {
    color: #FF8F32;
    font-weight: 600;
}

/* ── MTR Checkpoint & IP Row ── */
.gn-mtr-sub-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-left: 26px;
}

.gn-mtr-checkpoint {
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
}

.gn-mtr-ip-list {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 10px;
    background-color: #f8fafc;
    padding: 0.125rem 0.5rem;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
}

.gn-mtr-ip-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gn-mtr-ip-sep {
    color: #94a3b8;
}

.gn-mtr-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.gn-mtr-copy-btn svg {
    width: 12px;
    height: 12px;
}

/* 机房列表换行占位 */
.gn-region-row-break {
    flex-basis: 100%;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
    pointer-events: none;
}

/* MTR 内联子表格 */
.gn-mtr-toggle {
    display: inline-block;
    color: #FF8F32;
    cursor: pointer;
    transition: opacity 0.15s;
}

.gn-mtr-toggle:hover {
    opacity: 0.75;
}

.gn-expand-row > td {
    padding: 0 !important;
}

.gn-sub-table-wrap {
    background: #000;
}

.gn-sub-table-wrap .gn-table-scroll {
    overflow-x: auto;
}

.gn-sub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gn-sub-table thead tr {
    background: rgba(255, 255, 255, 0.1);
}

.gn-sub-table thead th {
    padding: 8px 12px;
    color: #fff;
    font-size: 12px;
    text-align: left;
    border: none;
}

.gn-sub-table tbody td {
    padding: 7px 12px;
    color: #fff;
}

.gn-sub-table tbody tr:last-child td {
    border-bottom: none;
}

.gn-sub-table tbody tr:hover td {
    background: rgba(255,255,255,0.03);
}