:root {
    --holored: #ff0055;
    --glass-bg: rgba(255, 0, 85, 0.1);
    --text-glow: 0 0 15px rgba(255, 0, 85, 0.4);
    --safe-dark: #238823;
    --safe-light: #4CAF50;
    --warning-light: #CDDC39;
    --warning: #FFEB3B;
    --danger-light: #FF9800;
    --danger: #D32F2F;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, a:hover, a:focus, a:active {
    text-decoration: none !important;
    outline: none;
    border-bottom: none !important;
}

.no-underline {
    text-decoration: none !important;
    border-bottom: 0 !important;
}

html, body {
    height: 100%;
}

body {
    background: #ffffff;
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.verify-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-card {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255,0,85,0.08);
    border: 2px solid rgba(255, 0, 85, 0.3);
    border-radius: 30px;
    max-width: 500px;
    width: 90%;
}

.verify-logo {
    font-size: 3em;
    font-weight: 700;
    color: var(--holored);
    text-shadow: var(--text-glow);
    margin-bottom: 20px;
}

.verify-tip {
    color: var(--holored);
    font-size: 1.1em;
    margin-bottom: 30px;
}

.cf-main-container {
    display: flex;
    justify-content: center;
}

.watermark-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    font-size: 14vw;
    font-weight: 900;
    color: rgba(255, 0, 85, 0.03);
    z-index: 0;
    animation: watermark-float 30s infinite;
    white-space: nowrap;
    max-width: 95vw;
    letter-spacing: -0.05em;
    overflow: visible;
    pointer-events: none;
}

@keyframes watermark-float {
    0% { transform: translate(-50%, -50%) rotate(-3deg); }
    50% { transform: translate(-50%, -52%) rotate(3deg); }
    100% { transform: translate(-50%, -50%) rotate(-3deg); }
}

.main-wrapper {
    flex: 1;
    position: relative;
    padding: 0 0 40px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    width: 100%;
    margin: 0 auto;
}

.full-logo {
    font-size: 2.8em;
    font-weight: 700;
    color: var(--holored);
    text-shadow: var(--text-glow);
    letter-spacing: 1px;
}

.logo-link {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-hover-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 12px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.logo-link:hover .logo-hover-effect {
    box-shadow: 0 0 25px rgba(255,0,85,0.2);
}

.brand-slogan {
    width: 100%;
    text-align: center;
    margin: 0 auto 30px;
}

.slogan-en {
    font-size: 1.3em;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--holored);
}

.slogan-zh {
    font-size: 0.95em;
    color: var(--holored);
}

/* 语言切换按钮 - 纯文字长方形 */
.lang-switch {
    background: transparent;
    border: none;
    color: var(--holored);
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.3s;
}

.lang-switch:hover {
    opacity: 0.7;
}

.main-card {
    background: rgba(255,0,85,0.08);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 0, 85, 0.3);
    border-radius: 30px;
    padding: 50px;
    width: 90%;
    max-width: 800px;
    margin: 0 auto auto;
    box-shadow: 0 0 80px rgba(255, 0, 85, 0.15);
    height: auto;
    min-height: auto;
    overflow: visible;
}

.card-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--holored);
    font-size: 2.2em;
    text-shadow: 0 0 20px rgba(255,0,85,0.4),
                 0 0 40px rgba(255,0,85,0.2);
}

.tool-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--holored) !important;
    border-radius: 12px !important;
    background: white;
    color: var(--holored);
    margin-bottom: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff0055' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 1em;
}

.tool-selector select:focus {
    border-color: var(--holored);
    outline: 2px solid rgba(255,0,85,0.3);
    box-shadow: 0 0 25px rgba(255,0,85,0.5) !important;
}

