/* 现代化授权系统样式 - QuanAuth Modern Theme */

/* ===== 基础变量 ===== */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --info-color: #4299e1;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

/* ===== 背景动画 ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* ===== 页面容器 ===== */
.modern-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== 卡片样式 ===== */
.modern-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    padding: 40px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modern-card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-2px);
}

/* ===== 标题样式 ===== */
.modern-title {
    text-align: center;
    margin-bottom: 30px;
}

.modern-title h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.modern-title p {
    color: var(--gray-500);
    font-size: 14px;
}

/* ===== Logo ===== */
.modern-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.modern-logo i {
    font-size: 36px;
    color: white;
}

.modern-logo svg {
    width: 40px;
    height: 40px;
    fill: white;
}

/* ===== 表单组 ===== */
.modern-form-group {
    margin-bottom: 20px;
}

.modern-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

/* ===== 输入框样式 ===== */
.modern-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
    background: var(--gray-50);
    color: var(--gray-800);
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.modern-input::placeholder {
    color: var(--gray-400);
}

/* ===== 选择框样式 ===== */
.modern-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 13px;
    transition: var(--transition);
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center no-repeat;
    background-size: 16px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: var(--gray-800);
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* 下拉选项样式 */
.modern-select option {
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
}

/* ===== 按钮样式 ===== */
.modern-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.modern-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.modern-btn-primary:active {
    transform: translateY(0);
}

.modern-btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.modern-btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.modern-btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

.modern-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.5);
}

.modern-btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.modern-btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.modern-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== 导航菜单 ===== */
.modern-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.modern-nav-item {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modern-nav-item:hover,
.modern-nav-item.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ===== 头部导航 ===== */
.modern-header {
    text-align: center;
    padding: 30px 20px;
    color: white;
}

.modern-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===== 信息提示 ===== */
.modern-alert {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-alert-info {
    background: rgba(66, 153, 225, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.modern-alert-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.modern-alert-warning {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(237, 137, 54, 0.2);
}

.modern-alert-danger {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(245, 101, 101, 0.2);
}

/* ===== 结果展示卡片 ===== */
.modern-result-card {
    background: linear-gradient(135deg, var(--gray-50), white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid var(--gray-200);
}

.modern-result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.modern-result-item:last-child {
    border-bottom: none;
}

.modern-result-label {
    color: var(--gray-500);
    font-size: 14px;
}

.modern-result-value {
    color: var(--gray-800);
    font-weight: 500;
    font-size: 14px;
}

/* ===== 验证码容器 ===== */
.modern-captcha {
    margin: 20px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 分割线 ===== */
.modern-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--gray-400);
    font-size: 13px;
}

.modern-divider::before,
.modern-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.modern-divider span {
    padding: 0 15px;
}

/* ===== 链接样式 ===== */
.modern-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.modern-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== 页脚 ===== */
.modern-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.modern-footer a {
    color: white;
    text-decoration: none;
}

.modern-footer a:hover {
    text-decoration: underline;
}

/* ===== 加载动画 ===== */
.modern-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ===== 徽章 ===== */
.modern-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.modern-badge-success {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

.modern-badge-warning {
    background: rgba(237, 137, 54, 0.1);
    color: var(--warning-color);
}

.modern-badge-danger {
    background: rgba(245, 101, 101, 0.1);
    color: var(--danger-color);
}

/* ===== 图标按钮组 ===== */
.modern-icon-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.modern-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
}

.modern-icon-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ===== 步骤指示器 ===== */
.modern-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.modern-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.modern-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.modern-step.active .modern-step-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modern-step-label {
    font-size: 12px;
    color: var(--gray-500);
}

.modern-step.active .modern-step-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .modern-container {
        padding: 15px;
    }
    
    .modern-card {
        padding: 25px;
        border-radius: var(--border-radius);
    }
    
    .modern-title h1 {
        font-size: 22px;
    }
    
    .modern-nav {
        gap: 8px;
    }
    
    .modern-nav-item {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ===== 动画效果 ===== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

/* ===== Layer弹窗美化 ===== */
.layui-layer {
    border-radius: var(--border-radius) !important;
    overflow: hidden;
}

.layui-layer-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
    border: none !important;
    font-weight: 500 !important;
}

.layui-layer-btn a {
    border-radius: 8px !important;
}

.layui-layer-btn0 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    border: none !important;
}

/* ===== 玻璃态效果增强 ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ===== 输入框图标 ===== */
.modern-input-icon {
    position: relative;
}

.modern-input-icon input {
    padding-left: 45px;
}

.modern-input-icon .icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
}

/* ===== 社交登录按钮 ===== */
.modern-social-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-700);
}

.modern-social-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

/* ===== 工具提示 ===== */
.modern-tooltip {
    position: relative;
}

.modern-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--gray-800);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    margin-bottom: 8px;
}

.modern-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== LayUI 下拉框紧凑样式 ===== */
/* 主选择框更紧凑 */
.layui-form-select .layui-input {
    height: 34px !important;
    line-height: 34px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
}

/* 下拉列表样式 */
.layui-form-select dl {
    max-height: 200px !important;
}

/* 下拉选项更紧凑 */
.layui-form-select dl dd {
    padding: 0 10px !important;
    line-height: 28px !important;
    font-size: 12px !important;
    min-height: 28px !important;
}

/* 下拉选项标题 */
.layui-form-select dl dt {
    padding: 0 10px !important;
    line-height: 26px !important;
    font-size: 12px !important;
}

/* 下拉选项悬停效果 */
.layui-form-select dl dd:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white !important;
}

.layui-form-select dl dd.layui-this {
    background: var(--primary-color) !important;
    color: white !important;
}
