/* user_manual.css - Premium Glassmorphism UI */

:root {
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #10b981;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark) radial-gradient(circle at top right, rgba(59,130,246,0.1), transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Hidden SVGs */
.hidden-svgs { display: none; }
.um-icon { width: 20px; height: 20px; flex-shrink: 0; }
.um-icon-sm { width: 14px; height: 14px; flex-shrink: 0; }
.hidden { display: none !important; }

/* HEADER */
.um-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.um-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.um-brand h1 {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.um-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 12px;
    width: 300px;
    transition: all 0.3s ease;
}
.um-search-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.um-search-wrap input {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 10px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}
.um-search-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 101;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
.um-search-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.um-search-item:hover { background: rgba(255,255,255,0.1); }

.um-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}
.um-toggle-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.um-toggle-group select {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}
.um-lang-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}
.um-lang-btn:hover { transform: scale(1.05); }

/* PROGRESS BAR */
.um-progress-container {
    padding: 16px 24px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-color);
}
.um-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.um-progress-track {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}
.um-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* LAYOUT */
.um-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.um-sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.5);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    overflow-y: auto;
}
.um-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    text-align: left;
}
.um-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.um-nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}
.badge-done { color: var(--success-color); margin-left: auto; }
.badge-lock { color: #f43f5e; margin-left: auto; }

/* CONTENT AREA */
.um-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
.um-module {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.um-module-header {
    margin-bottom: 32px;
}
.um-module-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}
.um-module-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* STEP CARDS */
.um-step-card {
    display: flex;
    gap: 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.um-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
}

.um-step-text h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #e2e8f0;
}
.um-step-text p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* CSS "GIF" ANIMATIONS */
.um-step-anim {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.anim-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Glowing Highlight Ring */
.glowing-ring {
    position: relative;
}
.glowing-ring::after {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border: 2px solid var(--primary-color);
    border-radius: inherit;
    animation: pulseRing 1.5s infinite;
}
@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Custom Animation: Setup */
.anim-skeleton-title { width: 60%; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; margin-bottom: 12px; }
.anim-skeleton-line { width: 80%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; margin-bottom: 16px; }
.anim-btn { background: var(--primary-color); color: white; padding: 6px 12px; font-size: 0.7rem; border-radius: 4px; font-weight: bold; border-radius: 6px; }

/* Custom Animation: Cart */
.anim-cart-box {
    width: 40px; height: 40px; border: 2px solid var(--text-muted); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.anim-item-fly {
    width: 12px; height: 12px; background: var(--primary-color); border-radius: 50%;
    position: absolute; top: 20px;
    animation: flyIn 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes flyIn {
    0% { transform: translate(-30px, -30px) scale(1); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translate(0, 20px) scale(0.5); opacity: 0; }
}

/* Custom Animation: Checkout */
.anim-checkout {
    background: var(--success-color); color: white; padding: 10px 16px; border-radius: 8px; font-weight: bold; font-size: 0.9rem;
}

/* Custom Animation: Udhar */
.anim-customer { font-size: 0.8rem; font-weight: bold; margin-bottom: 4px; }
.anim-amount { font-size: 1.1rem; font-weight: bold; }

/* MARK AS READ BUTTON */
.um-mark-read-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.um-mark-read-btn:hover { background: rgba(255,255,255,0.15); }
.um-mark-read-btn.completed {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success-color);
    color: var(--success-color);
    pointer-events: none;
}

/* CONFETTI CANVAS */
#confetti-canvas {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .um-layout { flex-direction: column; }
    .um-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); padding: 12px; }
    #um-nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
    .um-nav-item { flex: 0 0 auto; width: auto; }
    .um-search-wrap { width: 100px; }
    .um-search-wrap:focus-within { width: 100%; position: absolute; left: 0; right: 0; z-index: 10; background: var(--bg-dark); }
    .um-step-card { flex-direction: column; }
    .um-step-anim { width: 100%; height: 100px; }
}
