/* Base Styles and Variables - Enhanced */
:root {
    /* Modern Vibrant Palette - Refined Lime Green Theme */
    --gradient-primary: linear-gradient(135deg, #26ff00, #83ff00);
    --gradient-secondary: linear-gradient(135deg, #043c00, #0e6800);
    --gradient-accent: linear-gradient(135deg, #2bb800, #208c0a);
    --gradient-dark: linear-gradient(135deg, #0a2200, #153a00);
    
    /* Base Colors - Refined Lime Green Theme */
    --primary-color: #26ff00;
    --primary-light: #83ff00;
    --primary-dark: #1dbd00;
    --accent-color: #00f721;
    --accent-light: #00e01e;
    --accent-dark: #1a8000;
    --text-color: #0a2200;
    --text-light: #2e4d1f;
    --bg-color: #f9fff5;
    --card-bg: #ffffff;
    --border-color: #d2f0c7;
    
    /* Shadows & Effects - Enhanced */
    --shadow-sm: 0 2px 10px rgba(10, 34, 0, 0.06);
    --shadow: 0 5px 15px rgba(10, 34, 0, 0.08);
    --shadow-lg: 0 10px 25px rgba(10, 34, 0, 0.1);
    --glow: 0 0 20px rgba(38, 255, 0, 0.4);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 0;
    --radius-sm: 0;
    --radius-lg: 0;
    
    /* Typography - Enhanced */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Poppins', sans-serif;
    --font-arabic: 'Amiri', serif;
    --font-bengali: 'Hind Siliguri', sans-serif;
}

/* Dark Theme Variables - Enhanced */
[data-theme="dark"] {
    /* Modern Dark Theme Gradients */
    --gradient-primary: linear-gradient(135deg, #26ff00, #83ff00);
    --gradient-secondary: linear-gradient(135deg, #0a2200, #153a00);
    --gradient-accent: linear-gradient(135deg, #00b800, #158000);
    --gradient-dark: linear-gradient(135deg, #051200, #0a2200);
    
    /* Base Colors - Enhanced for Dark Mode */
    --primary-color: #26ff00;
    --primary-light: #83ff00;
    --primary-dark: #1dbd00;
    --accent-color: #00b800;
    --accent-light: #00e01e;
    --accent-dark: #008000;
    --text-color: #e8ffe0;
    --text-light: #bce9aa;
    --bg-color: #051200;
    --card-bg: #0a2200;
    --border-color: #1f3d13;
    
    /* Shadows & Effects - Enhanced for Dark Mode */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.2);
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(38, 255, 0, 0.5);
}

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

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: none;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
    background: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Hero Section Styles - Enhanced with Glassmorphism */
.hero-section {
    background: white;
    margin: 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    padding: 3.5rem 2.5rem;
    box-shadow: none;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 380px;
    z-index: 1;
    border: none;
    outline: none;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/random/1600x900/?pattern,minimal,light') center/cover no-repeat;
    opacity: 0.03;
    z-index: -1;
    filter: saturate(0.9) brightness(1.05) contrast(1.02);
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.01), transparent);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.hero-logo i {
    font-size: 3.5rem;
    color: var(--primary-dark);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: floatUpDown 4s infinite ease-in-out;
}

.logo-text {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 3.2rem;
    letter-spacing: -0.5px;
    color: var(--text-color);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.primary-text {
    color: var(--primary-dark);
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 3rem;
    max-width: 700px;
    opacity: 0.9;
    line-height: 1.6;
    animation: fadeIn 1s ease-out;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    text-align: center;
}

/* Hero Controls Styles - Updated Layout */
.hero-controls {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    width: 100%;
    max-width: 650px;
    animation: slideInUp 0.8s ease-out forwards;
    align-items: center;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}

.hero-decoration {
    display: none;
}

.decoration-circle {
    position: absolute;
    top: -15%;
    right: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    z-index: 1;
    animation: float 10s infinite ease-in-out;
}

.decoration-pattern {
    position: absolute;
    bottom: -10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 3px, transparent 3px);
    background-size: 30px 30px;
    z-index: 0;
    transform: rotate(15deg);
    animation: spin 120s linear infinite;
}

/* Search Container Styles - Updated for white background */
.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    outline: none;
}

#search-input::placeholder {
    color: rgba(10, 34, 0, 0.5);
    font-weight: 400;
}

#search-input:focus {
    outline: none;
    background-color: rgba(235, 235, 235, 0.8);
    box-shadow: 0 0 0 3px rgba(38, 255, 0, 0.2), var(--shadow);
    transform: rotateX(2deg);
}

.search-btn {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary-dark);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.4rem 0.6rem;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    color: var(--primary-color);
}

/* Language Switcher Styles - Updated for white background */
.language-switcher {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.lang-btn {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.lang-btn:hover:not(.active) {
    background-color: rgba(38, 255, 0, 0.15);
    transform: translateY(-2px);
}

/* Theme Toggle Styles - Floating Design */
.theme-toggle {
    display: none;
}

/* Main Content Styles - Enhanced */
.main-content {
    display: flex;
    flex: 1;
    padding: 0;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Topics Container Styles - Enhanced */
.topics-container {
    flex: 1;
    position: relative;
    padding: 0 1rem;
}

/* Topics Header - Clean Heading Style */
.topics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.2rem;
    position: relative;
    padding-bottom: 1.2rem;
}

.topics-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 150px;
    height: 2px;
    background: var(--gradient-primary);
    box-shadow: 0 0 15px rgba(38, 255, 0, 0.6);
    animation: pulse 3s infinite ease-in-out;
}

/* Enhanced Topics Title Container - Clean Heading Style */
.topics-title-container {
    position: relative;
    z-index: 1;
    margin-bottom: 0.4rem;
}

.topics-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
    position: relative;
    font-family: var(--font-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.topics-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(38, 255, 0, 0.8);
    animation: pulse 3s infinite ease-in-out;
}

/* Hide the subtitle element since we're not using it */
.topics-subtitle {
    display: none;
}

.topics-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.topics-stats {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.topics-stats:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.topic-count {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
}

.topic-count i {
    color: #26ff00;
    font-size: 0.9rem;
}

.topic-card:hover .topic-count {
    transform: scale(1.05);
    background: rgba(38, 255, 0, 0.2);
}

.topics-filter select {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 .708-.708L8 11.293z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

.topics-filter select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.topics-filter select:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Featured Topic - Enhanced with Immersive Design */
.featured-topic {
    background: #006400;  /* Darker solid green for better contrast */
    border-radius: 8px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease forwards;
    min-height: 320px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(38, 255, 0, 0.2);
    clip-path: polygon(0 0, 100% 0, 100% 94%, 98% 100%, 0 100%);
}

.featured-topic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/random/1200x600/?nature,pattern,minimal') center/cover no-repeat;
    opacity: 0.05;
    mix-blend-mode: soft-light;
    z-index: 1;
    animation: subtle-zoom 30s infinite alternate;
    filter: saturate(1.1) contrast(1.1);
}

.featured-topic::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(38, 255, 0, 0.15), transparent 70%);
    z-index: 1;
}

.featured-topic-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    max-width: 95%;
    animation: slideInRight 0.8s ease-out;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.featured-tag {
    display: inline-block;
    background: #26ff00;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: #000;
    position: relative;
    width: fit-content;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    font-family: var(--font-primary);
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
    max-width: 100%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding-left: 1rem;
    margin: 0.5rem 0;
    border-left: 4px solid #26ff00;
}

.featured-description {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    max-width: 95%;
    font-weight: 400;
    z-index: 2;
    padding-left: 1rem;
    margin: 0.75rem 0 1.5rem 0;
}

.featured-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    position: relative;
}

.featured-topic .topic-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    padding-left: 1rem;
}

