* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* 标题 SVG 描边动画 */
.title-wrapper {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.title-text {
    font-size: 64px;
    font-weight: bold;
    text-transform: uppercase;
    fill: none;
    stroke-width: 2px;
    stroke-dasharray: 90 310;
    animation: title-stroke 6s infinite linear;
}

@media (max-width: 768px) {
    .title-text {
        font-size: 24px;
    }
}

.title-text-1 {
    stroke: #3498db;
    animation-delay: -1.5s;
}

.title-text-2 {
    stroke: #f39c12;
    animation-delay: -3s;
}

.title-text-3 {
    stroke: #e74c3c;
    animation-delay: -4.5s;
}

.title-text-4 {
    stroke: #9b59b6;
    animation-delay: -6s;
}

@keyframes title-stroke {
    100% {
        stroke-dashoffset: -400;
    }
}

.form-group {
    margin-bottom: 2rem;
}

form.ip-form-multi {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.ip-form-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ip-form-row input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    background-color: #111111;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ip-form-row input:focus {
    outline: none;
    border-color: #555555;
    background-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(80, 250, 123, 0.15);
}

.ip-form-row button {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
}

input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #111111;
    border: 1px solid #333333;
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #555555;
    background-color: #1a1a1a;
}

button {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: #222222;
    border-radius: 6px;
    border: 1px solid #333333;
    transition: all 0.2s ease;
    cursor: pointer;
}

button:hover {
    background-color: #333333;
    border-color: #555555;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.skipped-msg {
    color: #f1fa8c;
    background-color: #2a2a11;
    border: 1px solid #444422;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* 加载动画：三球轨道 */
.loading-wrap {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
}

.loader {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.orb {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    animation: orb-float 1.8s ease-in-out infinite;
}

.orb-1 {
    background: linear-gradient(135deg, #50fa7b, #00d9ff);
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.orb-2 {
    background: linear-gradient(135deg, #ff79c6, #bd93f9);
    bottom: 10%;
    left: 10%;
    animation-delay: 0.3s;
}

.orb-3 {
    background: linear-gradient(135deg, #f1fa8c, #ffb86c);
    bottom: 10%;
    right: 10%;
    animation-delay: 0.6s;
}

@keyframes orb-float {
    0%, 100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -20px) scale(1.15);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -12px) scale(1.08);
        opacity: 0.95;
    }
}

.orb-2 { animation-name: orb-float-2; }
.orb-3 { animation-name: orb-float-3; }

@keyframes orb-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    33% { transform: translate(15px, -15px) scale(1.1); opacity: 0.9; }
    66% { transform: translate(-5px, -8px) scale(1.05); opacity: 0.95; }
}

@keyframes orb-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
    33% { transform: translate(-15px, -15px) scale(1.1); opacity: 0.9; }
    66% { transform: translate(5px, -8px) scale(1.05); opacity: 0.95; }
}

.loading-text {
    color: #888;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

/* 三列结果布局 */
.result-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 结果卡片：伪元素实现 hover 旋转渐变边框 + 模糊光晕（外层 overflow:visible 才能露出光晕） */
.result-row {
    position: relative;
    border-radius: 10px;
    overflow: visible;
    background: #0d0d0d;
    backface-visibility: hidden;
}
.result-row-inner {
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #333;
}
/* 比卡片大 2px 的矩形，置于下层，形成边框层 */
.result-row::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 12px;
    z-index: -1;
}
/* 同上，再下一层并高斯模糊，形成光晕 */
.result-row::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 12px;
    z-index: -2;
    filter: blur(40px);
}
/* hover 时 .result-row-glowing 的 ::before/::after 背景由脚本按帧更新为旋转渐变 */

.result-row-ip {
    padding: 0.6rem 1rem;
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    color: #50fa7b;
    font-weight: 600;
    font-family: 'SF Mono', Monaco, monospace;
    border-bottom: 1px solid #333;
}

.result-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    min-height: 120px;
}

.result-col {
    border-right: 1px solid #333;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.result-col:last-child {
    border-right: none;
}

.result-col-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6272a4;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-cell {
    flex: 1;
    font-size: 0.85rem;
}

.result-cell pre {
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #fff;
    white-space: pre-wrap;
    word-break: break-all;
}

.result-cell.result-error {
    color: #ff5555;
}

.error {
    color: #ff4444;
    background-color: #2a1111;
    border: 1px solid #442222;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.result-container {
    margin-top: 2rem;
}

.result-code {
    background-color: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

.result-code pre {
    margin: 0;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #ffffff;
}

.result-code code {
    display: block;
}

.result-key {
    color: #ff79c6;
}

.result-string {
    color: #f1fa8c;
}

.result-number {
    color: #bd93f9;
}

.result-value {
    color: #50fa7b;
}

.result-null {
    color: #6272a4;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .result-cols {
        grid-template-columns: 1fr;
    }
    .result-col {
        border-right: none;
        border-bottom: 1px solid #333;
    }
    .result-col:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    form.ip-form-multi button {
        width: 100%;
    }
    
    .result-code {
        padding: 1rem;
    }
    
    .result-code pre {
        font-size: 0.8rem;
    }
}
