/*
Theme Name: AuraAI Theme
Theme URI: https://auratools.com/
Author: AuraAI Hub
Author URI: https://auratools.com/
Description: A premium, ultra-fast, and responsive dark-themed WordPress theme designed for hosting AI and utility tools. Fully optimized for Google AdSense and high-frequency ad views.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: aura-ai-theme
*/

/* ----------------------------------------------------
   1. Typography & Import
   ---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ----------------------------------------------------
   2. Design Tokens & CSS Variables
   ---------------------------------------------------- */
:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(22, 31, 48, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Neon Accents per Category */
    --clr-image: #a855f7;
    --clr-video: #06b6d4;
    --clr-audio: #10b981;
    --clr-creator: #f97316;
    --clr-free: #ec4899;
    --clr-writer: #3b82f6;
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glow-strength: 0 0 20px;
}

body.light-mode, html.light-mode {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

/* Light mode structural overrides */
body.light-mode .sidebar, html.light-mode .sidebar {
    background-color: rgba(255, 255, 255, 0.95);
    border-left: 1px solid var(--border-color);
}
body.light-mode .logo-text, html.light-mode .logo-text {
    background: linear-gradient(to left, #0f172a, #475569) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
body.light-mode .search-input, html.light-mode .search-input {
    background-color: rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
}
body.light-mode .nav-item:hover, html.light-mode .nav-item:hover {
    background-color: rgba(15, 23, 42, 0.03);
}
body.light-mode .nav-item.active, html.light-mode .nav-item.active {
    background-color: rgba(15, 23, 42, 0.05);
}
body.light-mode .form-input, html.light-mode .form-input {
    background: rgba(15, 23, 42, 0.03);
    color: var(--text-primary);
}
body.light-mode .dropzone-container, html.light-mode .dropzone-container {
    background: rgba(15, 23, 42, 0.02);
}
body.light-mode .dropzone-container:hover, html.light-mode .dropzone-container:hover {
    background: rgba(168, 85, 247, 0.04);
}
body.light-mode .btn-back, html.light-mode .btn-back {
    background: rgba(15, 23, 42, 0.03);
}
body.light-mode .btn-back:hover, html.light-mode .btn-back:hover {
    background: rgba(15, 23, 42, 0.06);
}
body.light-mode .form-panel, html.light-mode .form-panel {
    box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.04);
}
body.light-mode .header-ad-wrapper, html.light-mode .header-ad-wrapper {
    background: rgba(15, 23, 42, 0.01);
}
body.light-mode .app-container, html.light-mode .app-container {
    background-color: var(--bg-main);
}

/* Sidebar Actions (Theme/Lang Toggles) */
.sidebar-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.action-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

body.light-mode .action-toggle-btn {
    background: rgba(15, 23, 42, 0.03);
}

.action-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .action-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.06);
}

/* ----------------------------------------------------
   3. Base Reset & Structure
   ---------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-ar);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl; /* Arabic by default, layout supports LTR logic */
}

/* LTR compatibility helper */
.ltr-text {
    direction: ltr;
    font-family: var(--font-en);
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}
html.light-mode ::-webkit-scrollbar-thumb, body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
}
html.light-mode ::-webkit-scrollbar-thumb:hover, body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.3);
}

/* ----------------------------------------------------
   4. App Shell Layout (Sidebar & Main Workspace)
   ---------------------------------------------------- */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: rgba(15, 23, 42, 0.95);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--clr-writer), var(--clr-image));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.logo-text {
    font-family: var(--font-en);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to left, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 40px 12px 16px;
    font-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--clr-writer);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
    background-color: rgba(255, 255, 255, 0.08);
}

.search-wrapper i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

/* Category Navigation */
.categories-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex-grow: 1;
    padding-left: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.nav-item::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.6;
}

