* {
    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(60px);
    opacity: 0.5;
    will-change: transform;
}

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

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

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

@keyframes blobMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) 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: 60px;
    padding-bottom: 120px;
    position: relative;
    z-index: 10;
}

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

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

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

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

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

.dot {
    width: 16px;
    height: 16px;
    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.2);
        opacity: 0.8;
    }
}

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

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

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

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

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

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

.reason-text {
    margin-top: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    background: rgba(255, 107, 129, 0.15);
    padding: 10px 16px;
    border-radius: 12px;
    max-width: 280px;
    word-break: break-word;
    line-height: 1.5;
}

.reason-category {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.reason-detail {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.4;
    word-break: break-word;
    text-align: left;
}

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

.input-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 8px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 280px;
    position: fixed;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    box-sizing: border-box;
}

.input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 12px 16px;
    background: transparent;
    color: #fff;
    box-sizing: border-box;
    margin: 0;
}

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

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

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

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

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

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

.loader {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.loader.active {
    display: block;
}

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

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

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

.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 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: 46px;
    height: 46px;
    border-radius: 16px;
    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: 22px;
    height: 22px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    fill: rgba(255, 255, 255, 0.75);
}

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

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

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

.form-container {
    width: 100%;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 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: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

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

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

.form-input, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    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: 40px;
    line-height: 1.3;
    padding: 8px 12px;
}

.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 30px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

.form-input-password {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    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;
    box-sizing: border-box;
}

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

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

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

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

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

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

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

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