/* 自定义样式，用于实现科技感效果 */
body {
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    position: relative;
    background-color: #0c1021; /* 更深的背景色 */
}

/* 全息网格 + 扫描线背景 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(56, 189, 248, 0.05), rgba(56, 189, 248, 0.05) 1px, transparent 1px, transparent 60px);
    background-size: 100% 4px, 60px 100%;
    animation: scanline 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 -100vh; }
}

/* 动态背景画布 */
#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
}

/* 毛玻璃效果容器 */
.glass-container {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(55, 65, 81, 0.3);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}
/* 动态辉光边框 */
.glass-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 1rem; /* 匹配容器的 rounded-2xl */
    border: 1px solid transparent;
    background: linear-gradient(120deg, transparent, #38bdf8, transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: border-scan 4s linear infinite;
}

@keyframes border-scan {
    0% { background-position: -150% 0; }
    100% { background-position: 150% 0; }
}

/* 能量角装饰 */
.corner-decorator {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #38bdf8;
    opacity: 0.7;
    animation: pulse-corner 3s infinite ease-in-out;
}
.corner-decorator.top-left { top: -2px; left: -2px; border-top-width: 2px; border-left-width: 2px; }
.corner-decorator.top-right { top: -2px; right: -2px; border-top-width: 2px; border-right-width: 2px; }
.corner-decorator.bottom-left { bottom: -2px; left: -2px; border-bottom-width: 2px; border-left-width: 2px; }
.corner-decorator.bottom-right { bottom: -2px; right: -2px; border-bottom-width: 2px; border-right-width: 2px; }

@keyframes pulse-corner {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 4px #38bdf8; }
    50% { opacity: 1; box-shadow: 0 0 12px #38bdf8; }
}

/* 输入框组 (新) */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 1.15rem; /* 调整以匹配新的输入框布局 */
    transform: translateY(-50%);
    color: rgba(156, 163, 175, 0.6);
    pointer-events: none;
    transition: color 0.3s ease, top 0.3s ease, transform 0.3s ease;
}

/* 浮动标签 (新) */
.floating-label {
    position: absolute;
    top: 0.85rem;
    left: 40px; /* 为图标留出空间 */
    color: rgba(156, 163, 175, 0.8);
    pointer-events: none;
    transition: all 0.2s ease-out;
    background-color: transparent;
    padding: 0 4px;
}

/* 输入框样式 */
.form-input {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(55, 65, 81, 0.6);
    transition: all 0.3s ease;
    padding-left: 40px; 
}

/* 浮动标签和图标的交互效果 (新) */
.form-input:focus + .floating-label,
.form-input:not(:placeholder-shown) + .floating-label {
    top: -0.6rem;
    font-size: 0.75rem;
    color: #38bdf8;
    background-color: #1f2937; /* 与输入框背景色匹配以创建“切口”效果 */
}

.form-input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}
.form-input:focus ~ .input-icon {
    color: #38bdf8;
}

/* 按钮样式 */
.glow-button {
    background: linear-gradient(90deg, #38bdf8, #6366f1);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4), 0 0 20px rgba(99, 102, 241, 0.2);
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6), 0 0 30px rgba(99, 102, 241, 0.3);
}

/* 表单翻转动画 (新) */
.form-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* Safari */
}

#form-container.is-flipped {
    transform: rotateY(180deg);
}

/* Header样式 */
.app-header {
    font-family: 'Orbitron', sans-serif;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    z-index: 5;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.7), transparent);
}
.logo-icon {
    width: 40px;
    height: 40px;
    animation: rotate-logo 15s linear infinite;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 900; /* 加粗 */
    margin-left: 1rem;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
    letter-spacing: 2px;
}
.logo-text::after {
    content: '_';
    animation: blink-caret 1s step-end infinite;
}

@keyframes rotate-logo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blink-caret {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}