.nav-item[data-cat="image"] { color: var(--clr-image); }
.nav-item[data-cat="video"] { color: var(--clr-video); }
.nav-item[data-cat="audio"] { color: var(--clr-audio); }
.nav-item[data-cat="creator"] { color: var(--clr-creator); }
.nav-item[data-cat="free"] { color: var(--clr-free); }
.nav-item[data-cat="writer"] { color: var(--clr-writer); }
.nav-item[data-cat="all"] { color: var(--text-primary); }

.sidebar-ad-slot {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* Main Workspace Content Area */
.main-content {
    margin-right: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    transition: var(--transition);
}

/* Header Banner Ad */
.header-ad-wrapper {
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    min-height: 90px;
    overflow: hidden;
}

/* ----------------------------------------------------
   5. Tools Grid & Cards
   ---------------------------------------------------- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    width: 100%;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-6px);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Dynamic glow effect borders */
.tool-card[data-cat="image"]:hover { border-color: var(--clr-image); box-shadow: 0 0 15px rgba(168, 85, 247, 0.15); }
.tool-card[data-cat="video"]:hover { border-color: var(--clr-video); box-shadow: 0 0 15px rgba(6, 182, 212, 0.15); }
.tool-card[data-cat="audio"]:hover { border-color: var(--clr-audio); box-shadow: 0 0 15px rgba(16, 185, 129, 0.15); }
.tool-card[data-cat="creator"]:hover { border-color: var(--clr-creator); box-shadow: 0 0 15px rgba(249, 115, 22, 0.15); }
.tool-card[data-cat="free"]:hover { border-color: var(--clr-free); box-shadow: 0 0 15px rgba(236, 72, 153, 0.15); }
.tool-card[data-cat="writer"]:hover { border-color: var(--clr-writer); box-shadow: 0 0 15px rgba(59, 130, 246, 0.15); }

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: var(--transition);
}

.tool-card[data-cat="image"] .tool-card-icon { background: rgba(168, 85, 247, 0.1); color: var(--clr-image); }
.tool-card[data-cat="video"] .tool-card-icon { background: rgba(6, 182, 212, 0.1); color: var(--clr-video); }
.tool-card[data-cat="audio"] .tool-card-icon { background: rgba(16, 185, 129, 0.1); color: var(--clr-audio); }
.tool-card[data-cat="creator"] .tool-card-icon { background: rgba(249, 115, 22, 0.1); color: var(--clr-creator); }
.tool-card[data-cat="free"] .tool-card-icon { background: rgba(236, 72, 153, 0.1); color: var(--clr-free); }
.tool-card[data-cat="writer"] .tool-card-icon { background: rgba(59, 130, 246, 0.1); color: var(--clr-writer); }

.tool-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.tool-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

/* Badge for coming soon */
.badge-coming-soon {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ----------------------------------------------------
   6. Tool Workspace Page (Dynamic Panel)
   ---------------------------------------------------- */
.workspace-wrapper {
    display: none; /* Initially hidden */
    animation: fadeIn 0.4s ease;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

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

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.workspace-title-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.workspace-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.workspace-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.workspace-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Two Column Form Workspace Layout */
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Form Container elements */
.form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--clr-writer);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* Custom Dropzone File Upload */
.dropzone-container {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.3);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dropzone-container:hover {
    border-color: var(--clr-image);
    background: rgba(168, 85, 247, 0.02);
}

.dropzone-icon {
    font-size: 32px;
    color: var(--text-muted);
}

.file-preview {
    display: none;
    width: 100%;
    margin-top: 15px;
    border-radius: 8px;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid var(--border-color);
}

/* Button UI styling */
.btn-primary {
    background: linear-gradient(135deg, var(--clr-writer), #2563eb);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* ----------------------------------------------------
   7. Loading Screen (The Ad Integration)
   ---------------------------------------------------- */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid var(--clr-writer);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-title {
    font-size: 20px;
    font-weight: 700;
}

.loading-bar-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.loading-bar-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--clr-writer), var(--clr-image));
    border-radius: 10px;
    transition: width 0.1s linear;
}

