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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #000000;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 背景动画效果 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9000, #ff6b00);
    animation: float 15s infinite ease-in-out;
}

.circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.circle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -100px;
    right: -100px;
    animation-delay: 2s;
}

.circle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
    max-width: 600px;
    width: 90%;
}

.logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: glow 2s ease-in-out infinite;
}

.logo img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 144, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 144, 0, 0.8));
    }
}

.status-box {
    background: rgba(255, 144, 0, 0.1);
    border: 2px solid #ff9000;
    border-radius: 20px;
    padding: 40px 30px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(255, 144, 0, 0.2);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 144, 0, 0.2);
    border-top-color: #ff9000;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-text {
    font-size: 20px;
    margin-bottom: 15px;
    color: #ffffff;
}

.ip-info {
    font-size: 16px;
    color: #ff9000;
    margin-top: 15px;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    line-height: 1.8;
}

/* 统一的信息项容器样式 */
.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(255, 144, 0, 0.08);
    border-radius: 10px;
    border-left: 3px solid #ff9000;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 144, 0, 0.15);
    transform: translateX(3px);
}

.info-label {
    font-size: 13px;
    color: #ffb84d;
    font-weight: 500;
    white-space: nowrap;
    margin-right: 10px;
    min-width: 80px;
}

.info-value {
    font-size: 14px;
    color: #ffffff;
    text-align: right;
    word-break: break-all;
    flex: 1;
}

/* 占位符样式 */
.info-placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    font-style: italic;
}

/* IP地址特殊样式 */
.ip-address-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ip-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.ip-type-badge.ipv4 {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #ffffff;
}

.ip-type-badge.ipv6 {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: #ffffff;
}

.ip-value {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #ffffff;
    background: rgba(255, 144, 0, 0.2);
    padding: 5px 10px;
    border-radius: 8px;
    cursor: help;
    word-break: break-all;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 144, 0, 0.2);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9000, #ffb84d);
    width: 0%;
    transition: width 0.6s ease-out;
}

.error-message {
    color: #ff4444;
    font-size: 16px;
    margin-top: 15px;
}

.force-redirect-btn {
    display: block;
    margin: 20px auto 0;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(135deg, #ff9000, #ffb84d);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 144, 0, 0.4);
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.force-redirect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 144, 0, 0.6);
    background: linear-gradient(135deg, #ffb84d, #ff9000);
}

.force-redirect-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 144, 0, 0.4);
}

.force-redirect-btn:disabled {
    background: linear-gradient(135deg, #666666, #888888);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
}

.force-redirect-btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.3);
    background: linear-gradient(135deg, #666666, #888888);
}

/* 站点列表样式 */
.site-list-title {
    font-size: 24px;
    font-weight: bold;
    color: #ff9000;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 144, 0, 0.3);
}

.site-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.site-list-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: 25px;
    padding: 12px 15px;
    background: rgba(255, 144, 0, 0.08);
    border-radius: 10px;
    border: 1px dashed rgba(255, 144, 0, 0.3);
}

.loading-text {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    padding: 20px;
}

.site-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: rgba(255, 144, 0, 0.08);
    border: 2px solid rgba(255, 144, 0, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    gap: 15px;
}

.site-item:hover {
    background: rgba(255, 144, 0, 0.15);
    border-color: #ff9000;
    box-shadow: 0 4px 15px rgba(255, 144, 0, 0.3);
}

.site-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    align-items: flex-start;
    text-align: left;
}

.site-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
}

.latency-info {
    font-size: 13px;
}

.latency-loading {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.latency-value {
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 8px;
    display: inline-block;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.latency-excellent {
    background: rgba(27, 94, 32, 0.3);
    color: #1B5E20;
    font-weight: 700;
}

.latency-good {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.latency-medium {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.latency-slow {
    background: rgba(211, 47, 47, 0.2);
    color: #D32F2F;
}

.latency-timeout {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.latency-unknown {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.visit-btn {
    padding: 10px 30px;
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(135deg, #ff9000, #ffb84d);
    border: none;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(255, 144, 0, 0.3);
}

.visit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 144, 0, 0.5);
    background: linear-gradient(135deg, #ffb84d, #ff9000);
}

.visit-btn:active {
    transform: translateY(0);
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        max-width: 100%;
        width: 95%;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .logo img {
        max-height: 90px;
    }
    
    .status-box {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .status-text {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .ip-info {
        padding: 15px 10px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 6px;
    }
    
    .info-item:hover {
        transform: none;
    }
    
    .info-label {
        font-size: 12px;
        min-width: auto;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .info-value {
        font-size: 13px;
        text-align: left;
        width: 100%;
    }
    
    .ip-address-container {
        justify-content: flex-start;
        width: 100%;
        gap: 6px;
    }
    
    .ip-type-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .ip-value {
        font-size: 12px;
        padding: 4px 8px;
        flex: 1;
        min-width: 0;
    }
    
    .force-redirect-btn {
        padding: 10px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 280px;
    }
    
    .site-list-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .site-list {
        gap: 12px;
    }
    
    .site-list-footer {
        font-size: 13px;
        margin-top: 20px;
        padding: 10px 12px;
    }
    
    .site-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
    }
    
    .site-item:hover {
        transform: none;
    }
    
    .site-info {
        gap: 6px;
    }
    
    .site-name {
        font-size: 16px;
    }
    
    .latency-info {
        font-size: 12px;
    }
    
    .visit-btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 14px;
    }
    
    .circle:nth-child(1) {
        width: 200px;
        height: 200px;
    }
    
    .circle:nth-child(2) {
        width: 150px;
        height: 150px;
    }
    
    .circle:nth-child(3) {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .logo img {
        max-height: 70px;
    }
    
    .status-box {
        padding: 20px 15px;
    }
    
    .status-text {
        font-size: 15px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 3px;
    }
    
    .info-item {
        padding: 8px 10px;
    }
    
    .info-label {
        font-size: 11px;
    }
    
    .info-value {
        font-size: 12px;
    }
    
    .ip-value {
        font-size: 11px;
    }
    
    .error-message {
        font-size: 14px;
    }
    
    .site-list-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .site-list {
        gap: 10px;
    }
    
    .site-list-footer {
        font-size: 12px;
        margin-top: 15px;
        padding: 8px 10px;
    }
    
    .site-item {
        padding: 12px;
        gap: 10px;
    }
    
    .site-name {
        font-size: 15px;
    }
    
    .latency-info {
        font-size: 11px;
    }
    
    .latency-value {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .visit-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .info-item:hover {
        background: rgba(255, 144, 0, 0.08);
        transform: none;
    }
    
    .force-redirect-btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(255, 144, 0, 0.4);
        background: linear-gradient(135deg, #ff9000, #ffb84d);
    }
}

/* 横屏小屏幕设备适配 */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        overflow-y: auto;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .container {
        padding: 20px;
        margin: 20px 0;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .logo img {
        max-height: 70px;
    }
    
    .status-box {
        padding: 20px 25px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }
    
    .background-animation {
        opacity: 0.05;
    }
}