.input-group {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

input {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid #ff0055;
    border-radius: 12px;
    font-size: 14px;
    color: #ff0055;
    background: white;
    transition: all 0.3s ease;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

input::placeholder {
    color: rgba(255, 0, 85, 0.5);
}

input:hover {
    box-shadow: 0 0 15px rgba(255,0,85,0.3);
}

input:focus {
    box-shadow: 0 0 25px rgba(255,0,85,0.5);
    outline: none;
}

.scan-button {
    background: var(--holored);
    color: white !important;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: btn-glow 2s infinite;
    min-width: 120px;
    z-index: 1;
    white-space: nowrap;
}

.scan-button .btn-text {
    position: relative;
    z-index: 2;
    color: white !important;
}

@keyframes btn-glow {
    0% { box-shadow: 0 0 10px rgba(255,0,85,0.3); }
    50% { box-shadow: 0 0 25px rgba(255,0,85,0.5); }
    100% { box-shadow: 0 0 10px rgba(255,0,85,0.3); }
}

.scan-button:hover {
    transform: scale(1.05);
    animation: none;
}

.scan-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 25%,
        rgba(255,255,255,0.3) 50%,
        transparent 75%
    );
    animation: slashGlow 2s infinite;
    opacity: 0.6;
    z-index: 0;
}

@keyframes slashGlow {
    0% { transform: translate(-100%, -100%) rotate(45deg); }
    100% { transform: translate(100%, 100%) rotate(45deg); }
}

.cf-container {
    margin: 20px auto;
    width: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-panel {
    display: none;
    margin-top: 30px;
    width: 100%;
}

.result-title {
    color: var(--holored);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 0, 85, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.info-label {
    color: var(--holored);
    font-weight: 500;
    flex-shrink: 0;
}

.info-value {
    color: #333;
    font-weight: 600;
    word-break: break-word;
    text-align: right;
    flex: 1;
    min-width: 200px;
}

.map-container {
    height: 400px;
    margin: 20px 0;
    border: 2px solid var(--holored);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.map-source {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255,255,255,0.8);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    color: #333;
}

.hop-list {
    margin-top: 20px;
    border: 1px solid rgba(255, 0, 85, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.hop-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 0, 85, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.hop-item:last-child {
    border-bottom: none;
}

.hop-number {
    color: var(--holored);
    font-weight: bold;
    min-width: 40px;
}

.hop-ip {
    flex: 1;
    margin: 0 15px;
    color: #333;
    word-break: break-all;
}

.hop-latency {
    color: #666;
    font-weight: 500;
    min-width: 80px;
    text-align: right;
}

.whois-raw {
    margin-top: 20px;
}

.whois-raw h4 {
    color: var(--holored);
    margin-bottom: 10px;
}

.whois-raw pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 15px 5%;
    }

    .brand-slogan {
        display: none;
    }

    .main-card {
        padding: 30px 20px;
        width: 95%;
    }

    .input-group {
        flex-direction: column;
        gap: 12px;
    }

    .scan-button {
        width: 100%;
    }

    .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center;
    }

    .full-logo {
        font-size: 2em;
    }

    .map-container {
        height: 250px;
    }

    input {
        font-size: 14px;
        padding: 12px 15px;
        min-width: auto;
        width: 100%;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .info-value {
        text-align: left;
        min-width: auto;
    }

    .hop-item {
        flex-direction: column;
        gap: 5px;
    }

    .hop-ip {
        margin: 5px 0;
    }

    .hop-latency {
        text-align: left;
    }

    .verify-card {
        padding: 40px 20px;
    }

    .verify-logo {
        font-size: 2em;
    }

    .lang-switch {
        font-size: 14px;
        padding: 6px 12px;
    }
}

.global-footer {
    text-align: center;
    padding: 25px 0;
    color: #ff0055;
    margin-top: auto;
    font-size: 14px;
    display: block !important;
}

.global-footer span {
    color: #ff0055;
}

.error-toast {
    background: linear-gradient(145deg, #ff0055, #cc0044);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@keyframes toast-fade {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