.loading-ad-box {
    width: 100%;
    min-height: 250px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    overflow: hidden;
}

/* ----------------------------------------------------
   8. Blog & Article Elements (SEO AdSense)
   ---------------------------------------------------- */
.blog-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
    margin-top: 40px;
}

.blog-title {
    font-size: 26px;
    font-weight: 800;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.blog-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.blog-card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Single Post page styling */
.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
}

.post-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.post-featured-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 40px;
}

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: #e2e8f0;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 40px 0 20px 0;
    color: var(--text-primary);
}

.post-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 30px 0 15px 0;
    color: var(--text-primary);
}

.post-content a {
    color: var(--clr-writer);
    text-decoration: underline;
}

/* ----------------------------------------------------
   9. Float Bottom Ad Bar (Mobile Friendly)
   ---------------------------------------------------- */
.float-ad-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(10px);
}

.btn-close-ad {
    position: absolute;
    top: -15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ----------------------------------------------------
   10. Keyframe Animations
   ---------------------------------------------------- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* ----------------------------------------------------
   11. Responsive Styles & Breakpoints
   ---------------------------------------------------- */
@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }
    
    .categories-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        height: auto;
        flex-grow: 0;
    }
    
    .nav-item {
        white-space: nowrap;
    }
    
    .main-content {
        margin-right: 0;
        width: 100%;
        padding: 20px;
    }
    
    .post-title {
        font-size: 26px;
    }
}

/* ----------------------------------------------------
   12. Premium Features: Favorites, Chatbot, Locker
   ---------------------------------------------------- */

/* Star Icons on Cards */
.tool-card-star {
    position: absolute;
    top: 14px;
    left: 14px;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}
.tool-card-star:hover {
    color: #eab308;
    transform: scale(1.2);
}
.tool-card-star.active {
    color: #eab308;
}

/* Favorites Grid Section */
.fav-section {
    margin-bottom: 40px;
    animation: fadeIn 0.4s ease;
}
.fav-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Floating AI Chatbot Widget */
.aura-chatbot-widget {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1000;
    font-family: var(--font-ar);
}
.chatbot-trigger {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--clr-writer), var(--clr-image));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: var(--transition);
}
.chatbot-trigger:hover {
    transform: scale(1.08) rotate(5deg);
}
.chatbot-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 330px;
    height: 450px;
    background: rgba(22, 31, 48, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    animation: fadeIn 0.3s ease;
}
body.light-mode .chatbot-panel {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}
.chatbot-header {
    padding: 15px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.chat-message.bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
body.light-mode .chat-message.bot {
    background: rgba(15, 23, 42, 0.04);
}
.chat-message.user {
    background: var(--clr-writer);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chatbot-input-area {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    background: rgba(15, 23, 42, 0.2);
}
body.light-mode .chatbot-input-area {
    background: rgba(255, 255, 255, 0.5);
}
.chatbot-input-area input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
}
body.light-mode .chatbot-input-area input {
    background: rgba(15, 23, 42, 0.03);
}
.chatbot-input-area button {
    background: var(--clr-writer);
    color: white;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.chatbot-input-area button:hover {
    background: #1d4ed8;
}

/* Adsterra Direct Link Locker Modal */
.locker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--font-ar);
}
body.light-mode .locker-overlay {
    background: rgba(248, 250, 252, 0.85);
}
.locker-content {
    background: rgba(22, 31, 48, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}
body.light-mode .locker-content {
    background: white;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}
.locker-icon {
    width: 64px;
    height: 64px;
    color: var(--clr-creator);
}
.locker-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}
.locker-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}
.locker-counter-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.locker-counter {
    font-size: 56px;
    font-weight: 900;
    color: var(--clr-writer);
    line-height: 1;
}
.locker-ad-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--clr-creator), #f97316);
    color: white !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    transition: var(--transition);
}
.locker-ad-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

@keyframes bounce {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1.2); }
}