.featured-topic .topic-count i {
    color: #26ff00;
    margin-right: 0.4rem;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    background-color: #26ff00;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 3;
}

.featured-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: white;
    transition: width 0.3s ease;
    z-index: -1;
}

.featured-link i {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 0.9rem;
    color: white;
    position: relative;
}

.featured-link:hover {
    color: #006400;
}

.featured-link:hover::before {
    width: 100%;
}

.featured-link:hover i {
    transform: translateX(3px);
    color: #006400;
}

.featured-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.featured-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(38, 255, 0, 0.15);
    filter: blur(3px);
    animation: shapeFloat 15s infinite ease-in-out;
}

.featured-shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 10%;
}

.featured-shape-2 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 20%;
    opacity: 0.1;
    animation-delay: 3s;
}

.featured-shape-3 {
    width: 50px;
    height: 50px;
    top: 40%;
    right: 30%;
    opacity: 0.2;
    animation-delay: 6s;
}

.featured-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    opacity: 0.2;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    z-index: 1;
}

/* Topic Content Structure */
.topic-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 2;
    padding: 0.5rem;
    position: relative;
}

/* Topic Cards with Green Border */
.topic-card {
    position: relative;
    border: 2px solid #26ff00;
    border-radius: 8px;
    overflow: hidden;
    padding: 1.75rem 1.25rem;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(10, 34, 0, 0.08);
    z-index: 1;
    min-height: 320px;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(10, 34, 0, 0.15);
    border-color: #26ff00;
    border-width: 2px;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #26ff00;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.topic-card:hover::before {
    transform: scaleX(1);
}

