/* Premium Animated Portal Demo Styles */
:root {
  --pri: #0C2B4E;
  --pri-m: #1A3D64;
  --pri-l: #1D546C;
  --gold: #D4AF37;
  --dark: #0f172a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg-light: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f0f2f5; color: var(--text-main); overflow-x: hidden; }
a { text-decoration: none; }

/* Top bar */
.demo-topbar { background: var(--pri); padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.demo-topbar-inner { max-width: 1400px; margin: 0 auto; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; }
.demo-topbar .brand { color: var(--gold); font-weight: 900; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; letter-spacing: 0.5px; }
.demo-topbar .nav-links { display: flex; gap: 25px; align-items: center; }
.demo-topbar .nav-links a { color: rgba(255,255,255,.8); font-size: 0.85rem; font-weight: 600; transition: 0.3s ease; }
.demo-topbar .nav-links a:hover { color: var(--gold); }
.demo-topbar .nav-links .btn-doc { background: linear-gradient(135deg, var(--gold), #f4d03f); color: var(--pri); padding: 8px 20px; border-radius: 8px; font-weight: 800; font-size: 0.8rem; box-shadow: 0 4px 15px rgba(212,175,55,0.3); transition: transform 0.2s, box-shadow 0.2s; }
.demo-topbar .nav-links .btn-doc:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212,175,55,0.5); }

/* Hero Section with Animations */
.demo-hero { background: linear-gradient(135deg, var(--pri) 0%, var(--pri-m) 50%, var(--dark) 100%); padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden; }
.demo-hero::before { content:''; position:absolute; width:600px; height:600px; border-radius:50%; background:radial-gradient(circle, rgba(212,175,55,0.15), transparent 70%); top:-200px; right:-150px; animation: pulseGlow 8s infinite alternate; pointer-events: none; }
.demo-hero::after { content:''; position:absolute; width:400px; height:400px; border-radius:50%; background:radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%); bottom:-100px; left:-100px; animation: pulseGlow 10s infinite alternate-reverse; pointer-events: none; }

.demo-hero h1 { color: #fff; font-size: 3rem; font-weight: 900; margin-bottom: 15px; letter-spacing: -1px; }
.demo-hero h1 span { background: linear-gradient(135deg, var(--gold), #fff9c4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; position: relative; }
.demo-hero p { color: rgba(255,255,255,.7); font-size: 1.05rem; max-width: 650px; margin: 0 auto 35px; line-height: 1.6; }

/* Control Bar & Auto-Play */
.demo-controls { max-width: 1400px; margin: 0 auto; padding: 0 30px; display: flex; flex-direction: column; align-items: center; gap: 20px; position: relative; z-index: 10; }
.tab-bar { display: flex; gap: 10px; background: rgba(255,255,255,0.05); padding: 8px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); flex-wrap: wrap; justify-content: center; }
.tab-btn { background: transparent; color: rgba(255,255,255,.7); border: none; padding: 12px 24px; border-radius: 10px; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 8px; font-family: inherit; position: relative; overflow: hidden; }
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.tab-btn.active { background: #fff; color: var(--pri); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.tab-btn i { font-size: 1rem; }

.autoplay-toggle { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); padding: 8px 20px; border-radius: 30px; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.autoplay-toggle:hover { background: rgba(212,175,55,0.25); }
.autoplay-toggle.active { background: var(--gold); color: var(--pri); box-shadow: 0 0 15px rgba(212,175,55,0.4); }
.autoplay-toggle.active .play-icon { display: none; }
.autoplay-toggle:not(.active) .pause-icon { display: none; }

/* Portal Showcase Area (MacBook Style Wrapper) */
.portal-showcase { max-width: 1200px; margin: -40px auto 60px; padding: 0 20px; position: relative; z-index: 5; perspective: 1000px; }
.macbook-wrapper { background: #1e293b; border-radius: 20px 20px 0 0; padding: 12px 12px 0; box-shadow: 0 30px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1) inset; position: relative; }
.macbook-wrapper::after { content: ''; display: block; height: 24px; background: linear-gradient(to bottom, #cbd5e1, #94a3b8); border-radius: 0 0 24px 24px; margin: 0 -24px; position: relative; z-index: -1; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.macbook-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 25px; background: #0f172a; border-radius: 0 0 12px 12px; z-index: 20; display: flex; justify-content: center; align-items: center; }
.macbook-camera { width: 8px; height: 8px; background: #1e293b; border-radius: 50%; border: 2px solid #000; box-shadow: inset 0 0 2px rgba(255,255,255,0.2); }

.preview-container { background: var(--bg-light); border-radius: 12px 12px 0 0; overflow: hidden; position: relative; height: 650px; }
.preview-card { display: none; height: 100%; opacity: 0; }
.preview-card.active { display: flex; flex-direction: column; animation: portalEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Mock Browser Header */
.browser-header { background: #fff; padding: 12px 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #e2e8f0; }
.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 12px; height: 12px; border-radius: 50%; }
.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }
.browser-url { background: #f1f5f9; padding: 8px 16px; border-radius: 8px; flex: 1; max-width: 600px; margin: 0 auto; color: var(--text-muted); font-size: 0.75rem; font-family: 'Fira Code', monospace; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #e2e8f0; }

/* Mock Layout */
.mock-layout { display: flex; flex: 1; overflow: hidden; }

/* Mock Sidebar */
.mock-sidebar { width: 250px; background: var(--pri); color: rgba(255,255,255,0.7); display: flex; flex-direction: column; flex-shrink: 0; z-index: 10; overflow-y: auto; }
.mock-sidebar::-webkit-scrollbar { width: 4px; }
.mock-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }
.ms-brand { padding: 25px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 10px; }
.ms-brand-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--gold), #f4d03f); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--pri); font-size: 1.2rem; }
.ms-brand-text h5 { color: #fff; font-weight: 800; font-size: 1rem; margin: 0; letter-spacing: 0.5px; }
.ms-brand-text small { color: var(--gold); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

.ms-label { font-size: 0.6rem; font-weight: 800; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1.5px; padding: 15px 20px 5px; }
.ms-link { padding: 12px 20px; display: flex; align-items: center; gap: 12px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.3s; position: relative; }
.ms-link i { font-size: 1rem; width: 20px; text-align: center; transition: transform 0.3s; }
.ms-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.ms-link:hover i { transform: translateX(3px); }
.ms-link.act { color: #fff; background: rgba(212,175,55,0.1); border-right: 3px solid var(--gold); font-weight: 700; }
.ms-link.act i { color: var(--gold); }

/* Mock Main Area */
.mock-main { flex: 1; padding: 30px; overflow-y: auto; background: #f8fafc; }
.mock-main::-webkit-scrollbar { width: 6px; }
.mock-main::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; opacity: 0; transform: translateY(10px); }
.active .page-header { animation: fadeInUp 0.5s ease forwards 0.2s; }
.page-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--pri); margin: 0; }
.page-header p { font-size: 0.85rem; color: var(--text-muted); margin: 5px 0 0; }
.header-actions { display: flex; gap: 10px; }
.btn-mock { padding: 8px 16px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 6px; border: none; }
.btn-primary-mock { background: var(--pri); color: #fff; box-shadow: 0 4px 10px rgba(12,43,78,0.2); }
.btn-outline-mock { background: #fff; border: 1px solid #cbd5e1; color: var(--text-main); }

/* Animated KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 25px; }
.kpi-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #e2e8f0; display: flex; align-items: flex-start; justify-content: space-between; opacity: 0; transform: translateY(20px); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.kpi-card:hover { transform: translateY(-5px) !important; box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.active .kpi-card:nth-child(1) { animation: fadeInUp 0.5s ease forwards 0.3s; }
.active .kpi-card:nth-child(2) { animation: fadeInUp 0.5s ease forwards 0.4s; }
.active .kpi-card:nth-child(3) { animation: fadeInUp 0.5s ease forwards 0.5s; }
.active .kpi-card:nth-child(4) { animation: fadeInUp 0.5s ease forwards 0.6s; }

.kpi-info h4 { font-size: 1.6rem; font-weight: 900; color: var(--text-main); margin: 0 0 4px; line-height: 1; }
.kpi-info span { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.icon-blue { background: #eff6ff; color: var(--info); }
.icon-green { background: #f0fdf4; color: var(--success); }
.icon-amber { background: #fffbeb; color: var(--warning); }
.icon-purple { background: #faf5ff; color: #8b5cf6; }

/* AI Insight Box (Animated) */
.ai-insight-mock { background: linear-gradient(135deg, var(--pri), var(--pri-l)); border-radius: 12px; padding: 20px 25px; margin-bottom: 25px; color: #fff; position: relative; overflow: hidden; opacity: 0; transform: translateY(20px); box-shadow: 0 10px 30px rgba(12,43,78,0.2); }
.active .ai-insight-mock { animation: fadeInUp 0.5s ease forwards 0.7s; }
.ai-insight-mock::before { content:''; position:absolute; inset:0; background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjIiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiLz48L3N2Zz4='); opacity: 0.5; }
.ai-header-mock { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; position: relative; z-index: 2; }
.ai-header-mock i { color: var(--gold); font-size: 1.2rem; animation: aiPulse 2s infinite; }
.ai-header-mock h5 { font-size: 1rem; font-weight: 800; margin: 0; letter-spacing: 0.5px; }
.ai-header-mock .badge-beta { background: rgba(212,175,55,0.2); color: var(--gold); font-size: 0.6rem; padding: 2px 8px; border-radius: 20px; border: 1px solid rgba(212,175,55,0.4); text-transform: uppercase; font-weight: 800; }
.ai-content-mock { font-size: 0.85rem; color: rgba(255,255,255,0.8); line-height: 1.6; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.ai-typing-line { height: 12px; background: rgba(255,255,255,0.1); border-radius: 6px; width: 0; }
.active .ai-typing-line:nth-child(1) { animation: typeLine 1s ease forwards 1s; }
.active .ai-typing-line:nth-child(2) { animation: typeLine 1.5s ease forwards 1.2s; max-width: 80%; }
.ai-btn-mock { align-self: flex-start; background: linear-gradient(135deg, var(--gold), #d97706); border: none; padding: 8px 16px; border-radius: 6px; color: var(--pri); font-weight: 800; font-size: 0.75rem; margin-top: 10px; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: 0.3s; }
.ai-btn-mock:hover { box-shadow: 0 0 15px rgba(212,175,55,0.5); transform: translateY(-2px); }

/* Charts & Tables Area */
.data-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
.data-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #e2e8f0; opacity: 0; transform: translateY(20px); }
.active .data-card:nth-child(1) { animation: fadeInUp 0.5s ease forwards 0.8s; }
.active .data-card:nth-child(2) { animation: fadeInUp 0.5s ease forwards 0.9s; }
.card-title-mock { font-size: 0.9rem; font-weight: 800; color: var(--pri); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }

/* Animated Bar Chart */
.chart-bars-mock { display: flex; align-items: flex-end; justify-content: space-between; height: 160px; padding-bottom: 25px; border-bottom: 1px solid #e2e8f0; position: relative; }
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; position: relative; height: 100%; justify-content: flex-end; }
.bar-wrap { width: 30%; background: #f1f5f9; border-radius: 4px 4px 0 0; height: 100%; display: flex; align-items: flex-end; position: relative; overflow: hidden; }
.bar-fill { width: 100%; border-radius: 4px 4px 0 0; height: 0; transition: height 1s ease; position: relative; }
.bar-fill::after { content:''; position:absolute; top:0; left:0; right:0; height:100%; background:linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%); }
.chart-lbl { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; position: absolute; bottom: -20px; }
.bar-val { font-size: 0.65rem; font-weight: 800; color: var(--pri); position: absolute; top: -20px; opacity: 0; }

.active .bar-fill { animation: fillBar 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.2s; }
.active .bar-val { animation: fadeIn 0.3s forwards 2s; }

/* Animated List/Table */
.list-mock { display: flex; flex-direction: column; gap: 12px; }
.list-item-mock { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; transition: 0.3s; }
.list-item-mock:hover { background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transform: translateX(5px); border-color: #cbd5e1; }
.item-left { display: flex; align-items: center; gap: 12px; }
.item-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.75rem; color: #fff; }
.item-info h6 { font-size: 0.85rem; font-weight: 700; color: var(--text-main); margin: 0 0 2px; }
.item-info p { font-size: 0.7rem; color: var(--text-muted); margin: 0; }
.item-status { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.status-success { background: #dcfce7; color: #16a34a; }
.status-warning { background: #fef3c7; color: #d97706; }
.status-danger { background: #fee2e2; color: #dc2626; }

/* Info Section below mockup */
.portal-info { max-width: 1000px; margin: 0 auto; padding: 0 20px 60px; text-align: center; }
.portal-info h3 { font-size: 1.8rem; font-weight: 900; color: var(--pri); margin-bottom: 15px; }
.portal-info p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 25px; max-width: 800px; margin-left: auto; margin-right: auto; }
.feat-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.feat-pill { background: #fff; border: 1px solid #e2e8f0; padding: 8px 18px; border-radius: 30px; font-size: 0.8rem; font-weight: 700; color: var(--pri); box-shadow: 0 4px 10px rgba(0,0,0,0.03); display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.feat-pill:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(212,175,55,0.15); }
.feat-pill i { color: var(--success); font-size: 0.9rem; }

/* Footer */
.demo-footer { background: var(--dark); padding: 30px 0; text-align: center; margin-top: 0; }
.demo-footer p { color: rgba(255,255,255,.4); font-size: 0.8rem; }
.demo-footer a { color: var(--gold); font-weight: 700; }
.demo-footer a:hover { color: #f4d03f; }

/* Animations */
@keyframes pulseGlow { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.1); opacity: 0.8; } }
@keyframes portalEnter { 0% { opacity: 0; transform: scale(0.98) translateY(10px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes aiPulse { 0% { text-shadow: 0 0 0 rgba(212,175,55,0); transform: scale(1); } 50% { text-shadow: 0 0 15px rgba(212,175,55,0.8); transform: scale(1.1); } 100% { text-shadow: 0 0 0 rgba(212,175,55,0); transform: scale(1); } }
@keyframes typeLine { 0% { width: 0; } 100% { width: 100%; } }
@keyframes fillBar { 0% { height: 0; } 100% { height: var(--target-height); } }

/* Responsive */
@media (max-width: 1024px) {
  .data-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mock-sidebar { display: none; }
  .demo-hero h1 { font-size: 2.2rem; }
  .tab-btn { padding: 10px 16px; font-size: 0.75rem; }
  .macbook-notch { display: none; }
  .preview-container { height: 750px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .demo-hero h1 { font-size: 1.8rem; }
  .demo-hero p { font-size: 0.9rem; }
  .browser-url { display: none; }
}
