
:root {
    --primary-gradient: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --secondary-gradient: linear-gradient(135deg, #2575fc 0%, #6a11cb 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: url('../static/login.jpg') no-repeat center center/cover;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 背景效果 - 科技感元素 */
.tech-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(106, 17, 203, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 17, 203, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(106, 17, 203, 0.4);
    box-shadow: 0 0 10px rgba(106, 17, 203, 0.8);
    animation: scan 6s linear infinite;
}

@keyframes scan {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.drone {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid rgba(106, 17, 203, 0.4);
    box-shadow: 0 0 15px rgba(106, 17, 203, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 12s infinite ease-in-out;
}

/* 新增：Flash消息样式（操作反馈更明显） */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 300px;
}
.flash-message {
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-in-out;
}
.flash-message.error {
    background-color: #f44336;
}
/* 新增：订阅邮箱提示样式 */
.subscribed-email {
    margin-top: 12px;
    color: #2196F3;
    font-weight: 500;
    font-size: 0.95em;
}
/* 导航栏激活状态 */
.nav-links a.active {
    color: #4CAF50;
    border-bottom: 2px solid #4CAF50;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.drone::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--primary-gradient);
    border-radius: 50%;
    box-shadow: 0 0 10px #2575fc;
}

.drone:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.drone:nth-child(2) {
    top: 65%;
    left: 80%;
    animation-delay: -2s;
}

.drone:nth-child(3) {
    top: 40%;
    left: 45%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(40px, 20px); }
    50% { transform: translate(0, 40px); }
    75% { transform: translate(-40px, 20px); }
}

.apple-tree {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 150px;
    height: 200px;
    z-index: 1;
}

.apple-tree .trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 120px;
    background: #8B4513;
    border-radius: 10px;
}

.apple-tree .canopy {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(34,139,34,0.8) 0%, rgba(0,100,0,0.8) 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0,100,0,0.5);
}

.apple-tree .apple {
    position: absolute;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 30% 30%, #ff0000, #8b0000);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255,0,0,0.5);
}

.apple:nth-child(1) { top: 40px; left: 30px; }
.apple:nth-child(2) { top: 70px; left: 60px; }
.apple:nth-child(3) { top: 30px; left: 80px; }
.apple:nth-child(4) { top: 80px; left: 30px; }
.apple:nth-child(5) { top: 60px; left: 100px; }

.data-panel {
    position: absolute;
    width: 200px;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(106, 17, 203, 0.4);
    border-radius: 8px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #2ecc71;
    box-shadow: 0 0 20px rgba(106, 17, 203, 0.3);
    overflow: hidden;
}

.data-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(46, 204, 113, 0.05) 50%);
    background-size: 100% 4px;
    z-index: -1;
}

.data-panel:nth-child(4) {
    top: 15%;
    right: 10%;
    animation: dataGlow 3s infinite alternate;
}

.data-panel:nth-child(5) {
    bottom: 20%;
    left: 10%;
    animation: dataGlow 3s infinite alternate 1.5s;
}

@keyframes dataGlow {
    from { box-shadow: 0 0 10px rgba(106, 17, 203, 0.3); }
    to { box-shadow: 0 0 30px rgba(106, 17, 203, 0.7); }
}

/* 主容器 */
.auth-container {
    position: relative;
    max-width: 420px;
    width: 90%;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    z-index: 10;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(106, 17, 203, 0.4);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 32px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.logo p {
    color: #aaa;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Tabs 切换栏 */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    padding: 12px 24px;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab.active {
    color: #fff;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
}

.tab:hover {
    color: #fff;
}

/* 表单样式 */
.auth-form {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.auth-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 输入框组 */
.form-group {
    position: relative;
    margin-bottom: 28px;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 19px;
    transition: color 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 14px 15px 14px 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(106, 17, 203, 0.5);
    box-shadow: 0 0 10px rgba(106, 17, 203, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input:focus + i {
    color: #6a11cb;
}

/* 按钮样式 */
.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(106, 17, 203, 0.3);
    position: relative;
    overflow: hidden;
}

.auth-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20px;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(25deg);
    transition: all 0.5s;
}

.auth-btn:hover::after {
    left: 120%;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(106, 17, 203, 0.5);
}

.auth-btn:active {
    transform: translateY(0);
}

/* 底部链接 */
.extra-links {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
}

.extra-links a {
    color: #6a11cb;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.extra-links a:hover {
    color: #2575fc;
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .auth-container {
        padding: 30px 20px;
    }

    .tab {
        font-size: 16px;
        padding: 10px 20px;
    }

    .form-group input {
        padding: 12px 15px 12px 45px;
        font-size: 14px;
    }

    .auth-btn {
        font-size: 16px;
        padding: 12px;
    }
}
