/*
 * ══════════════════════════════════════════════════════════════
 *  ui-wow.css  —  WOW Factor UI Enhancements
 *  Pro Apps Cards, Glassmorphism, Typography, Skeleton, Transitions
 * ══════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────────
   1. PRO APPS CARDS — 3D Hover, Gradient Border, Icon Animation
   ───────────────────────────────────────────────────────────── */

/* 3D tilt + glow lift on hover */
.pa-card {
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
    transition: transform 0.32s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow  0.32s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.pa-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow:
        0 20px 60px -8px rgba(var(--pa-shadow-rgb, 99,102,241), 0.28),
        0 0 0 1.5px rgba(255,255,255,0.08),
        0 2px 8px rgba(15,23,42,0.08) !important;
}

/* Animated gradient border on hover via pseudo-element */
.pa-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(
        135deg,
        var(--c1, #6366f1),
        var(--c2, #a855f7),
        var(--c1, #6366f1)
    );
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradientBorderSpin 3s linear infinite;
}

.pa-card:hover::after {
    opacity: 1;
}

@keyframes gradientBorderSpin {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Icon bounce animation on card hover */
.pa-cicon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.pa-card:hover .pa-cicon {
    transform: translateY(-6px) rotate(-6deg) scale(1.12);
}

/* Arrow circle slide */
.pa-ccircle {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease !important;
}

.pa-card:hover .pa-ccircle {
    transform: translateX(6px) scale(1.15) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25) !important;
}

/* Card active/click press effect */
.pa-card:active {
    transform: translateY(-4px) scale(1.005) !important;
    transition-duration: 0.1s !important;
}

/* ─────────────────────────────────────────────────────────────
   2. GLASSMORPHISM ENHANCEMENTS — Feed, Sidebar, Navbar
   ───────────────────────────────────────────────────────────── */

/* Feed post cards — frosted glass translucent */
.edu-card {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow:
        0 2px 16px -4px rgba(15,23,42,0.07),
        0 0 0 1px rgba(255,255,255,0.4) inset !important;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.25s cubic-bezier(0.4,0,0.2,1) !important;
}

.edu-card:hover {
    box-shadow:
        0 12px 32px -6px rgba(15,23,42,0.12),
        0 0 0 1px rgba(255,255,255,0.6) inset !important;
    transform: translateY(-2px);
}

:root[data-theme="dark"] .edu-card {
    background: rgba(17, 24, 39, 0.72) !important;
    border-color: rgba(255,255,255,0.07) !important;
    box-shadow:
        0 2px 16px -4px rgba(0,0,0,0.35),
        0 0 0 1px rgba(255,255,255,0.04) inset !important;
}

/* Sidebar — frosted glass sidebar */
.edu-sidebar-left {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-right: 1px solid rgba(255,255,255,0.5) !important;
}

:root[data-theme="dark"] .edu-sidebar-left {
    background: rgba(10, 18, 36, 0.88) !important;
    border-right-color: rgba(255,255,255,0.06) !important;
}

/* Right sidebar frosted glass */
.edu-sidebar-right {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
}

:root[data-theme="dark"] .edu-sidebar-right {
    background: rgba(10, 15, 30, 0.88) !important;
}

/* ─────────────────────────────────────────────────────────────
   3. TYPOGRAPHY — Modern Negative Letter-spacing + Crisp Chips
   ───────────────────────────────────────────────────────────── */

/* Modern heading letter spacing */
.pa-btitle,
.pa-cname,
.pa-bstat-num,
h1, h2, h3 {
    letter-spacing: -0.5px !important;
}

/* Section labels */
.pa-slabel,
.sidebar-section-header,
.notice-header h4,
.form-label {
    letter-spacing: 0.06em;
}

/* Crisp chips/badges */
.pa-cbadge {
    font-size: 0.55rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.1em !important;
    padding: 4px 12px !important;
    border-radius: 24px !important;
    background: rgba(255,255,255,0.22) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    color: #fff !important;
    backdrop-filter: blur(6px) !important;
}

/* Sidebar badge (NEW tag) */
.sidebar-badge {
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    letter-spacing: 0.04em !important;
    opacity: 0.95;
}

/* Notice dates + small tags */
.notice-date {
    background: rgba(251,191,36,0.12) !important;
    color: #b45309 !important;
    border: 1px solid rgba(251,191,36,0.22) !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
}

:root[data-theme="dark"] .notice-date {
    color: #fbbf24 !important;
}

/* Feature tags on cards */
.pa-ctag {
    background: rgba(248,250,255,0.85) !important;
    border: 1px solid rgba(99,102,241,0.14) !important;
    color: #4f46e5 !important;
    font-weight: 700 !important;
}

:root[data-theme="dark"] .pa-ctag {
    background: rgba(30,40,70,0.7) !important;
    border-color: rgba(99,102,241,0.2) !important;
    color: #a5b4fc !important;
}

/* ─────────────────────────────────────────────────────────────
   4. SKELETON LOADING STATES
   ───────────────────────────────────────────────────────────── */

@keyframes skeletonShimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skeleton-pulse {
    background: linear-gradient(
        90deg,
        rgba(226,232,240,0.8) 25%,
        rgba(241,245,249,1)   50%,
        rgba(226,232,240,0.8) 75%
    );
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}

:root[data-theme="dark"] .skeleton-pulse {
    background: linear-gradient(
        90deg,
        rgba(30,41,59,0.8) 25%,
        rgba(51,65,85,0.9) 50%,
        rgba(30,41,59,0.8) 75%
    );
    background-size: 600px 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

/* Feed skeleton post card */
.skeleton-post {
    background: var(--bg-surface-solid, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px -2px rgba(15,23,42,0.05);
}

.skeleton-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-post-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-90 { width: 90%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-line.h-8  { height: 8px; }
.skeleton-line.h-16 { height: 16px; }
.skeleton-line.h-120 { height: 120px; border-radius: 10px; }

.skeleton-post-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.skeleton-post-footer {
    display: flex;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.skeleton-btn {
    height: 28px;
    width: 70px;
    border-radius: 8px;
}

/* Pro Apps skeleton grid */
.skeleton-apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 0 32px 32px;
}

@media (max-width: 820px) {
    .skeleton-apps-grid { grid-template-columns: repeat(2, 1fr); padding: 0 16px 24px; }
}

@media (max-width: 560px) {
    .skeleton-apps-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px 20px; }
}

.skeleton-app-card {
    background: var(--bg-surface-solid, #fff);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15,23,42,0.06);
}

.skeleton-app-hero {
    height: 115px;
    width: 100%;
    border-radius: 0;
}

.skeleton-app-body {
    padding: 22px 24px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-app-footer {
    padding: 14px 24px 20px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    gap: 8px;
}

/* ─────────────────────────────────────────────────────────────
   5. SMOOTH TAB TRANSITIONS — Fade-in + Slide-up
   ───────────────────────────────────────────────────────────── */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Applied via JS when switching views */
.view-transition-enter {
    animation: fadeSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* List container content transition */
#list-container.view-transition-enter {
    animation: fadeSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Analytics tabs transition */
.analytics-tab-content.tab-enter {
    animation: fadeSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Pro Apps banner entrance */
.pa-banner {
    animation: fadeSlideIn 0.4s ease both;
}

.pa-card {
    animation: fadeSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Stagger cards */
.pa-card:nth-child(1) { animation-delay: 0.04s; }
.pa-card:nth-child(2) { animation-delay: 0.08s; }
.pa-card:nth-child(3) { animation-delay: 0.12s; }
.pa-card:nth-child(4) { animation-delay: 0.16s; }
.pa-card:nth-child(5) { animation-delay: 0.20s; }
.pa-card:nth-child(6) { animation-delay: 0.24s; }
.pa-card:nth-child(7) { animation-delay: 0.28s; }

/* ─────────────────────────────────────────────────────────────
   6. ANIMATED BACKGROUND ORBS (Dynamic Background)
   ───────────────────────────────────────────────────────────── */

/* Floating ambient background for pro-apps */
.pa-root {
    position: relative;
    overflow: hidden;
}

.pa-ambient-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    opacity: 0.35;
}

.pa-ambient-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, transparent 70%);
    top: -100px;
    right: 10%;
    animation: orbFloat1 12s ease-in-out infinite;
}

.pa-ambient-orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168,85,247,0.3) 0%, transparent 70%);
    bottom: 10%;
    left: 5%;
    animation: orbFloat2 16s ease-in-out infinite;
}

.pa-ambient-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(245,158,11,0.2) 0%, transparent 70%);
    top: 50%;
    left: 40%;
    animation: orbFloat3 20s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(-30px, 40px) scale(1.05); }
    66%       { transform: translate(20px, -20px) scale(0.97); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%       { transform: translate(40px, -30px) scale(1.08); }
    70%       { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-40px, 40px) scale(1.1); }
}

