/* style.css */
:root {
    --bg-dark: #050508;
    --bg-surface: #0a0a0f;
    --glass-bg: rgba(20, 20, 30, 0.4);
    --glass-inset: rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    
    --primary: #4f46e5;
    --primary-hover: #6366f1;
    --primary-glow: rgba(79, 70, 229, 0.4);
    
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.4);
    
    --success: #10b981;
    --success-hover: #34d399;
    --danger: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --font-sans: 'Inter', -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-sans); }
body { background-color: var(--bg-dark); color: var(--text-main); min-height: 100vh; overflow-x: hidden; position: relative; display: flex; flex-direction: column; }

.bg-glow { position: fixed; border-radius: 50%; filter: blur(120px); z-index: -1; opacity: 0.4; pointer-events: none; }
.glow-1 { top: -10%; left: 20%; width: 600px; height: 600px; background: radial-gradient(circle, var(--primary) 0%, transparent 70%); }
.glow-2 { bottom: -10%; right: 10%; width: 500px; height: 500px; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-muted); line-height: 1.5; }

.gradient-text-container { display: inline-block; padding-bottom: 0.2em; }
.gradient-text { background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; transition: opacity 0.4s ease; padding-bottom: 0.1em; }

.hidden { display: none !important; }
.active-section { display: block; animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.hidden-section { display: none; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.full-width { width: 100%; }

.glass { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: var(--radius-md); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); }
.glass-inset { background: var(--glass-inset); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); }

.btn { padding: 0.6rem 1.2rem; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: all 0.2s ease; border: none; font-size: 0.95rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-large { padding: 0.8rem 1.5rem; font-size: 1rem; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 0 15px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 20px var(--primary-glow); }
.btn-accent { background: var(--accent); color: white; box-shadow: 0 0 15px var(--accent-glow); }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 20px var(--accent-glow); }
.btn-outline { background: transparent; border: 1px solid var(--glass-highlight); color: var(--text-main); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--text-main); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text-main); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: var(--success-hover); transform: translateY(-2px); }
.btn-icon { padding: 0.5rem; background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border-radius: 50%; }
.btn-icon:hover { color: white; background: rgba(255, 255, 255, 0.1); }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; position: sticky; top: 0; z-index: 100; border-radius: 0; border-top: none; border-left: none; border-right: none; background: rgba(10, 10, 15, 0.8); }
.nav-brand { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.nav-search { position: relative; flex-grow: 1; max-width: 400px; margin: 0 2rem; }
.nav-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); }
.nav-search input { background: var(--glass-inset); border: 1px solid var(--glass-border); border-radius: 20px; padding: 0.6rem 1rem 0.6rem 2.5rem; color: white; width: 100%; outline: none; transition: all 0.3s ease; font-size: 0.9rem; }
.nav-search input:focus { border-color: var(--primary); background: rgba(0, 0, 0, 0.5); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.user-profile { display: flex; align-items: center; gap: 0.75rem; margin-right: 1rem; padding-right: 1rem; border-right: 1px solid var(--glass-border); }
.avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem; }
.user-info { display: flex; flex-direction: column; }
.user-greeting { font-size: 0.9rem; font-weight: 600; }
.badge { font-size: 0.7rem; background: rgba(255, 255, 255, 0.1); padding: 0.2rem 0.6rem; border-radius: 12px; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; width: max-content; border: 1px solid var(--glass-border); }
.badge-lg { font-size: 0.8rem; padding: 0.3rem 0.8rem; }

