/* 身份验证相关样式 */

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-secondary) 100%);
    margin: 10% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 15px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-weight: 600;
    font-size: 24px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover,
.close:focus {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-secondary) 100%);
}

/* 登录表单样式 */
#loginForm .form-group {
    margin-bottom: 25px;
    position: relative;
}

#loginForm label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
}

#loginForm input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

#loginForm input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

#loginForm input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

#loginForm .btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#loginForm .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#loginForm .btn:hover::before {
    left: 100%;
}

#loginForm .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

#loginForm .btn:active {
    transform: translateY(-1px);
}

/* 登录图标样式 */
.login-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.login-icon svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* 登录提示信息样式 */
.login-tip {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.login-tip p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 导航栏登录/登出按钮样式 */
#authNavItem a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #ffffff;
    text-shadow: #AEAEAE 1px 1px 1px;
    transition: all 0.3s ease;
    border-radius: 5px;
    font-weight: bold;
}

#authNavItem a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

/* 用户下拉菜单样式 */
.user-dropdown {
    position: relative;
}

.user-dropdown .dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    min-width: 160px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: none;
}

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

/* 设置标签样式 */
.settings-tabs {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    position: relative;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: var(--bg);
    color: var(--text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group input:disabled {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* 文章操作按钮样式 */
.article-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.article-actions .btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-edit {
    background: var(--secondary);
    color: white;
}

.btn-edit:hover {
    background: var(--secondary-dark);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: var(--danger-dark);
}

.btn-disabled {
    background: var(--border);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    transform: none;
}

/* 通知样式 */
.notification {
    font-family: var(--font-family);
}

.notification-info {
    background: rgba(52, 152, 219, 0.9) !important;
}

.notification-success {
    background: rgba(46, 204, 113, 0.9) !important;
}

.notification-error {
    background: rgba(231, 76, 60, 0.9) !important;
}

.notification-warning {
    background: rgba(241, 196, 15, 0.9) !important;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header, .modal-body {
        padding: 15px;
    }
    
    #authNavItem a {
        padding: 6px 12px;
        font-size: 14px;
    }
}