
:root {
    --primary: #00f7ff;
    --secondary: #00a2ff;
    --danger: #ff3d71;
    --warning: #ffaa00;
    --success: #00d68f;
    --dark: #0a0a1a;
    --darker: #050510;
    --light: #e0e0ff;
    --ipv6-blue: #00a8ff;
    --ipv4-green: #00d68f;
}

body {
    background-color: var(--darker);
    color: var(--light);
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 粒子背景 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 247, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    color: var(--ipv6-blue);
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, var(--ipv6-blue), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version {
    font-size: 0.8rem;
    color: rgba(224, 224, 255, 0.6);
    margin-left: 0.5rem;
}

/* IPv6检测面板 */
.ipv6-panel {
    background: linear-gradient(135deg, rgba(10, 10, 26, 0.9), rgba(5, 5, 16, 0.95));
    border: 1px solid rgba(0, 247, 255, 0.15);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 247, 255, 0.05);
    border-bottom: 1px solid rgba(0, 247, 255, 0.1);
}

.panel-title {
    display: flex;
    align-items: center;
    color: var(--ipv6-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
}

.panel-title i {
    margin-right: 0.8rem;
    font-size: 1.3rem;
}

.panel-buttons {
    display: flex;
    gap: 0.5rem;
}

.panel-btn {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(224, 224, 255, 0.1);
    cursor: pointer;
}

.panel-btn.active {
    background: var(--ipv6-blue);
}

.panel-body {
    padding: 1.5rem;
}

/* IPv6地址展示 */
.ipv6-address-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 168, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.ipv6-address-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.05), transparent);
    z-index: -1;
}

/* IPv4地址展示 */
.ipv4-address-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 168, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.ipv4-address-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.05), transparent);
    z-index: -1;
}

.ipv4-address-label {
    font-size: 0.8rem;
    color: rgba(224, 224, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}


.ipv4-address {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.4rem;
    color: var(--ipv6-blue);
    word-break: break-all;
    line-height: 1.5;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

.ipv6-address-label {
    font-size: 0.8rem;
    color: rgba(224, 224, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.ipv6-address {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.4rem;
    color: var(--ipv6-blue);
    word-break: break-all;
    line-height: 1.5;
    text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

/* 网络信息网格 */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.network-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 247, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 247, 255, 0.05), transparent);
    z-index: -1;
}

.network-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 247, 255, 0.1);
}

.network-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--primary);
}

.network-card-status {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: rgba(0, 214, 143, 0.1);
    color: var(--success);
}

.network-card-status.warning {
    background: rgba(255, 170, 0, 0.1);
    color: var(--warning);
}

.network-card-status.danger {
    background: rgba(255, 61, 113, 0.1);
    color: var(--danger);
}

.network-card-body {
    font-size: 0.9rem;
}

.data-row {
    display: flex;
    margin-bottom: 0.8rem;
}

.data-label {
    width: 120px;
    color: rgba(224, 224, 255, 0.6);
    font-size: 0.8rem;
}

.data-value {
    flex: 1;
    word-break: break-all;
}

.data-value.ipv6 {
    color: var(--ipv6-blue);
    font-weight: bold;
}

.data-value.ipv4 {
    color: var(--ipv4-green);
    font-weight: bold;
}

/* 网络可视化 */
.network-visualization {
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 247, 255, 0.1);
}

.hexagon {
    position: absolute;
    width: 60px;
    height: 34.64px;
    background-color: rgba(0, 168, 255, 0.2);
    border: 1px solid var(--ipv6-blue);
    transform: rotate(90deg);
}

.hexagon::before, .hexagon::after {
    content: "";
    position: absolute;
    width: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
}

.hexagon::before {
    bottom: 100%;
    border-bottom: 17.32px solid rgba(0, 168, 255, 0.2);
    border-bottom-color: inherit;
}

.hexagon::after {
    top: 100%;
    width: 0;
    border-top: 17.32px solid rgba(0, 168, 255, 0.2);
    border-top-color: inherit;
}

.connection-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--ipv6-blue), transparent);
    transform-origin: left center;
}

.map-label {
    position: absolute;
    color: var(--light);
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
}

/* 底部状态栏 */
.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(0, 247, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(224, 224, 255, 0.6);
}

.signal-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signal-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(224, 224, 255, 0.2);
}

.signal-dot.active {
    background: var(--success);
}

.timestamp {
    font-family: 'Roboto Mono', monospace;
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes scanning {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.scanning-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 168, 255, 0.1), 
        transparent);
    animation: scanning 2s infinite;
}

.loading-text::after {
    content: '...';
    animation: pulse 1.5s infinite steps(4, end);
}

/* IPv6地址压缩/展开按钮 */
.toggle-ipv6-btn {
    background: rgba(0, 168, 255, 0.1);
    color: var(--ipv6-blue);
    border: 1px solid rgba(0, 168, 255, 0.3);
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.toggle-ipv6-btn:hover {
    background: rgba(0, 168, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .network-grid {
        grid-template-columns: 1fr;
    }
    
    .data-row {
        flex-direction: column;
    }
    
    .data-label {
        width: 100%;
        margin-bottom: 0.3rem;
    }
    
    .ipv6-address {
        font-size: 1rem;
    }
}