/* Topic Title Styling */
.topic-title {
    color: #006400;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    font-family: var(--font-primary);
    letter-spacing: -0.01em;
    padding-left: 0.75rem;
    border-left: 3px solid #26ff00;
    margin-top: 2.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.topic-card:hover .topic-title {
    transform: translateX(5px);
    color: #006400;
}

.topic-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40%;
    height: 2px;
    background: #26ff00;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.topic-card:hover .topic-title::after {
    width: 100%;
}

/* Enhanced Description Styling */
.topic-description {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1.25rem auto;
    opacity: 0.85;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    padding: 0 0.5rem;
    text-align: center;
    max-width: 90%;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.topic-card:hover .topic-description {
    color: #333;
    opacity: 1;
}

/* Category Tag Enhancement */
.topic-category,
[data-category="knowledge"],
.KNOWLEDGE,
.knowledge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    background-color: #26ff00;
    color: #006400;
    transition: all 0.3s ease;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.topic-card:hover .topic-category {
    background-color: white;
    color: #006400;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    border: 1px solid #26ff00;
}

/* Topics Grid Styles */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Floating dots decoration */
.floating-dots {
    display: none;
}

/* New decorative element for cards */
.topic-grid {
    perspective: 1000px;
}

/* Card positioning for floating effect */
.topics-grid .topic-card {
    position: relative;
}

.topics-grid .topic-card::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 10px;
    width: calc(100% - 20px);
    height: 10px;
    background: var(--primary-color);
    filter: blur(10px);
    opacity: 0.5;
    z-index: -1;
    transition: all 0.4s ease;
}

/* Add floating dots decoration */
@keyframes floatDots {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.floating-dots {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
    transition: all 0.4s ease;
}

.floating-dots::before,
.floating-dots::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    animation: floatDots 5s infinite ease-in-out;
}

.floating-dots::before {
    width: 15px;
    height: 15px;
    top: 0;
    left: 0;
    animation-delay: 0.2s;
}

.floating-dots::after {
    width: 10px;
    height: 10px;
    top: 20px;
    left: 22px;
}

.topic-card:hover .floating-dots {
    opacity: 0.9;
    transform: scale(1.2) translateX(10px);
}

/* Modify the existing animations for better card interactions */
@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotateX(0) rotateZ(0); }
    50% { transform: translateY(-15px) rotateX(5deg) rotateZ(1deg); }
}

/* Staggered animation delays */
.topic-card:nth-child(1) { animation-delay: 0.1s; }
.topic-card:nth-child(2) { animation-delay: 0.2s; }
.topic-card:nth-child(3) { animation-delay: 0.3s; }
.topic-card:nth-child(4) { animation-delay: 0.4s; }
.topic-card:nth-child(5) { animation-delay: 0.5s; }
.topic-card:nth-child(6) { animation-delay: 0.6s; }

/* RTL Support */
[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .sidebar-title::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .category-item::before {
    left: auto;
    right: -10px;
}

[dir="rtl"] .category-item:hover {
    padding-left: 1rem;
    padding-right: 1.5rem;
}

[dir="rtl"] .topics-title::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .search-btn {
    left: auto;
    right: 1rem;
}

[dir="rtl"] #search-input {
    padding: 0.8rem 3rem 0.8rem 1rem;
}

[dir="rtl"] .topic-description {
    font-family: var(--font-arabic);
}

/* Bengali Language Specific Styles */
html[lang="bn"] body,
html[lang="bn"] .topic-description,
html[lang="bn"] .topic-title,
html[lang="bn"] .sidebar-title,
html[lang="bn"] .topics-title,
html[lang="bn"] .topics-subtitle,
html[lang="bn"] .featured-title,
html[lang="bn"] .featured-description {
    font-family: var(--font-bengali);
}

/* Responsive Adjustments - Enhanced */
@media (max-width: 1200px) {
    .hero-section {
        padding: 3.5rem 2.5rem;
    }
    
    .hero-content {
        max-width: 700px;
    }
    
    .hero-decoration {
        opacity: 0.5;
    }
    
    .featured-topic-content {
        max-width: 80%;
    }
}

