/* Import Inter and Vazirmatn for Persian typography support */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Vazirmatn:wght@300;400;500;700&display=swap');

:root {
    --bg-main: #060913;
    --bg-glass: rgba(10, 15, 30, 0.65);
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-hover: rgba(255, 255, 255, 0.12);
    
    --primary: #8b5cf6; /* Violet */
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.25);
    
    --secondary: #06b6d4; /* Cyan */
    --secondary-hover: #0891b2;
    --secondary-glow: rgba(6, 182, 212, 0.25);
    
    --accent: #f43f5e;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-success: #10b981;
    --text-error: #ef4444;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 15% 15%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 85% 85%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(99, 102, 241, 0.06) 0px, transparent 65%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* RTL Helpers */
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Headers / Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #ffffff;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--secondary);
}

/* Glassmorphism Cards */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}
.card:hover {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 20px 45px 0 rgba(139, 92, 246, 0.12), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Form inputs */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: white;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    transition: var(--transition);
    gap: 0.5rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 4px 20px 0 var(--primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 6px 24px 0 rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-glass-hover);
    transform: translateY(-1px);
}
.btn-danger {
    background: var(--accent);
    color: white;
}
.btn-danger:hover {
    background: #e11d48;
}
.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--text-success);
}
.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--text-error);
}
.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.badge-info {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* Navigation Bar */
.navbar {
    border-bottom: 1px solid var(--border-glass);
    background: rgba(6, 9, 19, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}
.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand-img {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4));
}
.brand span {
    background: linear-gradient(135deg, #a78bfa 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Hero Section */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
}
.hero-logo-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-logo {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 0 25px rgba(139, 92, 246, 0.4));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}
.hero h1 {
    font-size: 3rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #d1d5db, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Problem-Solution section */
.problem-solution-section {
    padding: 3rem 0;
    margin-bottom: 2rem;
}
.ps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 768px) {
    .ps-grid {
        grid-template-columns: 1fr;
    }
}
.ps-card {
    border-radius: 16px;
    padding: 2rem;
}
.ps-card.problem {
    border-right: 4px solid var(--accent);
}
.ps-card.solution {
    border-right: 4px solid var(--text-success);
}

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}
.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Pricing Section */
.pricing-section {
    padding: 4rem 0;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.price-card {
    position: relative;
    overflow: hidden;
}
.price-card.popular {
    border-color: var(--primary);
    box-shadow: 0 0 25px 0 rgba(139, 92, 246, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}
.price-card.popular:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 35px 0 rgba(139, 92, 246, 0.35);
}
.popular-badge {
    position: absolute;
    top: 1rem;
    right: -2.2rem;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 2rem;
    transform: rotate(45deg);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.25rem 0;
    color: white;
}
.price-value span {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: normal;
}
.pricing-features {
    list-style: none;
    margin: 1.75rem 0;
    text-align: right;
}
.pricing-features li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.pricing-features li::before {
    content: "✓";
    color: var(--secondary);
    font-weight: bold;
}
.pricing-features li.has-star::before {
    content: "";
    display: none;
}
.pricing-features li.disabled {
    color: rgba(255, 255, 255, 0.2);
    text-decoration: line-through;
}
.pricing-features li.disabled::before {
    content: "✕";
    color: var(--text-error);
}

/* FAQ Accordion */
.faq-section {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2.5rem;
}
.faq-item {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}
.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.02);
}
.faq-question {
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}
.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}
.faq-item.active .faq-question::after {
    content: "−";
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.faq-item.active .faq-answer {
    max-height: 200px;
    margin-top: 1rem;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.main-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Booth List Cards */
.booth-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.booth-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    transition: var(--transition);
}
.booth-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.booth-details {
    display: flex;
    flex-direction: column;
}
.booth-actions {
    display: flex;
    gap: 0.5rem;
}

/* Queue and Table Styling */
.table-container {
    overflow-x: auto;
    width: 100%;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}
th {
    padding: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.875rem;
}
td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
}
tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}
.product-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

/* Auth Cards */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.alert-success {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--text-success);
}
.alert-danger {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--text-error);
}

/* Guide Container for Token */
.token-guide {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-glass);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.token-guide ol {
    margin-right: 1.25rem;
    margin-top: 0.5rem;
}
.token-guide li {
    margin-bottom: 0.25rem;
}

/* Tab controls */
.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.tab.active {
    color: white;
    border-bottom-color: var(--primary);
}

/* Footer styling */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 6rem;
    font-size: 0.875rem;
}

/* Showcase Grid Layout */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    direction: ltr; /* Force Text on Left, Mockup on Right */
}
@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .showcase-grid > div {
        text-align: center !important;
    }
}

/* Chat Animations */
.typing-bubble {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.75rem 1.25rem;
    border-radius: 16px 16px 4px 16px;
    align-self: flex-end;
    max-width: fit-content;
    animation: typing-loop 8s infinite;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: dot-jump 1.4s infinite both;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-jump {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1.1) translateY(-4px); opacity: 1; }
}

@keyframes typing-loop {
    0%, 20% { opacity: 1; transform: scale(1); max-height: 40px; margin-bottom: 1rem; }
    25%, 100% { opacity: 0; transform: scale(0.8); max-height: 0; padding: 0 1.25rem; margin-bottom: 0; border-width: 0; overflow: hidden; }
}

.animated-report-bubble {
    animation: report-loop 8s infinite;
    transform-origin: bottom right;
}

@keyframes report-loop {
    0%, 22% { opacity: 0; transform: scale(0.9) translateY(15px); max-height: 0; padding: 0 1rem; border-width: 0; overflow: hidden; }
    27%, 92% { opacity: 1; transform: scale(1) translateY(0); max-height: 300px; padding: 1rem; border-width: 1px; }
    96%, 100% { opacity: 0; transform: scale(0.95); max-height: 300px; }
}
