* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    transition: all 0.5s ease;
}

/* 基础登录容器 */
.login-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    transition: all 0.5s ease;
}

/* 右上角菜单 - 始终保持在顶部 */
.menu-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10001;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.dot {
    width: 4px;
    height: 4px;
    background: #333;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* 基础登录表单样式 */
.login-form {
    transition: all 0.5s ease;
    position: relative;
    z-index: 1000;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-group {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid;
}

.input-group input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 验证码行：输入框 + 图片并排 */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
    min-width: 0;
}

.captcha-img {
    width: 120px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid #ddd;
}

.login-btn {
    width: 100%;
    padding: 14px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    background: var(--theme-btn-color, #28a745);
}

.login-btn:hover {
    transform: translateY(-2px);
    background: var(--theme-btn-hover, #218838);
    box-shadow: 0 3px 10px var(--theme-btn-color, rgba(40, 167, 69, 0.3));
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.remember-me {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remember-me input {
    margin-right: 8px;
}

.forgot-password {
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    font-size: 14px;
}

/* ====================================
   主题特色登录框设计
   ==================================== */

/* 1. 默认主题 - 简洁居中设计（恢复原始效果） */
body.default-theme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    --theme-btn-color: #28a745;
    --theme-btn-hover: #218838;
}

body.default-theme .login-form {
    background: white;
    padding: 40px 35px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 380px;
    margin: 20px;
}

body.default-theme .login-form h2 {
    color: #333;
    font-size: 26px;
    margin-bottom: 25px;
}

body.default-theme .input-group input {
    border: 1px solid #ddd;
    background: #f9f9f9;
}

body.default-theme .input-group input:focus {
    border-color: #667eea;
    background: white;
}

/* 2. 海洋主题 - 右侧浮动面板 */
body.ocean-theme {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 50px;
    --theme-btn-color: #00d084;
    --theme-btn-hover: #00b372;
}

body.ocean-theme .login-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 50px 40px;
    border-radius: 0 0 0 30px;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
    min-height: 100vh;
    width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.ocean-theme .login-form h2 {
    color: #4facfe;
    font-size: 32px;
    margin-bottom: 40px;
}

/* 3. 森林主题 - 左下角半圆角 */
body.forest-theme {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding-left: 50px;
    padding-bottom: 50px;
    --theme-btn-color: #22c55e;
    --theme-btn-hover: #16a34a;
}

body.forest-theme .login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 50px;
    border-radius: 30px 30px 30px 0;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 420px;
}

body.forest-theme .login-form h2 {
    color: #43e97b;
    font-size: 30px;
    font-weight: 700;
}

/* 4. 日落主题 - 圆形设计 */
body.sunset-theme {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    --theme-btn-color: #f59e0b;
    --theme-btn-hover: #d97706;
}

body.sunset-theme::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, rgba(250,112,154,0.3) 100%);
    pointer-events: none;
}

body.sunset-theme .login-form {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 60px 50px;
    border-radius: 50%;
    width: 450px;
    height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        0 0 0 15px rgba(250, 112, 154, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.25);
    border: 3px solid rgba(250, 112, 154, 0.3);
    position: relative;
    z-index: 1;
}

body.sunset-theme .login-form::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(250,112,154,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

body.sunset-theme .login-form h2 {
    color: #fa709a;
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

body.sunset-theme .input-group {
    margin-bottom: 25px;
    width: 100%;
    max-width: 280px;
}

body.sunset-theme .input-group input {
    border-color: rgba(250, 112, 154, 0.3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

body.sunset-theme .input-group input:focus {
    border-color: #fa709a;
    box-shadow: 0 0 0 3px rgba(250, 112, 154, 0.2);
}

/* 5. 暗色主题 - 右侧侧边栏 */
body.dark-theme {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: grid;
    grid-template-columns: 2fr 1fr;
    --theme-btn-color: #10b981;
    --theme-btn-hover: #059669;
}

body.dark-theme .login-form {
    background: rgba(44, 62, 80, 0.95);
    padding: 80px 60px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .login-form h2 {
    color: white;
    font-size: 36px;
    margin-bottom: 50px;
}

body.dark-theme .input-group label {
    color: white;
}

body.dark-theme .input-group input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 6. 薄荷主题 - 左上角悬浮卡片 */
body.mint-theme {
    background: linear-gradient(135deg, #96e6a1 0%, #d4fc79 100%);
    position: relative;
    --theme-btn-color: #22c55e;
    --theme-btn-hover: #16a34a;
}

body.mint-theme .login-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 40px 35px;
    border-radius: 25px;
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.1);
    max-width: 380px;
    position: absolute;
    top: 80px;
    left: 80px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

body.mint-theme .login-form h2 {
    color: #96e6a1;
    font-size: 26px;
}

/* 7. 珊瑚主题 - 底部居中浮动 */
body.coral-theme {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 100px;
    --theme-btn-color: #e11d48;
    --theme-btn-hover: #be123c;
}

body.coral-theme .login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 45px 40px;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.15);
    max-width: 420px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

body.coral-theme .login-form h2 {
    color: #ff9a9e;
    font-size: 28px;
}

/* 8. 紫色主题 - 对角线布局 */
body.purple-theme {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    --theme-btn-color: #8b5cf6;
    --theme-btn-hover: #7c3aed;
}

body.purple-theme .login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 45px;
    border-radius: 20px;
    box-shadow: 15px 15px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

body.purple-theme .login-form:hover {
    transform: rotate(0deg);
}

body.purple-theme .login-form h2 {
    color: #a18cd1;
    font-size: 30px;
    transform: rotate(5deg);
}

/* 9. 金色主题 - 中间分割布局 */
body.gold-theme {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    --theme-btn-color: #f59e0b;
    --theme-btn-hover: #d97706;
}

body.gold-theme .login-form {
    background: rgba(255, 255, 255, 0.98);
    padding: 70px 60px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255, 216, 155, 0.3);
}

body.gold-theme .login-form h2 {
    color: #19547b;
    font-size: 34px;
    margin-bottom: 40px;
}

/* 10. 霓虹主题 - 全屏透明覆盖 */
body.neon-theme {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    --theme-btn-color: #22d3ee;
    --theme-btn-hover: #06b6d4;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body.neon-theme .login-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 60px 50px;
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    max-width: 450px;
    animation: neonGlow 2s ease-in-out infinite alternate;
}

@keyframes neonGlow {
    from { box-shadow: 0 0 30px rgba(255, 255, 255, 0.2); }
    to { box-shadow: 0 0 60px rgba(255, 255, 255, 0.4); }
}

body.neon-theme .login-form h2 {
    color: white;
    font-size: 32px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.theme-option {
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.theme-option:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.theme-option.active {
    border-color: #667eea;
    background: #f0f8ff;
}

.theme-preview {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    margin: 0 auto 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.theme-option:hover .theme-preview {
    transform: scale(1.05);
}

/* 9种主题预览样式 */
.theme-preview.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-preview.ocean {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.theme-preview.forest {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.theme-preview.sunset {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.theme-preview.dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.theme-preview.mint {
    background: linear-gradient(135deg, #96e6a1 0%, #d4fc79 100%);
}

.theme-preview.coral {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.theme-preview.purple {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.theme-preview.gold {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.theme-preview.neon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
}

/* ====================================
   主题化隐藏式菜单样式
   ==================================== */

/* 默认主题菜单 */
body.default-theme .menu-toggle {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.25);
    border: 2px solid rgba(102, 126, 234, 0.1);
}

body.default-theme .menu-toggle:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transform: scale(1.15);
}

body.default-theme .dot {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.default-theme .menu-toggle:hover .dot {
    background: white;
    transform: scale(1.2);
}

body.default-theme .dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

body.default-theme .dropdown-menu a {
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.1);
    font-weight: 500;
}

body.default-theme .dropdown-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

/* 海洋主题菜单 */
body.ocean-theme .menu-toggle {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(79, 172, 254, 0.3);
    border: 2px solid rgba(79, 172, 254, 0.2);
}

body.ocean-theme .menu-toggle:hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.5);
}

body.ocean-theme .dot {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 森林主题菜单 */
body.forest-theme .menu-toggle {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(67, 233, 123, 0.3);
    border: 2px solid rgba(67, 233, 123, 0.2);
}

body.forest-theme .menu-toggle:hover {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2) 0%, rgba(56, 249, 215, 0.2) 100%);
    box-shadow: 0 4px 20px rgba(67, 233, 123, 0.5);
}

body.forest-theme .dot {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 日落主题菜单 */
body.sunset-theme .menu-toggle {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(250, 112, 154, 0.3);
    border: 2px solid rgba(250, 112, 154, 0.2);
    animation: pulseSunset 2s infinite;
}

@keyframes pulseSunset {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

body.sunset-theme .menu-toggle:hover {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.2) 0%, rgba(254, 225, 64, 0.2) 100%);
    box-shadow: 0 4px 20px rgba(250, 112, 154, 0.6);
    animation: none;
    transform: scale(1.1) rotate(5deg);
}

body.sunset-theme .dot {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

body.sunset-theme .menu-toggle:hover .dot {
    background: white;
    transform: scale(1.3);
}

body.sunset-theme .dropdown-menu {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(250, 112, 154, 0.3);
    box-shadow: 0 8px 32px rgba(250, 112, 154, 0.4);
    border-radius: 15px;
}

body.sunset-theme .dropdown-menu a {
    color: #fa709a;
    border-color: rgba(250, 112, 154, 0.1);
    font-weight: 600;
    text-align: center;
}

body.sunset-theme .dropdown-menu a:hover {
    background: radial-gradient(circle, #fa709a 0%, #fee140 100%);
    color: white;
    border-radius: 8px;
    margin: 2px;
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.5);
}

/* 统一为所有主题菜单添加悬停效果 */
.dropdown-menu a {
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    padding-left: 25px;
}

body.sunset-theme .dropdown-menu a:hover {
    padding-left: 20px;
    margin-left: 5px;
    margin-right: 5px;
}

.save-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 20px;
}

.save-btn:hover {
    background: #218838;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body.ocean-theme .login-form,
    body.dark-theme .login-form,
    body.gold-theme .login-form {
        width: 100%;
        height: auto;
        position: static;
        border: none;
        transform: none;
    }
    
    body.sunset-theme .login-form {
        border-radius: 30px;
        width: 90%;
        height: auto;
        animation: none;
    }
    
    body.mint-theme .login-form {
        position: static;
        margin: 20px;
        animation: none;
    }
    
    body.coral-theme .login-form {
        animation: none;
    }
    
    body.dark-theme,
    body.gold-theme {
        grid-template-columns: 1fr;
    }
    
    .theme-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .login-form {
        margin: 10px;
        padding: 30px 20px;
    }
    
    .theme-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}