/* Make sure grid content appears above orbs */
.pa-banner,
.pa-search-wrap,
.pa-section {
    position: relative;
    z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   7. NAV TABS — Smooth active indicator animation
   ───────────────────────────────────────────────────────────── */

.nav-tab {
    transition: color 0.2s ease !important;
    position: relative;
}

.nav-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--uog-blue);
    border-radius: 2px 2px 0 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-tab.active-tab::before {
    transform: translateX(-50%) scaleX(1);
}

/* Sidebar active item glow pulse */
.sidebar-list li.active-item {
    box-shadow:
        0 4px 14px rgba(245,158,11,0.28),
        inset 0 1px 0 rgba(255,255,255,0.2) !important;
}

/* ─────────────────────────────────────────────────────────────
   8. MOBILE BOTTOM NAV — enhanced active indicator
   ───────────────────────────────────────────────────────────── */

.fb-nav-item {
    transition: color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.fb-nav-item.active {
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────
   9. BUTTON MICRO-INTERACTIONS
   ───────────────────────────────────────────────────────────── */

.btn-primary {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                background 0.2s ease !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98) !important;
    transition-duration: 0.1s !important;
}

/* Nav utility buttons */
.nav-util-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.nav-util-btn:hover {
    transform: translateY(-2px) scale(1.08) !important;
}

/* ─────────────────────────────────────────────────────────────
   10. COMPOSE CARD & INTERACTION STATES
   ───────────────────────────────────────────────────────────── */

#open-compose {
    transition: background-color 0.2s ease, box-shadow 0.2s ease !important;
}

#open-compose:hover {
    background-color: #e4e6eb !important;
    box-shadow: inset 0 0 0 1.5px rgba(15,76,129,0.12) !important;
}

.create-action-btn {
    transition: background 0.18s ease, transform 0.18s ease !important;
    border-radius: 8px !important;
}

.create-action-btn:hover {
    background: rgba(15,76,129,0.06) !important;
    transform: scale(1.04) !important;
}

/* ─────────────────────────────────────────────────────────────
   11. TOAST NOTIFICATIONS — slide in from bottom
   ───────────────────────────────────────────────────────────── */

#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px) scale(0.94); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

.toast-msg {
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.2);
}

.toast-msg.hiding {
    animation: toastOut 0.25s ease both;
}