@media (max-width: 1024px) {
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .hero-section {
        padding: 3rem 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .featured-topic-content {
        max-width: 90%;
        padding: 2.5rem;
    }
    
    .featured-title {
        font-size: 2.2rem;
    }
    
    .featured-description {
        font-size: 1.1rem;
    }
    
    .featured-topic::after {
        width: 30%;
    }
}

@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.2rem;
    }
    
    .app-container {
        padding: 0 0.5rem;
    }
    
    .hero-section {
        padding: 2.5rem 1.5rem;
        min-height: auto;
        margin: 1rem 0.5rem 2rem;
    }
    
    .hero-logo {
        margin-bottom: 1.5rem;
    }
    
    .hero-logo i {
        font-size: 2.8rem;
    }
    
    .logo-text {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2rem;
    }
    
    .hero-controls {
        gap: 1.5rem;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    #search-input {
        padding: 1.2rem 1.6rem 1.2rem 4rem;
        font-size: 1.1rem;
    }
    
    .language-switcher {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    
    .lang-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .topics-header {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .topics-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .topics-title-container {
        width: 100%;
    }
    
    .topics-title {
        font-size: 2.5rem;
    }
    
    .topics-subtitle {
        font-size: 1.1rem;
    }
    
    .featured-topic {
        min-height: auto;
    }
    
    .featured-topic-content {
        max-width: 100%;
        padding: 2rem;
    }
    
    .featured-tag {
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .featured-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .featured-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .featured-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .pagination {
        margin-top: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .topic-card:hover {
        transform: translateY(-5px) rotateX(0);
    }
    
    .scroll-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        padding: 2rem 1.2rem;
    }
    
    .hero-logo i {
        font-size: 2.5rem;
    }
    
    .logo-text {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .language-switcher {
        width: 100%;
        justify-content: space-between;
    }
    
    .lang-btn {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    
    .topics-filter select,
    .topics-stats {
        padding: 0.7rem 1.2rem;
    }
    
    .topics-filter {
        flex: 1;
    }
    
    .topics-filter select {
        width: 100%;
    }
    
    .featured-title {
        font-size: 1.6rem;
    }
    
    .topic-card {
        transform: none !important;
        border-top: 2px solid var(--primary-color);
    }
    
    .topic-card:hover {
        transform: none !important;
        box-shadow: var(--shadow);
    }
    
    .topic-card:hover .topic-title,
    .topic-card:hover .topic-description {
        transform: none;
    }
    
    .topic-card:hover .floating-dots::before,
    .topic-card:hover .floating-dots::after {
        transform: none;
    }
    
    .topic-card:hover .topic-category {
        transform: none;
        background: var(--primary-color);
    }
    
    .page-number, 
    .pagination-btn {
        width: 40px;
        height: 40px;
    }
} 

/* Animations - Add new neon glow effect */
@keyframes neonGlow {
    0% { box-shadow: 0 0 10px rgba(38, 255, 0, 0.5), 0 0 20px rgba(38, 255, 0, 0.3), 0 0 30px rgba(38, 255, 0, 0.1); }
    50% { box-shadow: 0 0 15px rgba(38, 255, 0, 0.7), 0 0 30px rgba(38, 255, 0, 0.5), 0 0 40px rgba(38, 255, 0, 0.3); }
    100% { box-shadow: 0 0 10px rgba(38, 255, 0, 0.5), 0 0 20px rgba(38, 255, 0, 0.3), 0 0 30px rgba(38, 255, 0, 0.1); }
}

@keyframes floatUpDown {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* Apply subtle neon effect to text */
@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(38, 255, 0, 0.5), 0 0 10px rgba(38, 255, 0, 0.3); }
    50% { text-shadow: 0 0 10px rgba(38, 255, 0, 0.7), 0 0 15px rgba(38, 255, 0, 0.5); }
    100% { text-shadow: 0 0 5px rgba(38, 255, 0, 0.5), 0 0 10px rgba(38, 255, 0, 0.3); }
}

/* Apply animations to elements - Remove hero section animation */
.hero-section {
    animation: none;
}

.scroll-top.visible {
    animation: neonGlow 3s infinite ease-in-out;
}

.featured-topic {
    animation: fadeIn 0.8s ease forwards;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(38, 255, 0, 0.3);
}

.topics-title-container {
    position: relative;
}

.topics-title-container::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px rgba(38, 255, 0, 0.8);
}

.topics-title {
    animation: textGlow 4s infinite ease-in-out;
    color: var(--text-color);
}

/* Add floating geometric decorations */
.hero-section .geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(5px);
    animation: shapeFloat 15s infinite ease-in-out;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    right: 20%;
    opacity: 0.08;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 30%;
    opacity: 0.12;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    top: 10%;
    right: 30%;
    opacity: 0.1;
    animation-delay: 6s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    bottom: 20%;
    left: 10%;
    opacity: 0.2;
    animation-delay: 8s;
}

.shape-line {
    position: absolute;
    height: 3px;
    background: var(--primary-color);
    opacity: 0.2;
    transform-origin: left center;
}

.shape-line-1 {
    width: 200px;
    top: 20%;
    left: 10%;
    transform: rotate(45deg);
    animation: lineGrow 15s infinite ease-in-out;
}

.shape-line-2 {
    width: 150px;
    bottom: 30%;
    right: 15%;
    transform: rotate(-30deg);
    animation: lineGrow 12s infinite ease-in-out reverse;
}

@keyframes shapeFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes lineGrow {
    0%, 100% { transform: scaleX(0.7) rotate(45deg); opacity: 0.1; }
    50% { transform: scaleX(1.2) rotate(45deg); opacity: 0.2; }
}

/* Pagination Styles - Enhanced */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
}

