/* ===== User Pages Enhanced Styles =====
   共享动画与微交互 - 所有用户页面自动加载
   ============================================ */

/* ===== Page Entrance ===== */
@keyframes pageSlideIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.user-layout { animation: pageSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ===== 桌面端：.user-nav-links 样式已合并到 style.css / gold-theme.css 的 .nav-links 选择器中 ===== */

/* ===== Scroll-triggered Animations ===== */
.animate-in {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-in.visible { opacity: 1; transform: translateY(0); }

/* Stagger delays for grid children */
.grid-stagger .animate-in:nth-child(1) { transition-delay: 0.00s; }
.grid-stagger .animate-in:nth-child(2) { transition-delay: 0.06s; }
.grid-stagger .animate-in:nth-child(3) { transition-delay: 0.12s; }
.grid-stagger .animate-in:nth-child(4) { transition-delay: 0.18s; }
.grid-stagger .animate-in:nth-child(5) { transition-delay: 0.24s; }
.grid-stagger .animate-in:nth-child(6) { transition-delay: 0.30s; }
.grid-stagger .animate-in:nth-child(7) { transition-delay: 0.36s; }
.grid-stagger .animate-in:nth-child(8) { transition-delay: 0.42s; }
.grid-stagger .animate-in:nth-child(9) { transition-delay: 0.48s; }
.grid-stagger .animate-in:nth-child(10) { transition-delay: 0.54s; }

/* ===== Card Hover Enhancement ===== */
.hover-card {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), var(--shadow-md);
    border-color: var(--accent);
}
.hover-card:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

/* ===== Section Title with Animated Underline ===== */
.section-title-anim {
    position: relative;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.section-title-anim::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 48px; height: 2px; background: var(--accent);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-wrap:hover .section-title-anim::after { width: 140px; }

/* ===== Form Focus Enhancement ===== */
.form-input, .form-select, .form-textarea,
input[type="text"], input[type="password"], input[type="email"],
input[type="number"], input[type="url"], input[type="tel"],
input[type="search"], select, textarea {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="number"]:focus, input[type="url"]:focus, input[type="tel"]:focus,
input[type="search"]:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200,169,81,0.08);
    outline: none;
}

/* ===== Button Enhancement ===== */
.btn, .btn-primary, .btn-outline, .btn-sm, .btn-lg {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover, .btn-primary:hover, .btn-outline:hover, .btn-sm:hover, .btn-lg:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn:active, .btn-primary:active, .btn-outline:active, .btn-sm:active, .btn-lg:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* ===== Icon Rotation on Hover ===== */
.icon-rotate { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.icon-rotate:hover { transform: rotate(-8deg) scale(1.1); }

/* ===== Smooth Scroll ===== */
html { scroll-behavior: smooth; }

/* ===== Loading Skeleton ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

/* ===== Page Header Enhancement ===== */
.page-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.page-header::after {
    content: ''; position: absolute; bottom: -1px; left: 0;
    width: 60px; height: 2px; background: var(--accent);
}

/* ===== Status Badge Enhancement ===== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

/* ===== Table Row Hover ===== */
.table tbody tr, .data-table tbody tr {
    transition: background-color 0.2s ease;
}
.table tbody tr:hover, .data-table tbody tr:hover {
    background: var(--bg-secondary);
}

/* ===== Tab Enhancement ===== */
.tab, .nav-tab {
    transition: all 0.25s ease;
    position: relative;
}
.tab:hover, .nav-tab:hover {
    color: var(--accent);
}
.tab.active::after, .nav-tab.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: var(--accent);
}

/* ===== Tooltip ===== */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 4px 10px; background: var(--text); color: var(--bg);
    font-size: 11px; border-radius: var(--radius-sm);
    white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
[data-tooltip]:hover::before {
    opacity: 1; transform: translateX(-50%) translateY(-8px);
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .animate-in { opacity: 1; transform: none; transition: none; }
    .user-layout { animation: none; }
    .hover-card:hover { transform: none; }
    .skeleton { animation: none; }
    .btn:hover, .btn-primary:hover { transform: none; }
}
