/* ==========================================================================
   TADBOT CSS DESIGN SYSTEM
   Obsidian Dark & Glassmorphism Theme
   ========================================================================== */

:root {
    --bg-dark: #09090b;
    --bg-panel: rgba(18, 18, 24, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --primary: #5865F2; /* Discord Blurple */
    --secondary: #229ED9; /* Telegram Blue */
    --accent: #10b981; /* Green */
    --accent-glow: rgba(88, 101, 242, 0.25);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Top Background Radial Glow */
.bg-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 600px;
    background: radial-gradient(circle, rgba(88,101,242,0.12) 0%, rgba(34,158,217,0.06) 50%, rgba(9,9,11,0) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Utility Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Headers & Navbar */
.header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    color: var(--text-primary);
}

.logo-icon {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Hero Section */
.hero-section {
    padding: 160px 0 80px 0;
    text-align: center;
    position: relative;
}

.hero-badge {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 56px;
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 40px auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition);
}

/* Section Header formatting */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px auto;
}

.section-tag {
    color: var(--secondary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Playground Sandbox Section */
.playground-section {
    padding: 80px 0;
}

.playground-card {
    max-width: 800px;
    margin: 0 auto;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Sandbox setup input area */
.sandbox-input-area {
    display: flex;
    gap: 16px;
    width: 100%;
}

.input-group {
    position: relative;
    flex-grow: 1;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.sandbox-input-area input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 16px 16px 48px;
    color: white;
    font-family: var(--font-body);
    font-size: 15px;
    transition: var(--transition);
}

.sandbox-input-area input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--accent-glow);
}

/* Spinner and training animation */
.training-container {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    margin: 0 auto 24px auto;
    animation: spin 1s linear infinite;
}

.training-status-log {
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    color: var(--text-muted);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-item.active {
    color: var(--text-primary);
}

.status-item.completed {
    color: var(--accent);
}

/* Active Sandbox Chat Window */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 450px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-reset {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: var(--transition);
}

.btn-reset:hover {
    color: var(--text-primary);
    transform: rotate(45deg);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Message Styles */
.message {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
}

.message.bot {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-top-left-radius: 4px;
}

.message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-top-right-radius: 4px;
}

/* Escalate button inside chat */
.message-escalate-btn {
    margin-top: 8px;
    display: inline-flex;
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.chat-input-area input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-family: var(--font-body);
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-send {
    background: var(--primary);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.btn-send:hover {
    background: #4752c4;
}

/* Sandbox Locked State Lock Overlay */
.chat-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.lock-card {
    text-align: center;
    max-width: 460px;
    padding: 24px;
    animation: slideUp 0.4s ease-out;
}

.lock-icon {
    font-size: 40px;
    color: var(--secondary);
    display: inline-flex;
    background: rgba(34, 158, 217, 0.1);
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 0 24px rgba(34, 158, 217, 0.2);
}

.lock-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.lock-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.platform-selector button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.platform-selector button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.platform-selector button.active-platform {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.lock-pricing {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.lock-pricing .price {
    color: var(--secondary);
    font-weight: 700;
}

.lock-guarantee {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Features Grid */
.features-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.01);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.feature-icon {
    font-size: 24px;
    color: var(--secondary);
    background: rgba(34, 158, 217, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Handoff Support Section */
.support-section {
    padding: 80px 0;
}

.support-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.support-list {
    margin-top: 24px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
}

.list-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary);
    margin-top: 8px;
    flex-shrink: 0;
}

/* Support Visual Mock-chat */
.support-visual {
    padding: 0;
    overflow: hidden;
}

.mock-chat-window {
    background: #18191d;
    border-radius: 15px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.mock-chat-header {
    background: #24252a;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mock-chat-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.mock-title {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
    margin-left: 12px;
}

.mock-chat-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ticket-card {
    background: #1f2128;
    border-left: 3px solid var(--secondary);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
}

.mock-reply {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
}

.mock-reply.agent {
    background: #2e303d;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.reply-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.system-log {
    text-align: center;
    font-size: 11px;
    color: var(--accent);
}

/* Pricing Grid */
.pricing-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.01);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 840px;
    margin: 0 auto;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.15);
}

.popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
    text-transform: uppercase;
}

.pricing-header h3 {
    font-size: 22px;
    margin-bottom: 16px;
}

.price-amount {
    font-size: 40px;
    font-weight: 800;
    font-family: var(--font-heading);
}

.price-amount .frequency {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.price-monthly {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-features i {
    margin-right: 8px;
}

/* Footer Section */
.footer-section {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px 0;
    margin-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-top: 16px;
    font-size: 14px;
    max-width: 320px;
}

.footer-contact h4 {
    margin-bottom: 16px;
    font-size: 16px;
}

.footer-contact p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-contact a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Helper utilities classes */
.hidden {
    display: none !important;
}

.text-success {
    color: var(--accent) !important;
}

/* Responsive adjustments */
@media(max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 16px;
    }
    .nav-links {
        gap: 20px;
    }
    .support-container {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