.hero { text-align: center; padding: 4rem 1rem 2rem; max-width: 800px; margin: 0 auto; }
.hero-badge { display: inline-block; padding: 0.4rem 1rem; background: rgba(79, 70, 229, 0.1); border: 1px solid rgba(79, 70, 229, 0.3); color: var(--primary-hover); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem; }
.hero h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.container { max-width: 1400px; margin: 0 auto; padding: 2rem; flex: 1; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem; }
.section-title { font-size: 2.2rem; }
.filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill { background: transparent; border: 1px solid var(--glass-border); color: var(--text-muted); padding: 0.4rem 1rem; border-radius: 20px; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.pill:hover, .pill.active { background: var(--text-main); color: var(--bg-dark); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2rem; }

.agent-card { padding: 1.2rem; display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); border: 1px solid var(--glass-border); position: relative; overflow: hidden; cursor: pointer; }
.agent-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 100%; background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%); pointer-events: none; }
.agent-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--primary-glow); border-color: var(--primary); }
.card-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.agent-avatar { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--glass-inset); border: 1px solid var(--glass-border); }
.card-title-group { flex: 1; }
.agent-title { font-size: 1.2rem; margin-bottom: 0.2rem; display: flex; justify-content: space-between; align-items: center; }
.agent-creator { font-size: 0.8rem; color: var(--text-muted); }
.agent-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.skills-preview { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.skill-tag { font-size: 0.7rem; padding: 0.2rem 0.5rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; color: var(--text-muted); }
.agent-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); }
.agent-price { font-size: 1.2rem; font-weight: 800; color: white; }
.agent-price span { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
.detail-main { padding: 2rem; }
.detail-header-wrapper { padding-bottom: 2rem; border-bottom: 1px solid var(--glass-border); }
.detail-cover { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1.5rem; border: 1px solid var(--glass-border); }
.detail-title-row { display: flex; justify-content: space-between; align-items: flex-end; }
.detail-text { font-size: 1.05rem; line-height: 1.7; color: var(--text-muted); white-space: pre-wrap; }
.skills-flex { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-badge { padding: 0.4rem 0.8rem; background: rgba(79, 70, 229, 0.1); border: 1px solid rgba(79, 70, 229, 0.3); color: var(--text-main); border-radius: 8px; font-size: 0.9rem; }
.detail-sidebar { padding: 2rem; position: sticky; top: 100px; }
.agent-price-large { font-size: 2.5rem; color: var(--success); }
.meta-row { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.meta-row svg { color: var(--primary); }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--glass-border); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card { padding: 2rem; display: flex; align-items: center; gap: 1.5rem; position: relative; overflow: hidden; }
.premium-border { border: 1px solid rgba(139, 92, 246, 0.3); box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.05); }
.stat-icon { width: 60px; height: 60px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.revenue-icon { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.sales-icon { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.agents-icon { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.stat-card h3 { color: var(--text-muted); font-size: 1rem; font-weight: 500; margin-bottom: 0.3rem; }
.stat-value { font-size: 2.5rem; font-weight: 800; color: white; line-height: 1; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 1000; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.modal.show { display: flex; opacity: 1; overflow-y: auto; padding: 2rem 0; }
.modal-content { background: var(--bg-surface); padding: 2.5rem; width: 100%; max-width: 480px; position: relative; transform: scale(0.95) translateY(20px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 25px 50px rgba(0,0,0,0.5), 0 0 0 1px var(--glass-highlight); margin: auto; }
.modal-lg { max-width: 700px; }
.modal.show .modal-content { transform: scale(1) translateY(0); }
.close-modal { position: absolute; top: 1.5rem; right: 1.5rem; background: transparent; border: none; cursor: pointer; color: var(--text-muted); transition: color 0.2s; }
.close-modal:hover { color: white; }
.modal-header { margin-bottom: 2rem; text-align: center; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"], .form-group input[type="number"], .form-group input[type="url"], .form-group textarea, .form-select { width: 100%; padding: 0.8rem 1rem; background: var(--glass-inset); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); color: white; outline: none; transition: all 0.2s; font-size: 1rem; }
.form-group input:focus, .form-group textarea:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); background-color: rgba(0,0,0,0.4); }
.form-select { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; }
.form-group textarea { resize: vertical; }

.file-upload-wrapper { position: relative; width: 100%; height: 120px; border: 2px dashed var(--glass-border); border-radius: var(--radius-sm); background: var(--glass-inset); transition: all 0.2s ease; cursor: pointer; }
.file-upload-wrapper:hover { border-color: var(--primary); background: rgba(79, 70, 229, 0.05); }
.file-input { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; }
.file-upload-design { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); gap: 0.5rem; }
.file-upload-design svg { color: var(--primary); }

.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.role-card { position: relative; cursor: pointer; }
.role-card input { position: absolute; opacity: 0; }
.role-content { padding: 1rem; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); background: var(--glass-inset); transition: all 0.2s; text-align: center; }
.role-content h4 { margin-bottom: 0.25rem; font-size: 1rem; }
.role-content p { font-size: 0.8rem; color: var(--text-muted); }
.role-card input:checked + .role-content { border-color: var(--primary); background: rgba(79, 70, 229, 0.1); box-shadow: 0 0 15px rgba(79, 70, 229, 0.2); }

.auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.95rem; color: var(--text-muted); }
.auth-switch span { color: var(--primary); cursor: pointer; font-weight: 600; }
.auth-switch span:hover { text-decoration: underline; }

.purchase-details { margin: 1.5rem 0; padding: 1.5rem; }
.purchase-row { display: flex; justify-content: space-between; margin-bottom: 0.8rem; font-size: 1rem; }
.purchase-total { border-top: 1px dashed var(--glass-border); padding-top: 1rem; margin-top: 1rem; font-weight: 800; font-size: 1.4rem; color: var(--success); }
.secure-note { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin-top: 1rem; }

.dropdown-container { position: relative; margin-left: 0.5rem; }
.dropdown-menu { position: absolute; top: calc(100% + 15px); right: 0; min-width: 180px; padding: 0.5rem; border-radius: var(--radius-md); z-index: 2000; display: flex; flex-direction: column; gap: 0.25rem; }
.dropdown-item { padding: 0.75rem 1rem; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--text-main); font-size: 0.9rem; font-weight: 500; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 0.75rem; transition: background 0.2s; }
.dropdown-item:hover { background: rgba(255, 255, 255, 0.05); }

.faq-group { margin-bottom: 2.5rem; }
.faq-group h3 { margin-bottom: 1.5rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 0.8rem; font-size: 1.3rem; }
details.faq-item { background: var(--glass-inset); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); margin-bottom: 0.8rem; padding: 0.8rem 1.2rem; transition: all 0.2s ease; }
details.faq-item[open] { background: rgba(255, 255, 255, 0.05); border-color: var(--primary); }
summary.faq-question { font-weight: 600; cursor: pointer; outline: none; padding: 0.2rem 0; display: flex; align-items: center; justify-content: space-between; font-size: 1.05rem; }
summary.faq-question::after { content: '+'; color: var(--primary); font-size: 1.5rem; font-weight: 400; line-height: 1; }
details[open] summary.faq-question::after { content: '−'; }
.faq-answer { padding: 1rem 0 0.5rem; color: var(--text-muted); line-height: 1.6; border-top: 1px dashed var(--glass-border); margin-top: 0.8rem; font-size: 0.95rem; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
    .nav-search { display: none; }
    .hero h1 { font-size: 3rem; }
    .detail-layout { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}

.footer { border-radius: 0; border-bottom: none; border-left: none; border-right: none; padding: 3rem 2rem; margin-top: auto; }
.footer-link { color: var(--text-muted); font-size: 0.85rem; cursor: pointer; transition: color 0.2s; }
.footer-link:hover { color: var(--primary); text-decoration: underline; }
.legal-text { font-size: 0.9rem; line-height: 1.7; color: var(--text-muted); max-height: 50vh; overflow-y: auto; padding-right: 1rem; }
.legal-text h3 { color: var(--text-main); margin: 1.5rem 0 0.5rem 0; font-size: 1.1rem; }

/* INJECTED: Help Button, Tooltip, and Tabs Styles */
.help-icon-btn { background: rgba(79, 70, 229, 0.1); border: 1px solid rgba(79, 70, 229, 0.3); color: var(--primary); border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.8rem; font-weight: bold; transition: all 0.2s; }
.help-icon-btn:hover { background: var(--primary); color: white; }

.tooltip-wrapper { position: relative; display: inline-block; }
.tooltip-wrapper .tooltip-text { visibility: hidden; width: 140px; background-color: var(--primary); color: #fff; text-align: center; border-radius: 6px; padding: 5px; position: absolute; z-index: 1; bottom: 125%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; font-size: 0.75rem; pointer-events: none; }
.tooltip-wrapper .tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: var(--primary) transparent transparent transparent; }
.tooltip-wrapper:hover .tooltip-text { visibility: visible; opacity: 1; }

.tabs-header { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--glass-border); margin-bottom: 1.5rem; }
.tab-btn { background: transparent; color: var(--text-muted); border: none; padding: 0.8rem 1rem; cursor: pointer; font-size: 0.95rem; font-weight: 500; border-bottom: 2px solid transparent; transition: all 0.2s; }
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; animation: fadeUp 0.3s ease forwards; }
.tab-content.active { display: block; }
.instruction-list { padding-left: 1.5rem; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.instruction-list li { margin-bottom: 0.5rem; }
.instruction-list code { background: rgba(255,255,255,0.1); padding: 0.2rem 0.4rem; border-radius: 4px; font-family: monospace; font-size: 0.85rem; color: var(--text-main); }
.alert-box { background: rgba(139, 92, 246, 0.1); border-left: 3px solid var(--accent); padding: 1rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.9rem; color: var(--text-muted); }