/* 全局过渡效果 */
* {
    transition: all 0.3s ease;
}

/* 导航栏悬停效果 */
.nav-link {
    position: relative;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 卡片悬停动画 */
.dashboard-card {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 表格行悬停效果 */
.table-row {
    transition: all 0.2s ease;
}

.table-row:hover {
    background-color: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
}

/* 按钮动画效果 */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
}

/* 加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* 背景动画 */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* 输入框焦点效果 */
input:focus, select:focus {
    transform: translateY(-2px);
}

/* 登录按钮悬停效果 */
.login-btn {
    position: relative;
    overflow: hidden;
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.login-btn:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 错误消息动画 */
@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert {
    animation: slideIn 0.3s ease forwards;
}

/* 浮动动画 */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* 输入框焦点效果 */
input:focus {
    transform: translateY(-1px);
}

/* 页面加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.max-w-md {
    animation: fadeInUp 0.5s ease-out;
}

/* 按钮悬停效果 */
button:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 背景模糊效果 */
.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

/* 模态框动画 */
.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 模态框背景动画 */
.modal-backdrop-enter {
    opacity: 0;
}

.modal-backdrop-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-backdrop-exit {
    opacity: 1;
}

.modal-backdrop-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ================= Blacklist page enhancements ================ */
.blacklist-page .glass-card {
    animation: fadeIn 0.4s ease-out;
}

.blacklist-page .table-container table tbody tr:nth-child(odd) {
    background-color: #fafbff;
}

.blacklist-page .table-container table tbody tr:hover {
    background-color: #f1f5ff;
}

.blacklist-page .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(71,118,230,0.15);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.blacklist-page .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.blacklist-page .edit-btn {
    background: linear-gradient(135deg, #ebf8ff 0%, #dbeafe 100%);
    color: #2563eb;
}

.blacklist-page .edit-btn:hover {
    background: #2563eb;
    color: white;
}

.blacklist-page .delete-btn {
    background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
    color: #dc2626;
}

.blacklist-page .delete-btn:hover {
    background: #dc2626;
    color: white;
}

.blacklist-page .table-header {
    letter-spacing: 0.04em;
}

.blacklist-page .status-badge.status-active {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
}

.blacklist-page .status-badge.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.blacklist-page .search-input,
.blacklist-page #searchInput {
    border-radius: 12px;
}

.blacklist-page .pagination-btn {
    border-radius: 10px;
}

/* ===================== Enhanced Navbar ===================== */
.nav-enhanced {
    position: relative;
    background: linear-gradient(120deg, #3b82f6 0%, #8b5cf6 50%, #6366f1 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.nav-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 120px at 20% -20%, rgba(255, 255, 255, 0.18), transparent 40%),
        radial-gradient(800px 80px at 80% 0%, rgba(255, 255, 255, 0.12), transparent 35%);
    pointer-events: none;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: linear-gradient(90deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.nav-pill i {
    margin-right: 0.5rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Responsive tweaks for the blacklist top bar */
@media (max-width: 1024px) {
    .nav-bar-inner { flex-wrap: wrap; gap: 12px; }
    .nav-left, .nav-right { width: 100%; display: flex; justify-content: space-between; }
}

/* ===================== Modal Close Button ===================== */
.modal-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #9ca3af; /* gray-400 */
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6; /* gray-100 */
    color: #374151; /* gray-700 */
    border-color: #e5e7eb; /* gray-200 */
    transform: translateY(-1px);
}

.modal-close i { font-size: 1.1rem; }
