* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Noto Sans', sans-serif;
background: #f8f5f0;
color: #2c3e50;
line-height: 1.6;
min-height: 100vh;
background-image:
radial-gradient(#e8e2d6 1px, transparent 1px),
radial-gradient(#e8e2d6 1px, transparent 1px);
background-size: 40px 40px;
background-position: 0 0, 20px 20px;
}

.container {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
min-height: 100vh;
display: flex;
flex-direction: column;
}

/* Header Styles */
.header {
text-align: center;
padding: 3rem 0 2rem 0;
}

.bismillah {
font-family: 'Scheherazade New', serif;
font-size: 2.2rem;
color: #1a5276;
margin-bottom: 1.2rem;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.title {
font-size: 2.4rem;
font-weight: 400;
color: #2c3e50;
margin-bottom: 0.3rem;
letter-spacing: -0.5px;
line-height: 1.2;
}

.subtitle {
font-size: 1.1rem;
color: #7f8c8d;
font-weight: 400;
line-height: 1.4;
}

/* Search Section */
.search-section {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 2rem 0;
}

.search-container {
width: 100%;
max-width: 600px;
}

.search-box {
position: relative;
margin-bottom: 2rem;
}

.search-box i {
position: absolute;
left: 1.5rem;
top: 50%;
transform: translateY(-50%);
color: #95a5a6;
font-size: 1.2rem;
}

.search-input {
width: 100%;
padding: 1.2rem 1.2rem 1.2rem 3.5rem;
font-size: 1.1rem;
border: 2px solid #d5dbdb;
border-radius: 50px;
background: white;
outline: none;
transition: all 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
border-color: #3498db;
box-shadow: 0 6px 12px rgba(52, 152, 219, 0.15);
}

.search-buttons {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}

.search-btn, .feeling-lucky {
padding: 0.8rem 2rem;
font-size: 1rem;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
}

.search-btn {
background: #2c5aa0;
color: white;
box-shadow: 0 4px 8px rgba(44, 90, 160, 0.2);
}

.search-btn:hover {
background: #1e3a8a;
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(44, 90, 160, 0.3);
}

.feeling-lucky {
background: #27ae60;
color: white;
box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.feeling-lucky:hover {
background: #219653;
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
}

.enhanced-by {
margin-top: 3rem;
text-align: center;
}

.enhanced-by span {
background: #f1f2f6;
padding: 0.5rem 1.5rem;
border-radius: 20px;
color: #5f6368;
font-size: 0.9rem;
border: 1px solid #dfe1e5;
}

/* Footer */
.footer {
text-align: center;
padding: 2rem 0 1rem 0;
color: #7f8c8d;
font-size: 0.9rem;
border-top: 1px solid #e8e2d6;
margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
.container {
padding: 1rem;
}

.title {
font-size: 2.2rem;
}

.bismillah {
font-size: 2rem;
}

.search-buttons {
flex-direction: column;
align-items: center;
}

.search-btn, .feeling-lucky {
width: 100%;
max-width: 300px;
}
}
/* === GOOGLE CSE STYLING === */
.gcse-search {
width: 100%;
max-width: 600px;
margin: 0 auto 2rem auto;
}

/* Google CSE Search Box */
.gsc-control-cse {
background: transparent !important;
border: none !important;
padding: 0 !important;
}

.gsc-input-box {
border: 2px solid #d5dbdb !important;
border-radius: 50px !important;
background: white !important;
padding: 0.5rem 1rem !important;
transition: all 0.3s ease !important;
}

.gsc-input-box:hover,
.gsc-input-box-focus {
border-color: #3498db !important;
box-shadow: 0 6px 12px rgba(52, 152, 219, 0.15) !important;
}

.gsc-input input {
padding: 0.5rem 0 !important;
font-size: 1.1rem !important;
font-family: 'Noto Sans', sans-serif !important;
color: #2c3e50 !important;
background: transparent !important;
}

.gsc-input input::placeholder {
color: #95a5a6 !important;
}

/* Google CSE Results - LIGHT MODE */
.gsc-results {
background: white !important;
border: 1px solid #e2e8f0 !important;
border-radius: 12px !important;
margin-top: 1rem !important;
padding: 1rem !important;
}

.gsc-webResult.gsc-result {
background: white !important;
border-bottom: 1px solid #e2e8f0 !important;
padding: 1rem 0 !important;
}

.gsc-webResult.gsc-result:hover {
background: #f8f9fa !important;
}

.gs-webResult .gs-title,
.gs-webResult .gs-title * {
color: #1a0dab !important;
text-decoration: none !important;
}

.gs-webResult .gs-title:hover,
.gs-webResult .gs-title:hover * {
text-decoration: underline !important;
}

.gs-webResult .gs-snippet {
color: #4a5568 !important;
}

.gs-webResult .gs-visibleUrl {
color: #006621 !important;
}

/* Google CSE Results - DARK MODE */
body.dark-mode .gsc-results {
background: #1f2937 !important;
border-color: #374151 !important;
}

body.dark-mode .gsc-webResult.gsc-result {
background: #1f2937 !important;
border-bottom-color: #374151 !important;
}

body.dark-mode .gsc-webResult.gsc-result:hover {
background: #374151 !important;
}

body.dark-mode .gs-webResult .gs-title,
body.dark-mode .gs-webResult .gs-title * {
color: #60a5fa !important;
}

body.dark-mode .gs-webResult .gs-snippet {
color: #d1d5db !important;
}

body.dark-mode .gs-webResult .gs-visibleUrl {
color: #10b981 !important;
}


.toggle-btn:hover {
border-color: #3498db;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.toggle-btn i {
color: #f39c12;
}

/* Dark Mode Styles */
body.dark-mode {
background: #1a1a1a;
color: #e0e0e0;
background-image:
radial-gradient(#2d3748 1px, transparent 1px),
radial-gradient(#2d3748 1px, transparent 1px);
}

body.dark-mode .header {
color: #e0e0e0;
}

body.dark-mode .bismillah {
color: #60a5fa;
}

body.dark-mode .title {
color: #e0e0e0;
}

body.dark-mode .subtitle {
color: #9ca3af;
}

body.dark-mode .search-input {
background: #2d3748;
border-color: #4b5563;
color: #e0e0e0;
}

body.dark-mode .search-input::placeholder {
color: #9ca3af;
}

body.dark-mode .search-input:focus {
border-color: #60a5fa;
box-shadow: 0 6px 12px rgba(96, 165, 250, 0.15);
}

body.dark-mode .enhanced-by span {
background: #374151;
color: #d1d5db;
border-color: #4b5563;
}

body.dark-mode .footer {
color: #9ca3af;
border-top-color: #374151;
}

body.dark-mode .toggle-btn {
background: rgba(45, 55, 72, 0.9);
border-color: #4b5563;
color: #e0e0e0;
}

/* Dark mode for Google CSE */
body.dark-mode .gsc-input-box {
background: #2d3748 !important;
border-color: #4b5563 !important;
}

body.dark-mode .gsc-input input {
color: #e0e0e0 !important;
background: transparent !important;
}

body.dark-mode .gsc-input input::placeholder {
color: #9ca3af !important;
}

/* Responsive */
@media (max-width: 768px) {
.theme-toggle {
position: static;
margin-top: 1rem;
}

.toggle-btn {
margin: 0 auto;
}
}
/* Nuclear Dark Mode for Google CSE - Forces everything dark */
body.dark-mode .gsc-results,
body.dark-mode .gsc-results *,
body.dark-mode .gsc-table-result,
body.dark-mode .gsc-table-result *,
body.dark-mode .gs-result,
body.dark-mode .gs-result *,
body.dark-mode .gsc-webResult,
body.dark-mode .gsc-webResult * {
background: #1f2937 !important;
color: #e0e0e0 !important;
border: none !important;
box-shadow: none !important;
}

/* Fix the main results container */
body.dark-mode .gsc-results {
background: #1f2937 !important;
border: 1px solid #374151 !important;
border-radius: 12px !important;
padding: 1rem !important;
}

/* Individual result items */
body.dark-mode .gsc-webResult.gsc-result {
background: transparent !important;
border-bottom: 1px solid #374151 !important;
padding: 1rem 0 !important;
margin: 0 !important;
}

body.dark-mode .gsc-webResult.gsc-result:hover {
background: #374151 !important;
border-radius: 8px !important;
padding: 1rem !important;
margin: 0 -1rem !important;
}

/* Remove all inner boxes and borders */
body.dark-mode .gs-result .gs-card,
body.dark-mode .gs-result .gs-card *,
body.dark-mode .gsc-table-cell,
body.dark-mode .gsc-table-cell * {
background: transparent !important;
border: none !important;
box-shadow: none !important;
padding: 0 !important;
margin: 0 !important;
}

/* Title styling */
body.dark-mode .gs-webResult .gs-title,
body.dark-mode .gs-webResult .gs-title *,
body.dark-mode .gs-promotion .gs-title,
body.dark-mode .gs-promotion .gs-title * {
color: #60a5fa !important;
text-decoration: none !important;
font-size: 1.1rem !important;
font-weight: 600 !important;
}

body.dark-mode .gs-webResult .gs-title:hover,
body.dark-mode .gs-webResult .gs-title:hover * {
color: #93c5fd !important;
text-decoration: underline !important;
}

/* Snippet and URL styling */
body.dark-mode .gs-webResult .gs-snippet,
body.dark-mode .gs-fileFormatType,
body.dark-mode .gs-promotion .gs-snippet {
color: #d1d5db !important;
line-height: 1.5 !important;
}

body.dark-mode .gs-webResult .gs-visibleUrl,
body.dark-mode .gs-webResult .gs-visibleUrl * {
color: #10b981 !important;
font-size: 0.9rem !important;
}

/* Dropdown suggestions */
body.dark-mode .gsc-completion-container {
background: #2d3748 !important;
border: 1px solid #4b5563 !important;
border-radius: 8px !important;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .gsc-completion-item {
background: #2d3748 !important;
color: #e0e0e0 !important;
border-bottom: 1px solid #4b5563 !important;
padding: 0.75rem 1rem !important;
}

body.dark-mode .gsc-completion-item:hover,
body.dark-mode .gsc-completion-selected {
background: #3b82f6 !important;
color: #ffffff !important;
}

/* Pagination */
body.dark-mode .gsc-cursor-box {
background: transparent !important;
border-top: 1px solid #374151 !important;
padding-top: 1rem !important;
margin-top: 1rem !important;
}

body.dark-mode .gsc-cursor-page {
background: #374151 !important;
color: #60a5fa !important;
border: 1px solid #4b5563 !important;
border-radius: 6px !important;
padding: 0.5rem 1rem !important;
margin: 0 0.25rem !important;
}

body.dark-mode .gsc-cursor-page:hover {
background: #3b82f6 !important;
color: #ffffff !important;
border-color: #3b82f6 !important;
}

body.dark-mode .gsc-cursor-current-page {
background: #3b82f6 !important;
color: #ffffff !important;
border-color: #3b82f6 !important;
}

/* Search info and tabs */
body.dark-mode .gsc-result-info {
color: #9ca3af !important;
border-bottom: 1px solid #374151 !important;
padding-bottom: 1rem !important;
margin-bottom: 1rem !important;
}

body.dark-mode .gsc-tabsArea {
border-bottom: 1px solid #374151 !important;
margin-bottom: 1rem !important;
}

body.dark-mode .gsc-tabHeader {
color: #9ca3af !important;
background: transparent !important;
border: none !important;
padding: 0.5rem 1rem !important;
}
body.dark-mode .gsc-tabHeader.gsc-tabhActive {
color: #60a5fa !important;
background: transparent !important;
border-bottom: 2px solid #60a5fa !important;
border-radius: 0 !important;
}

/* Remove any remaining white backgrounds and boxes */
body.dark-mode .gsc-expansionArea,
body.dark-mode .gsc-clear-button,
body.dark-mode .gsc-clear-button * {
background: transparent !important;
border: none !important;
}

/* Force remove any inner padding/margin that creates boxes */
body.dark-mode .gs-result .gs-no-results-result,
body.dark-mode .gs-result .gs-error-result {
background: transparent !important;
border: none !important;
padding: 1rem !important;
}
/* Alternative Elegant Arabic Title Styling */
.arabic-title {
font-family: 'Scheherazade New', serif;
font-size: 1.5rem;
color: #1a5276;
margin-bottom: 0.8rem;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
font-weight: 400;
line-height: 1.3;
}
/* Dark Mode Headings */
body.dark-mode .bismillah {
color: #60a5fa !important;
}

body.dark-mode .arabic-title {
color: #60a5fa !important; /* Same color as Bismillah */
}
/* Dark mode for Arabic title */


/* Adjust the main title margin to accommodate the Arabic text */
.title {
font-size: 2.4rem;
font-weight: 400;
color: #2c3e50;
margin-bottom: 0.2rem; /* Reduced from 0.5rem */
letter-spacing: -0.5px;
}

/* Adjust subtitle margin */
.subtitle {
font-size: 1.1rem;
color: #7f8c8d;
font-weight: 400;
margin-bottom: 0; /* Remove bottom margin if needed */
}
/* Sweetness Overhaul - ADJUSTED VERSION */
.header {
text-align: center;
padding: 2rem 0 1.5rem 0; /* Reduced padding to bring everything up */
background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,245,240,0.8) 100%);
backdrop-filter: blur(10px);
border-radius: 20px;
margin: 1rem;
box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.bismillah {
font-family: 'Scheherazade New', serif;
font-size: 1.8rem; /* Smaller - was 2.4rem */
color: #1a5276;
margin-bottom: 0.5rem; /* Tighter spacing */
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
background: linear-gradient(135deg, #1a5276, #2c5aa0);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

.title {
font-size: 2.6rem;
font-weight: 600;
background: linear-gradient(135deg, #2c3e50, #1a5276);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.2rem; /* Tighter spacing */
letter-spacing: -0.5px;
}

.arabic-title {
font-family: 'Scheherazade New', serif;
font-size: 2.2rem; /* Bigger - was 1.8rem */
background: linear-gradient(135deg, #1a5276, #2c5aa0);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.8rem; /* Adjusted spacing */
font-weight: 600;
line-height: 1.2;
}

.subtitle {
font-size: 1.1rem;
color: #7f8c8d;
font-weight: 500;
letter-spacing: 0.5px;
margin-top: 0.5rem;
}

/* Enhanced Search Box */
.search-container {
background: rgba(255,255,255,0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 2.5rem;
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
border: 1px solid rgba(255,255,255,0.2);
}

.search-box {
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: 2px solid transparent;
background: linear-gradient(white, white) padding-box,
linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
}

.search-box:focus-within {
transform: translateY(-3px);
box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

/* Enhanced Buttons */
.search-btn, .feeling-lucky {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
border: none;
}

.search-btn:hover, .feeling-lucky:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Enhanced Footer */
.footer {
background: rgba(255,255,255,0.9);
backdrop-filter: blur(10px);
border-radius: 15px;
margin: 1rem;
border: 1px solid rgba(255,255,255,0.2);
}

/* Dark Mode Sweetness */
body.dark-mode .header {
background: linear-gradient(135deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.8) 100%);
}

body.dark-mode .search-container {
background: rgba(30,41,59,0.95);
}

body.dark-mode .footer {
background: rgba(30,41,59,0.9);
}
/* Alternative - Keep some styling but fix positioning */
.header {
text-align: center;
padding: 2rem 0 1.5rem 0;
background: transparent;
margin: 1rem;
}

.bismillah, .title, .arabic-title {
/* Remove any background clipping that might cause issues */
background: transparent !important;
-webkit-text-fill-color: initial !important;
}

.arabic-title {
font-family: 'Scheherazade New', serif;
font-size: 2.2rem;
color: #1a5276;
margin-bottom: 0.8rem;
font-weight: 600;
line-height: 1.3; /* Ensure proper line height */
padding: 0; /* Remove any padding */
}

/* Make sure the search container has proper spacing */
.search-container {
margin-top: 1rem; /* Add space between header and search */
}
/* Dark Mode Colors - Dark Blue/Navy Theme */


body::before {
content: "س";
font-family: 'Scheherazade New', serif;
font-size: 12rem;
position: fixed;
left: 5%;
top: 50%;
transform: translateY(-50%);
opacity: 0.08;
z-index: -1;
color: #1a5276;
}

body::after {
content: "ص";
font-family: 'Scheherazade New', serif;
font-size: 12rem;
position: fixed;
right: 5%;
top: 50%;
transform: translateY(-50%);
opacity: 0.08;
z-index: -1;
color: #1a5276;
}

/* Dark Mode */
body.dark-mode::before,
body.dark-mode::after {
color: #1e40af;
opacity: 0.05;
}


/* Dark Mode - Much more visible */
body.dark-mode::before,
body.dark-mode::after {
color: #3b82f6; /* Brighter blue */
opacity: 0.1; /* Much more visible */
}
/* Mobile Responsiveness Fixes */
@media (max-width: 768px) {
.container {
padding: 0.5rem;
margin: 0.5rem;
}

.header {
padding: 1.5rem 0 1rem 0;
margin: 0.5rem;
}

.bismillah {
font-size: 1.4rem;
margin-bottom: 0.3rem;
}

.title {
font-size: 1.8rem;
margin-bottom: 0.1rem;
}

.arabic-title {
font-size: 1.6rem;
margin-bottom: 0.5rem;
}

.subtitle {
font-size: 0.95rem;
padding: 0 1rem;
}


/* Search section mobile fixes */
.search-section {
padding: 1rem 0;
}

.search-container {
padding: 1.5rem;
margin: 0.5rem;
}

.search-input {
font-size: 1rem;
padding: 1rem 1rem 1rem 3rem;
}

.search-buttons {
flex-direction: column;
gap: 0.5rem;
}

.search-btn, .feeling-lucky {
width: 100%;
padding: 0.9rem 2rem;
}

/* Theme toggle mobile */
.theme-toggle {
position: static;
margin: 1rem auto 0 auto;
display: flex;
justify-content: center;
}

.toggle-btn {
margin: 0 auto;
}

/* Hide background calligraphy on mobile */
body::before,
body::after {
display: none;
}

/* Google CSE mobile fixes */
.gsc-input-box {
padding: 0.5rem !important;
}

.gsc-input input {
font-size: 1rem !important;
padding: 0.5rem 0 !important;
}
}

@media (max-width: 480px) {
.bismillah {
font-size: 1.2rem;
}

.title {
font-size: 1.5rem;
}

.arabic-title {
font-size: 1.3rem;
}

.search-container {
padding: 1rem;
}

.search-input {
padding: 0.8rem 0.8rem 0.8rem 2.5rem;
}

.search-box i {
left: 1rem;
font-size: 1rem;
}
}
* Elegant Navigation Bar */
.navbar {
background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,245,240,0.9) 100%);
backdrop-filter: blur(25px);
border-bottom: 1px solid rgba(232, 226, 214, 0.6);
padding: 0;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

.nav-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
display: flex;
justify-content: space-between;
align-items: center;
height: 75px;
}

.nav-links {
display: flex;
align-items: center;
gap: 0.5rem;
}

.nav-link {
text-decoration: none;
color: #2c3e50;
font-weight: 500;
padding: 0.8rem 1.5rem;
border-radius: 50px;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
position: relative;
font-size: 0.95rem;
border: 1px solid transparent;
}

.nav-link:hover {
color: #1a5276;
background: rgba(255,255,255,0.7);
border: 1px solid rgba(26, 82, 118, 0.2);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(26, 82, 118, 0.15);
}

.nav-link.active {
color: #1a5276;
background: linear-gradient(135deg, #ffffff, #f8f5f0);
border: 1px solid rgba(26, 82, 118, 0.3);
box-shadow: 0 6px 20px rgba(26, 82, 118, 0.12);
}

.nav-link.active::before {
content: '';
position: absolute;
bottom: -1px;
left: 50%;
transform: translateX(-50%);
width: 30px;
height: 3px;
background: linear-gradient(135deg, #1a5276, #2c5aa0);
border-radius: 3px;
}

/* Elegant Resources Dropdown */
.resources-dropdown {
position: relative;
}

.resources-btn {
background: none;
border: 1px solid transparent;
color: #2c3e50;
font-family: 'Noto Sans', sans-serif;
font-size: 0.95rem;
font-weight: 500;
padding: 0.8rem 1.5rem;
cursor: pointer;
border-radius: 50px;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
display: flex;
align-items: center;
gap: 0.5rem;
}

.resources-btn:hover {
color: #1a5276;
background: rgba(255,255,255,0.7);
border: 1px solid rgba(26, 82, 118, 0.2);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(26, 82, 118, 0.15);
}

.dropdown-content {
display: none;
position: absolute;
top: 100%;
left: 0;
background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,245,240,0.95) 100%);
backdrop-filter: blur(25px);
min-width: 250px;
border-radius: 20px;
box-shadow: 0 25px 50px rgba(0,0,0,0.15);
border: 1px solid rgba(232, 226, 214, 0.5);
z-index: 1000;
margin-top: 0.5rem;
padding: 0.5rem;
opacity: 0;
transform: translateY(-10px) scale(0.95);
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.resources-dropdown:hover .dropdown-content {
display: block;
opacity: 1;
transform: translateY(0) scale(1);
}

.dropdown-content a {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem 1.25rem;
text-decoration: none;
color: #2c3e50;
border-radius: 12px;
transition: all 0.3s ease;
font-size: 0.9rem;
margin: 0.25rem 0;
}

.dropdown-content a:hover {
background: linear-gradient(135deg, #ffffff, #f8f5f0);
color: #1a5276;
transform: translateX(5px);
box-shadow: 0 5px 15px rgba(26, 82, 118, 0.1);
}

.dropdown-content a i {
width: 20px;
text-align: center;
color: #1a5276;
font-size: 1.1rem;
transition: all 0.3s ease;
}

.dropdown-content a:hover i {
transform: scale(1.1);
}

/* Elegant Theme Toggle */
.theme-toggle {
display: flex;
align-items: center;
margin: 0;
}

.toggle-btn {
background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,245,240,0.8) 100%);
border: 1px solid rgba(213, 219, 219, 0.8);
border-radius: 50px;
padding: 0.7rem 1.3rem;
cursor: pointer;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
display: flex;
align-items: center;
gap: 0.5rem;
font-family: 'Noto Sans', sans-serif;
font-size: 0.9rem;
color: #2c3e50;
backdrop-filter: blur(10px);
height: fit-content;
}

.toggle-btn:hover {
border-color: rgba(52, 152, 219, 0.5);
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(52, 152, 219, 0.2);
background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.toggle-btn i {
color: #f39c12;
font-size: 0.9rem;
transition: all 0.3s ease;
}

.toggle-btn:hover i {
transform: rotate(15deg);
}

/* Dark Mode Elegant Styles */
/* Dark Mode - Make Nav Bar Transparent */

/* Dark Mode Nav Bar */
body.dark-mode .navbar {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.05) 0%, rgba(15, 23, 42, 0.1) 100%) !important;
    border-bottom-color: rgba(55, 65, 81, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01) !important;
}

body.dark-mode .nav-link {
color: #e0e0e0;
}

body.dark-mode .nav-link:hover {
color: #60a5fa;
background: rgba(55, 65, 81, 0.5);
border-color: rgba(96, 165, 250, 0.3);
box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
}

body.dark-mode .nav-link.active {
color: #60a5fa;
background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(30, 41, 59, 0.9));
border-color: rgba(96, 165, 250, 0.4);
box-shadow: 0 6px 20px rgba(96, 165, 250, 0.15);
}

body.dark-mode .nav-link.active::before {
background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

body.dark-mode .resources-btn {
color: #e0e0e0;
}

body.dark-mode .resources-btn:hover {
color: #60a5fa;
background: rgba(55, 65, 81, 0.5);
border-color: rgba(96, 165, 250, 0.3);
box-shadow: 0 8px 25px rgba(96, 165, 250, 0.2);
}


body.dark-mode .dropdown-content a {
color: #e0e0e0;
}

body.dark-mode .dropdown-content a:hover {
background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(30, 41, 59, 0.9));
color: #60a5fa;
}

body.dark-mode .dropdown-content a i {
color: #60a5fa;
}

body.dark-mode .toggle-btn {
background: linear-gradient(135deg, rgba(45, 55, 72, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
border-color: rgba(75, 85, 99, 0.8);
color: #e0e0e0;
}
/* Also make dropdown transparent in dark mode */
body.dark-mode .dropdown-content {
background: linear-gradient(135deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.85) 100%) !important;
border-color: rgba(55, 65, 81, 0.4) !important;
}


body.dark-mode .toggle-btn:hover {
border-color: rgba(96, 165, 250, 0.5);
box-shadow: 0 10px 25px rgba(96, 165, 250, 0.2);
background: linear-gradient(135deg, rgba(55, 65, 81, 0.9), rgba(30, 41, 59, 0.8));
}
/* Ultra Transparent Dark Mode Nav */
body.dark-mode .navbar {
background: linear-gradient(135deg, rgba(30,41,59,0.05) 0%, rgba(15,23,42,0.1) 100%) !important;
border-bottom-color: rgba(55, 65, 81, 0.1) !important;
box-shadow: 0 4px 20px rgba(0,0,0,0.01) !important;
}

body.dark-mode .dropdown-content {
background: linear-gradient(135deg, rgba(30,41,59,0.8) 0%, rgba(15,23,42,0.75) 100%) !important;
border-color: rgba(55, 65, 81, 0.3) !important;
}
/* Mobile Responsive */
@media (max-width: 768px) {
.nav-container {
padding: 0 1rem;
flex-direction: column;
height: auto;
gap: 1rem;
padding: 1.5rem 1rem;
}

.nav-links {
gap: 0.5rem;
flex-wrap: wrap;
justify-content: center;
}

.nav-link, .resources-btn {
padding: 0.7rem 1.2rem;
font-size: 0.9rem;
}

.theme-toggle {
position: static;
}

.dropdown-content {
position: fixed;
left: 50%;
transform: translateX(-50%);
min-width: 280px;
}
}
/* Google CSE Search Button Styling */
.gsc-search-button {
background: #2c3e50 !important;
border: none !important;
border-radius: 30% !important;
width: 70px !important;
height: 20px !important;
padding: 0 !important;
margin-left: 0.5rem !important;
transition: all 0.3s ease !important;
}

.gsc-search-button:hover {
background: #1a5276 !important;
transform: scale(1.05) !important;
}

.gsc-search-button svg {
fill: white !important;
width: 70px !important;
height: 20px !important;
}

/* Dark Mode Google Search Button */
body.dark-mode .gsc-search-button {
background: #60a5fa !important;
}

body.dark-mode .gsc-search-button:hover {
background: #3b82f6 !important;
}
/* Resources Page Styles */
.resources-page {
max-width: 1000px;
margin: 0 auto;
padding: 2rem;
}

.resource-tabs {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}

.tab-link {
padding: 1rem 1.5rem;
background: #f8f5f0;
border-radius: 8px;
text-decoration: none;
color: #2c3e50;
font-weight: 500;
transition: all 0.3s ease;
}

.tab-link:hover,
.tab-link.active {
background: #1a5276;
color: white;
}

.resource-section {
display: none;
}

.resource-section.active {
display: block;
}

.resource-list {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.resource-card {
background: white;
padding: 1.5rem;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
border-left: 4px solid #1a5276;
}

.resource-link {
display: inline-block;
padding: 0.5rem 1rem;
background: #1a5276;
color: white;
text-decoration: none;
border-radius: 6px;
margin-top: 1rem;
}

.back-link {
text-align: center;
margin-top: 3rem;
}

.back-link a {
color: #1a5276;
text-decoration: none;
}

/* Dark Mode */
body.dark-mode .resource-card {
background: #2d3748;
color: #e0e0e0;
}

body.dark-mode .tab-link {
background: #374151;
color: #e0e0e0;
}

body.dark-mode .tab-link.active {
background: #60a5fa;
}
/* Resources Page Styles */
.resources-page {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}

.resource-tabs {
display: flex;
gap: 1rem;
margin-bottom: 3rem;
flex-wrap: wrap;
justify-content: center;
}

.tab-link {
padding: 1rem 2rem;
background: #f8f5f0;
border: 2px solid transparent;
border-radius: 50px;
text-decoration: none;
color: #2c3e50;
font-weight: 600;
transition: all 0.3s ease;
font-size: 1rem;
}

.tab-link:hover {
background: #1a5276;
color: white;
transform: translateY(-2px);
}

.tab-link.active {
background: #1a5276;
color: white;
border-color: #2c5aa0;
}

.resource-section {
display: none;
}

.resource-section.active {
display: block;
}

.resource-list {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.resource-card {
background: white;
padding: 1.5rem;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
border-left: 4px solid #1a5276;
transition: all 0.3s ease;
}

.resource-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.resource-card h3 {
color: #1a5276;
margin-bottom: 0.5rem;
font-size: 1.2rem;
}

.resource-card p {
color: #666;
margin-bottom: 1rem;
line-height: 1.5;
}

.resource-link {
display: inline-block;
padding: 0.7rem 1.5rem;
background: #1a5276;
color: white;
text-decoration: none;
border-radius: 6px;
font-weight: 600;
transition: all 0.3s ease;
}

.resource-link:hover {
background: #2c5aa0;
transform: translateY(-2px);
}

.back-link {
text-align: center;
margin-top: 3rem;
}

.back-link a {
color: #1a5276;
text-decoration: none;
font-size: 1.1rem;
font-weight: 600;
}

.back-link a:hover {
text-decoration: underline;
}

/* Dark Mode Resources */
body.dark-mode .resource-tabs {
background: transparent;
}

body.dark-mode .tab-link {
background: #374151;
color: #e0e0e0;
}

body.dark-mode .tab-link:hover,
body.dark-mode .tab-link.active {
background: #60a5fa;
color: white;
}

body.dark-mode .resource-card {
background: #2d3748;
border-left-color: #60a5fa;
}

body.dark-mode .resource-card h3 {
color: #60a5fa;
}

body.dark-mode .resource-card p {
color: #d1d5db;
}

body.dark-mode .resource-link {
background: #60a5fa;
color: white;
}

body.dark-mode .resource-link:hover {
background: #3b82f6;
}

body.dark-mode .back-link a {
color: #60a5fa;
}


/* Polished Resources Page */
.resources-page {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}

.resource-tabs {
display: flex;
gap: 0.5rem;
margin-bottom: 3rem;
flex-wrap: wrap;
justify-content: center;
background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,245,240,0.9) 100%);
backdrop-filter: blur(20px);
padding: 1rem;
border-radius: 50px;
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.tab-link {
padding: 0.8rem 1.5rem;
background: transparent;
border: 2px solid transparent;
border-radius: 50px;
text-decoration: none;
color: #2c3e50;
font-weight: 600;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
font-size: 0.95rem;
}

.tab-link:hover {
color: #1a5276;
background: rgba(255,255,255,0.7);
border: 2px solid rgba(26, 82, 118, 0.2);
transform: translateY(-2px);
}

.tab-link.active {
color: #1a5276;
background: linear-gradient(135deg, #ffffff, #f8f5f0);
border: 2px solid rgba(26, 82, 118, 0.3);
box-shadow: 0 6px 20px rgba(26, 82, 118, 0.12);
}

.resource-section {
display: none;
}

.resource-section.active {
display: block;
}

/* Polished Resource Grid */
.resource-list {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Polished Resource Cards */
.resource-card {
background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,245,240,0.9) 100%);
backdrop-filter: blur(20px);
padding: 1.5rem;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0,0,0,0.08);
border: 1px solid rgba(232, 226, 214, 0.6);
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
display: flex;
flex-direction: column;
min-height: 120px;
justify-content: space-between;
}

.resource-card:hover {
transform: translateY(-8px);
box-shadow: 0 20px 40px rgba(0,0,0,0.15);
border: 1px solid rgba(26, 82, 118, 0.3);
}

.resource-card h3 {
color: #1a5276;
margin-bottom: 0.5rem;
font-size: 1.1rem;
font-weight: 600;
line-height: 1.3;
}

.resource-card p {
color: #666;
margin-bottom: 1rem;
line-height: 1.5;
font-size: 0.9rem;
}

.resource-link {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.7rem 1.5rem;
background: linear-gradient(135deg, #1a5276, #2c5aa0);
color: white;
text-decoration: none;
border-radius: 50px;
font-weight: 600;
transition: all 0.3s ease;
border: 2px solid transparent;
font-size: 0.9rem;
width: fit-content;
margin-top: auto;
}

.resource-link:hover {
background: linear-gradient(135deg, #2c5aa0, #3b6cb7);
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(26, 82, 118, 0.3);
}

.back-link {
text-align: center;
margin-top: 4rem;
}

.back-link a {
color: #1a5276;
text-decoration: none;
font-size: 1.1rem;
font-weight: 600;
padding: 1rem 2rem;
border-radius: 50px;
background: rgba(255,255,255,0.8);
transition: all 0.3s ease;
}

.back-link a:hover {
background: #1a5276;
color: white;
transform: translateY(-2px);
}

/* Dark Mode Polished Styles */
body.dark-mode .resource-tabs {
background: linear-gradient(135deg, rgba(30,41,59,0.95) 0%, rgba(15,23,42,0.9) 100%);
}

body.dark-mode .tab-link {
color: #e0e0e0;
}

body.dark-mode .tab-link:hover {
color: #60a5fa;
background: rgba(55, 65, 81, 0.5);
border: 2px solid rgba(96, 165, 250, 0.3);
}

body.dark-mode .tab-link.active {
color: #60a5fa;
background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(30, 41, 59, 0.9));
border: 2px solid rgba(96, 165, 250, 0.4);
}

body.dark-mode .resource-card {
background: linear-gradient(135deg, rgba(30,41,59,0.95) 0%, rgba(15,23,42,0.9) 100%);
border: 1px solid rgba(55, 65, 81, 0.6);
}

body.dark-mode .resource-card:hover {
border: 1px solid rgba(96, 165, 250, 0.4);
}

body.dark-mode .resource-card h3 {
color: #60a5fa;
}

body.dark-mode .resource-card p {
color: #d1d5db;
}

body.dark-mode .resource-link {
background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

body.dark-mode .resource-link:hover {
background: linear-gradient(135deg, #3b82f6, #2563eb);
}

body.dark-mode .back-link a {
color: #60a5fa;
background: rgba(30,41,59,0.8);
}

body.dark-mode .back-link a:hover {
background: #60a5fa;
color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .resources-page {
        padding: 1rem;
    }

    .resource-tabs {
        border-radius: 20px;
        padding: 0.8rem;
    }

    .tab-link {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .resource-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .resource-card {
        padding: 1.2rem;
        border-radius: 16px;
    }
}
/* Header Styles (same as home page) */
.header {
text-align: center;
padding: 2rem 0 1.5rem 0;
}

.bismillah {
font-family: 'Scheherazade New', serif;
font-size: 1.8rem;
color: #1a5276;
margin-bottom: 0.5rem;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.title {
font-size: 2.6rem;
font-weight: 600;
color: #2c3e50;
margin-bottom: 0.2rem;
letter-spacing: -0.5px;
}

.arabic-title {
font-family: 'Scheherazade New', serif;
font-size: 2.2rem;
color: #1a5276;
margin-bottom: 0.8rem;
font-weight: 600;
line-height: 1.2;
}

.subtitle {
font-size: 1.1rem;
color: #7f8c8d;
font-weight: 500;
letter-spacing: 0.5px;
}

/* Dark Mode Headers */
body.dark-mode .bismillah {
color: #60a5fa !important;
}

body.dark-mode .title {
color: #e0e0e0 !important;
}

body.dark-mode .arabic-title {
color: #60a5fa !important;
}

body.dark-mode .subtitle {
color: #9ca3af !important;
}
/* Mobile Dropdown Fix */
@media (max-width: 768px) {
    .resources-dropdown.active .dropdown-content {
        display: block !important;
        position: fixed;
        left: 5%;
        right: 5%;
        top: 100px;
        width: 90%;
        z-index: 1001;
        background: white;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }

    body.dark-mode .resources-dropdown.active .dropdown-content {
        background: #1f2937 !important;
    }
}
/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {

    /* Navigation fixes */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-link,
    .resources-btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
        justify-content: center;
    }

    /* Resources dropdown mobile optimization */
    .resources-dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
        border-radius: 12px;
    }

    .dropdown-content a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Header text sizing */
    .bismillah {
        font-size: 1.4rem;
    }

    .title {
        font-size: 1.8rem;
    }

    .arabic-title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
        padding: 0 1rem;
    }

    /* Search container */
    .search-container {
        padding: 1rem;
        margin: 0.5rem;
    }

    /* Google CSE mobile fixes */
    .gsc-input-box {
        padding: 0.5rem !important;
    }

    .gsc-input input {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }

    /* Theme toggle */
    .theme-toggle {
        width: 100%;
    }

    .toggle-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .bismillah {
        font-size: 1.2rem;
    }

    .title {
        font-size: 1.6rem;
    }

    .arabic-title {
        font-size: 1.3rem;
    }

    /* Hide background calligraphy on very small screens */
    body::before,
    body::after {
        display: none;
    }
}