/* 
 * Goseler - Daraz Product Hunting Chrome Extension
 * Main Stylesheet
 */

/* ============================
   CSS Variables
   ============================ */
:root {
    /* Colors */
    --primary: #0f3460;
    --primary-light: #1a4b8c;
    --primary-dark: #0a2540;
    --secondary: #e94560;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --spacer: 1rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-muted: #6c757d;
    --border-color: #2d3748;
    --card-bg: #16213e;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ============================
   Base Styles
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================
   Navbar
   ============================ */
.navbar {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--secondary);
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    /* background-color: var(--bg-tertiary); */
    color: var(--primary);
}

.navbar-nav .nav-link.active {
    color: var(--primary);
    background-color: var(--bg-tertiary);
}

/* Navbar Auth Buttons */
.nav-auth-btn {
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn-login {
    background-color: var(--primary);
    color: white !important;
}

.btn-login:hover {
    background-color: var(--primary-light);
}

.btn-register {
    background-color: var(--secondary);
    color: white !important;
}

.btn-register:hover {
    opacity: 0.9;
}

/* ============================
   Hero Section
   ============================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>') repeat;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--radius);
}

.hero-image {
    max-width: 100%;
    height: auto;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================
   Features Section
   ============================ */
.features-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ============================
   Pricing Section
   ============================ */
.pricing-section {
    padding: 5rem 0;
    background-color: var(--bg-tertiary);
}

.pricing-card {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--secondary);
    color: white;
    padding: 0.25rem 2.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    transform: rotate(45deg);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.plan-pricing {
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 1rem 0;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
}

.credits-list {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.credits-list li {
    padding: 0.25rem 0;
}

.plan-features li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.trial-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================
   Dashboard Layout
   ============================ */
.dashboard-wrapper {
    display: flex;
    /* min-height: 100vh; */
}

.sidebar {
    width: 260px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 100;
}

.sidebar-nav {
    padding: 0 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--primary);
    color: white;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    /* margin-top: 60px; */
}

/* ============================
   Dashboard Cards
   ============================ */
.dashboard-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
}

.dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-icon.primary { background: var(--primary); }
.stat-icon.success { background: var(--success); }
.stat-icon.warning { background: var(--warning); }
.stat-icon.info { background: var(--info); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================
   Product Cards
   ============================ */
.product-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-source {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-save-product {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.btn-save-product:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.btn-save-product.saved {
    background: var(--danger);
    color: white;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.product-rating {
    font-size: 0.85rem;
    color: var(--warning);
}

/* ============================
   Collection Cards
   ============================ */
.collection-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.collection-card:hover {
    box-shadow: var(--shadow-lg);
}

.collection-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.collection-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.collection-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================
   Credit Display
   ============================ */
.credit-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.credit-balance {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

/* ============================
   Forms
   ============================ */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-form .form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-control, .form-select {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================
   Buttons
   ============================ */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    transition: var(--transition);
}
.btn:hover{
    opacity: 0.9;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    opacity: 0.9;
}

/* ============================
   Toast Notifications
   ============================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--info);
    transform: translateX(120%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-item.show {
    transform: translateX(0);
}

.toast-item.hide {
    transform: translateX(120%);
    opacity: 0;
}

.toast-item.toast-success { border-left-color: var(--success); }
.toast-item.toast-error { border-left-color: var(--danger); }
.toast-item.toast-warning { border-left-color: var(--warning); }
.toast-item.toast-info { border-left-color: var(--info); }

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-message {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================
   Loading Spinner
   ============================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.spinner-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ============================
   Empty States
   ============================ */
.empty-state {
    padding: 3rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-state i {
    opacity: 0.5;
}

/* ============================
   Tables
   ============================ */
.table {
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* ============================
   Modal
   ============================ */
.modal-content {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ============================
   Footer
   ============================ */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================
   Dark Mode Toggle
   ============================ */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
}

/* ============================
   Responsive Styles
   ============================ */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .pricing-card {
        margin-bottom: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast-item {
        min-width: auto;
        max-width: none;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* ============================
   Animations
   ============================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================
   Full Height WhatsApp-Style Chat
   ============================ */
.chat-full-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* TOP: Fixed Header */
.chat-header-fixed {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    flex-shrink: 0;
}

.chat-header-fixed .btn-light {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chat-header-content h6 {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
}

.chat-header-content small {
    color: rgba(255,255,255,0.8);
}

.chat-header-content .badge {
    font-size: 0.65rem;
    vertical-align: middle;
}

/* CENTER: Scrollable Messages */
.chat-messages-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-msg {
    max-width: 75%;
    word-wrap: break-word;
}

.msg-right {
    align-self: flex-end;
}

.msg-left {
    align-self: flex-start;
}

.chat-bubble {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.msg-left .chat-bubble {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.msg-right .chat-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-attachments {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.msg-right .chat-attachments {
    border-top-color: rgba(255,255,255,0.3);
}

.chat-attachment {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    margin-right: 0.25rem;
    text-decoration: none;
}

.msg-right .chat-attachment {
    background: rgba(255,255,255,0.2);
    color: white;
}

.chat-time {
    display: block;
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 0.3rem;
    text-align: right;
}

/* BOTTOM: Fixed Input */
.chat-input-fixed {
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.chat-attach-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.chat-attach-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.chat-input-field {
    flex: 1;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

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

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.chat-send-btn:hover {
    background: var(--primary-light);
}

.chat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message-time {
    font-size: 0.6rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-align: right;
}

.chat-input-area {
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input-form {
    margin: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    border-radius: 20px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.btn-attach {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================
   Vertical Pricing Cards
   ============================ */
.pricing-vertical-section {
    padding: 5rem 0;
}

.pricing-vertical-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pricing-vertical-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-vertical-card.popular {
    border-color: var(--secondary);
}

.pricing-vertical-card.current-plan {
    border-color: var(--primary);
    background: var(--bg-tertiary);
}

.pricing-vertical-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pricing-vertical-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.pricing-vertical-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pricing-vertical-pricing {
    text-align: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.pricing-vertical-features {
    flex: 1;
    margin-bottom: 1rem;
}

.pricing-vertical-features ul {
    padding: 0;
    margin: 0;
}

.pricing-vertical-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.pricing-vertical-features li:last-child {
    border-bottom: none;
}

.pricing-vertical-footer {
    padding-top: 1rem;
}

/* ============================
   Pricing Plan Row (Vertical Column)
   ============================ */
.pricing-plan-row {
    display: flex;
    align-items: stretch;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    transition: var(--transition);
    overflow: hidden;
}

.pricing-plan-row:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.pricing-plan-row.current-plan {
    border-color: var(--primary);
    background: var(--bg-tertiary);
}

.pricing-plan-main {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.pricing-plan-header {
    flex: 1;
    min-width: 150px;
}

.pricing-plan-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.pricing-plan-price {
    min-width: 120px;
    text-align: center;
}

.pricing-plan-price .price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-plan-price .price-period {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pricing-plan-credits {
    min-width: 300px;
    flex: 1;
}

.credit-mini {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
}

.credit-mini i {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.credit-mini strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
}

.credit-mini small {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.pricing-plan-features {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.pricing-plan-action {
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-left: 1px solid var(--border-color);
}

.pricing-plan-action .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .pricing-plan-row {
        flex-direction: column;
    }
    
    .pricing-plan-main {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pricing-plan-action {
        border-left: none;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }
}

/* ============================
   Help Page Styles
   ============================ */
.category-card {
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.popular-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.popular-link:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

.article-card {
    transition: var(--transition);
}

.article-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}


.col-12.col-lg-8{
    width: 100%;
}


#themeToggle{
    display: none;
}


main.terms-container, main.privacy-container{
    padding: 35px;
}




/* // */
/* ============================
   Most Popular Plan – Red Theme
   ============================ */

/* ---- Badge ---- */
.bg-popular {
    background: linear-gradient(135deg, #f8485e, #DC3545); /* vibrant red gradient */
    color: #fff;
    font-weight: 600;
    padding: 0.35em 0.75em;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.plan-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* ---- Vertical Pricing Row (loadPlans) ---- */
.pricing-plan-row.popular-plan {
    border: 2px solid #DC3545;
    background: linear-gradient(105deg, var(--card-bg) 0%, #fdf2f3 100%); /* very light pink tint */
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
    animation: popularPulseRed 2.5s infinite;
    position: relative;
    overflow: hidden;
}

/* Shimmer overlay remains the same (white sweep) */
.pricing-plan-row.popular-plan::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%,
        transparent 100%
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
}

/* Entrance animation */
.pricing-plan-row.animated-popular {
    animation: popularPulseRed 2.5s infinite, popIn 0.6s ease-out;
}

/* ---- Card Layout (loadSubscriptions) ---- */
.pricing-card.popular-plan {
    border: 2px solid #DC3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
    animation: popularPulseRed 2.5s infinite;
    position: relative;
    overflow: hidden;
    background: linear-gradient(105deg, var(--card-bg) 0%, #fdf2f3 100%);
}

.pricing-card.popular-plan::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        115deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%,
        transparent 100%
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
    z-index: 0;
}

.pricing-card.popular-plan > .card-body {
    position: relative;
    z-index: 1;
}

.pricing-card.animated-popular {
    animation: popularPulseRed 2.5s infinite, popIn 0.6s ease-out;
}

/* ---- Dark mode overrides ---- */
[data-theme="dark"] .pricing-plan-row.popular-plan,
[data-theme="dark"] .pricing-card.popular-plan {
    background: linear-gradient(105deg, var(--card-bg) 0%, #2b1e20 100%); /* dark red‑tinted */
    border-color: #DC3545;
}

/* ---- Keyframes (add if not already present) ---- */
@keyframes popularPulseRed {
    0% {
        box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.7), 0 0 30px rgba(220, 53, 69, 0.3);
    }
    100% {
        box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
    }
}

@keyframes shimmer {
    0% {
        transform: translate(-100%, -100%) rotate(45deg);
    }
    100% {
        transform: translate(100%, 100%) rotate(45deg);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}