/* ========== 认证页面通用样式 ========== */

/* ---------- 基础样式 ---------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

/* ---------- 返回和首页按钮样式 ---------- */
.back-button,
.home-button {
    position: absolute;
    top: 20px;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button {
    left: 20px;
}

.home-button {
    right: 20px;
}

.back-button:hover {
    background: #4CAF50;
    transform: translateX(-3px);
}

.home-button:hover {
    background: #4CAF50;
    transform: translateX(3px);
}

.back-button img,
.home-button img {
    width: 24px;
    height: 24px;
    filter: invert(1) opacity(0.6);
    transition: all 0.3s ease;
}

.back-button:hover img,
.home-button:hover img {
    filter: none;
}

/* ---------- 表单样式 ---------- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    background: white;
    color: #333;
}

input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* ---------- 按钮样式 ---------- */
.button {
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    box-sizing: border-box;
}

.submit-btn {
    width: 100%;
    background: #4CAF50;
    color: white;
    padding: 12px 0;
    border: none;
    border-radius: 10px;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #45a049;
}

/* ---------- 分割线样式 ---------- */
.divider {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

/* ---------- 通知框样式 ---------- */
.notification {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 16px;
    color: #fff;
    transition: top 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
}

.notification.show {
    top: 20px;
    opacity: 1;
}

.notification.success {
    border-color: #4CAF50;
    color: #4CAF50;
    background-color: #E8F5E9;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 2000;
}

.notification.error {
    border-color: #f44336;
    color: #f44336;
    background-color: #FFEBEE;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 2000;
}

.notification.warning {
    border-color: #FFC107;
    color: #FFC107;
    background-color: #FFF8E1;
    border-width: 1px;
    border-style: solid;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 2000;
}

/* ---------- 替代链接样式 ---------- */
.alternative {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.alternative a {
    color: #4CAF50;
    text-decoration: none;
}

.alternative a:hover {
    text-decoration: underline;
}

/* ---------- 深色模式 ---------- */
@media (prefers-color-scheme: dark) {
    body {
        background: #000308;
        color: #e0e0e0;
    }
    
    .container {
        background: #28282E;
        border-radius: 20px;
        box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    }
    
    h1 {
        color: #e0e0e0;
    }
    
    label {
        color: #cccccc;
    }
    
    input {
        background: #36363D;
        border: 1px solid #555;
        color: #e0e0e0;
    }
    
    input::placeholder {
        color: #888;
    }
    
    input:focus {
        border-color: #80cbc4;
    }
    
    .button {
        border: none;
    }
    
    .submit-btn {
        background: #1e88e5;
        color: #fff;
        border: none;
    }
    
    .submit-btn:hover {
        background: #1565c0;
    }
    
    .divider::before {
        background: #444;
    }
    
    .divider span {
        background: #28282E;
        color: #666;
    }
    
    .alternative {
        color: #aaaaaa;
    }
    
    .alternative a {
        color: #81d4fa;
    }
    
    .alternative a:hover {
        color: #4fc3f7;
    }
    
    .back-button,
    .home-button {
        background: #313138;
    }
    
    .back-button:hover,
    .home-button:hover {
        background: #4a90e2;
    }
    
    .back-button img,
    .home-button img {
        filter: none;
        opacity: 0.9;
    }
    
    .back-button:hover img,
    .home-button:hover img {
        opacity: 1;
    }
}

/* ---------- 响应式手机端样式 ---------- */
@media (max-width: 600px) {
    body {
        padding: 0 20px;
    }
    
    .container {
        width: 100%;
        box-sizing: border-box;
        max-width: 450px;
    }
    
    .back-button,
    .home-button {
        position: fixed !important;
        width: 36px;
        height: 36px;
        background: #fff;
        box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    }
    
    .back-button img,
    .home-button img {
        width: 20px;
        height: 20px;
    }
    
    @media (prefers-color-scheme: dark) {
        .back-button,
        .home-button {
            background: #313138;
            box-shadow: none;
        }
    }
}