@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #bb86fc;
    --surface-color: #1e1e1e;
    --on-surface-color: #ffffff;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

.container {
    max-width: 800px;
    padding: 2rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 500;
    color: var(--on-surface-color);
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
}

.node-info {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.node-info h2 {
    margin-top: 0;
}

.node-info p {
    font-size: 1.1rem;
}

.status-online {
    color: #4caf50;
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #a050f0;
}

.features h2 {
    margin-bottom: 1.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.feature {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
}

.feature h3 {
    margin-top: 0;
}

footer {
    margin-top: 3rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

.language-switcher {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
}

.language-switcher a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 20px; /* Rounded corners for the button */
    transition: background-color 0.3s ease, color 0.3s ease;
}

.language-switcher a:hover {
    background-color: var(--primary-color);
    color: #000;
}

/* Make it responsive for smaller screens */
@media (max-width: 600px) {
    .language-switcher {
        top: 1rem;
        right: 1rem;
    }
}

.nat-detector {
    margin-top: 2rem;
}

/* 结果显示区域的样式 */
#nat-result {
    margin-top: 1rem;
    font-weight: bold;
    /* --- 布局修复 --- */
    /* 允许长字符串（如IPv6地址）在不超出容器的情况下自动换行 */
    overflow-wrap: break-word;
    word-wrap: break-word; /* 兼容旧版浏览器 */
}

/* 禁用按钮的样式 */
.button[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}