.pagination-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 2.8rem;
    height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: var(--text-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.pagination-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.page-numbers {
    display: flex;
    gap: 0.75rem;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.page-number:hover:not(.active) {
    background-color: rgba(38, 255, 0, 0.1);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.page-number.active {
    background-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: var(--shadow);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scroll to Top Button - Enhanced Floating Design */
.scroll-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(38, 255, 0, 0.4);
    z-index: 99;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    font-size: 1.2rem;
    backdrop-filter: blur(5px);
    font-weight: 600;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    animation: pulse 2s infinite ease-in-out;
}

.scroll-top:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(38, 255, 0, 0.5);
    background: white;
}

.scroll-top:hover i {
    animation: floatUpDown 1s infinite ease-in-out;
    color: var(--text-color);
}

.scroll-tooltip {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-dark);
    color: white;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.scroll-top:hover .scroll-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -30px;
}

/* No Results Message - Enhanced */
.no-results {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-light);
    width: 100%;
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.no-results i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    color: var(--primary-color);
    animation: pulse 3s infinite ease-in-out, neonGlow 3s infinite ease-in-out;
}

.no-results p {
    font-size: 1.3rem;
    max-width: 80%;
    margin: 0 auto;
    line-height: 1.6;
}

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

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes subtle-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

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

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Note for JavaScript */
/* 
Note: Add these elements to cards dynamically in JavaScript:
For the card accent corner:
const cardAccent = document.createElement('div');
cardAccent.className = 'card-accent';
topicCard.appendChild(cardAccent);

For the floating dots:
const floatingDots = document.createElement('div');
floatingDots.className = 'floating-dots';
topicCard.appendChild(floatingDots);
*/

/* Category Label Styling */
.topic-category,
[data-category="knowledge"],
.KNOWLEDGE,
.knowledge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    background-color: #26ff00;
    color: #006400;
    transition: all 0.3s ease;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* RTL language support adjustments */
[dir="rtl"] .logo-text::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

[dir="rtl"] .topic-description {
    font-family: var(--font-arabic);
}

/* Remove any potential circular background effects */
body, .app-container, .topic-card, .topics-grid, .topic-content, .card-accent {
    background-image: none !important;
    border-radius: 0 !important;
}

/* Categories Filter Section */
.categories-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.categories-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-color);
}

.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-btn {
    padding: 8px 16px;
    background-color: var(--light-accent-color);
    color: var(--primary-color);
    border: 1px solid var(--primary-color-light);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--primary-color-light);
    color: var(--text-color-inverse);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* RTL support for categories */
[dir="rtl"] .categories-filter {
    justify-content: flex-end;
}

/* Mobile responsiveness for categories */
@media (max-width: 768px) {
    .categories-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Read More Button - Green with icon and text */
.topic-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 4px;
    background-color: #26ff00;
    margin-top: 1rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    z-index: 1;
}

.topic-link::before {
    content: '•';
    color: white;
    position: absolute;
    left: 0.6rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.topic-link i {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 0.85rem;
    color: white;
    margin-left: 0.2rem;
    position: relative;
}

/* Hadith Book Icon - Match Featured Green */
.topic-count i {
    color: #006400;
    font-size: 0.9rem;
}

/* Button Hover Animation */
.topic-link:hover {
    color: #006400;
}

.topic-link:hover::before {
    color: #006400;
}

.topic-link:hover i {
    transform: translateX(3px);
    color: #006400;
}

/* Center the hadiths count */
.topic-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #26ff00;
    position: relative;
}

/* White Background Slide on Hover */
.topic-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: white;
    transition: width 0.3s ease;
    z-index: -1;
}

.topic-link:hover::after {
    width: 100%;
} 