* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 防止FOUC - 表单页面输入框样式重置 */
.form-container input, .form-container textarea {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #1a1a2e 75%, #16213e 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.watermark {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    z-index: 1;
    will-change: opacity;
}

.watermark.active {
    opacity: 1;
}

.watermark.safe {
    background: rgba(52, 199, 89, 0.05);
}

.watermark.danger {
    background: rgba(255, 107, 129, 0.1);
}

.watermark-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.watermark-text {
    position: absolute;
    white-space: nowrap;
    color: rgba(255, 107, 129, 0.08);
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    will-change: transform;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    top: -180px;
    left: -120px;
}

.blob-2 {
    width: 450px;
    height: 450px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    top: 50%;
    right: -150px;
    animation-delay: -5s;
}

.blob-3 {
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    bottom: -130px;
    left: 35%;
    animation-delay: -10s;
}

@keyframes blobMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(40px, -40px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

.bg-decoration.danger .blob-1 {
    background: linear-gradient(135deg, #ff3b30, #ff4d4d);
}

.bg-decoration.danger .blob-2 {
    background: linear-gradient(135deg, #ff6b81, #ff8fa3);
}

.bg-decoration.danger .blob-3 {
    background: linear-gradient(135deg, #ff4d4d, #ff6b81);
}

.bg-decoration.safe .blob-1 {
    background: linear-gradient(135deg, #34c759, #5fd068);
}

.bg-decoration.safe .blob-2 {
    background: linear-gradient(135deg, #5fd068, #81e781);
}

.bg-decoration.safe .blob-3 {
    background: linear-gradient(135deg, #81e781, #34c759);
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 150px;
    position: relative;
    z-index: 10;
}

.header {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 20;
    padding: 0 32px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.header-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    text-align: center;
    letter-spacing: 3px;
    text-shadow: 0 4px 32px rgba(99, 102, 241, 0.7);
    margin: 0;
}

.result-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    position: fixed;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 15;
}

.default-state {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.9;
    }
}

.result-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    animation: fadeInUp 0.25s ease-out;
    will-change: opacity, transform;
}

.result-state.active {
    display: flex;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.arrow-icon, .cross-icon {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safe-text {
    font-size: 20px;
    color: #a78bfa;
    font-weight: 600;
    text-align: center;
}

.warning-text {
    font-size: 20px;
    color: #ff6b81;
    font-weight: 700;
    text-align: center;
}

.reason-text {
    margin-top: 20px;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    background: rgba(255, 107, 129, 0.15);
    padding: 18px 24px;
    border-radius: 18px;
    max-width: 380px;
    word-break: break-word;
    line-height: 1.7;
}

.search-section {
    display: flex;
    justify-content: center;
    padding: 24px;
    z-index: 15;
}

.input-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 56px;
    padding: 10px 14px;
    box-shadow: 0 14px 56px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    width: 100%;
    max-width: 480px;
    position: fixed;
    bottom: 240px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 20px;
    padding: 16px 20px;
    background: transparent;
    color: #fff;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.submit-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);
}

.submit-btn svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.submit-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.65);
    background: linear-gradient(135deg, #7c7ff7 0%, #a78bfa 100%);
}

.submit-btn.danger {
    background: linear-gradient(135deg, #ff3b30 0%, #ff4d4d 100%);
    box-shadow: 0 6px 24px rgba(255, 59, 48, 0.55);
}

.submit-btn.safe {
    background: linear-gradient(135deg, #34c759 0%, #5fd068 100%);
    box-shadow: 0 6px 24px rgba(52, 199, 89, 0.55);
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.loader.active {
    display: block;
}

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

.stats-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    flex-shrink: 0;
    position: fixed;
    bottom: 140px;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 0 32px;
}

.stats-info span {
    color: #a78bfa;
    font-weight: 700;
}

.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border-radius: 28px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    fill: rgba(255, 255, 255, 0.5);
}

.nav-item svg {
    width: 26px;
    height: 26px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
    fill: rgba(255, 255, 255, 0.75);
    transform: translateY(-4px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
    fill: #a78bfa;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.2s ease-out;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    text-align: center;
    will-change: opacity, transform;
}

.toast.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.form-container {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border-radius: 24px;
    padding: 24px 24px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    -webkit-appearance: none;
}

.form-textarea {
    resize: vertical;
    min-height: 85px;
    line-height: 1.6;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus, .form-textarea:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 0 36px rgba(99, 102, 241, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

.form-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.55);
    background: linear-gradient(135deg, #7c7ff7 0%, #a78bfa 100%);
}

.form-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.38);
}

.form-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-tip {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 40px 180px 40px;
    position: relative;
    z-index: 10;
}
