/* ============================================= */
/* BASE STYLES - START */
/* ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333344;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

/* Header & Navigation */
header {
    background-color: transparent;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.4s ease;
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode header.scrolled {
    background-color: rgba(30, 30, 30, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Theme Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #8B5FBF;
}

body.dark-mode input:checked + .slider {
    background-color: #9d6bd6;
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.theme-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: white;
    z-index: 1;
}

.sun-icon {
    left: 8px;
}

.moon-icon {
    right: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #5f6368;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #8B5FBF;
}

body.dark-mode .nav-links a {
    color: #b0b0b0;
}

body.dark-mode .nav-links a:hover {
    color: #9d6bd6;
}

/* Updated Submit Site Button - White text on purple */
.submit-site-btn {
    background: #8B5FBF;
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid #8B5FBF;
}

.submit-site-btn:hover {
    background: #7A4DAB;
    color: white !important;
    border-color: #7A4DAB;
}

body.dark-mode .submit-site-btn {
    background: #9d6bd6;
    border-color: #9d6bd6;
    color: white !important;
}

body.dark-mode .submit-site-btn:hover {
    background: #8a4bc5;
    border-color: #8a4bc5;
    color: white !important;
}

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #5f6368;
    margin: 5px;
    transition: all 0.3s ease;
}

body.dark-mode .burger div {
    background-color: #b0b0b0;
}

/* Hero Section with Network Background */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 60px;
    overflow: hidden;
    background-color: #f8f9fa;
    transition: background-color 0.5s ease;
    width: 100%;
}

body.dark-mode .hero {
    background-color: #121212;
}

.network-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #bfc0c1;
    transition: background-color 0.5s ease;
}

body.dark-mode .network-background {
    background-color: #1e1e1e;
}

#networkCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.hero-logo img {
    max-width: 250px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
}

/* Trending Ranks Section */
.trending-ranks-section {
    width: 100%;
    margin-bottom: 60px;
    text-align: center;
}

.trending-ranks-section h2 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #8B5FBF;
    text-align: center;
}

body.dark-mode .trending-ranks-section h2 {
    color: #9d6bd6;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 100%;
}

.trending-list {
    background: white;
    border-radius: 8px;
    padding: 25px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid;
    text-align: left;
    width: 100%;
}

body.dark-mode .trending-list {
    background: #2d2d2d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.trending-list:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(139, 95, 191, 0.2);
}

body.dark-mode .trending-list:hover {
    box-shadow: 0 5px 15px rgba(157, 107, 214, 0.3);
}

.trending-list h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-list h3 i {
    font-size: 1.5rem;
}

.trending-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
}

body.dark-mode .trending-item {
    border-bottom-color: #444;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFEC8B);
    color: #8B7500;
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #E8E8E8);
    color: #696969;
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #E8B878);
    color: #8B4513;
}

.rank-4, .rank-5 {
    background: #f0f0f0;
    color: #666;
}

body.dark-mode .rank-4, 
body.dark-mode .rank-5 {
    background: #3d3d3d;
    color: #b0b0b0;
}

.trending-content {
    flex: 1;
    min-width: 0;
}

.trending-name {
    font-weight: 600;
    margin-bottom: 3px;
    color: #333344;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .trending-name {
    color: #e0e0e0;
}

.trending-clicks {
    font-size: 0.8rem;
    color: #8B5FBF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .trending-clicks {
    color: #9d6bd6;
}

.trending-clicks i {
    margin-right: 5px;
}

.trending-view-all {
    margin-top: 15px;
    text-align: center;
}

.trending-view-all-btn {
    background: transparent;
    border: 1px solid #8B5FBF;
    color: #8B5FBF;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-block;
}

.trending-view-all-btn:hover {
    background: #8B5FBF;
    color: white;
}

body.dark-mode .trending-view-all-btn {
    border-color: #9d6bd6;
    color: #9d6bd6;
}

body.dark-mode .trending-view-all-btn:hover {
    background: #9d6bd6;
    color: white;
}

/* Introduction Section */
.introduction-section {
    width: 100%;
    margin-bottom: 60px;
    text-align: center;
}

.introduction-section h2 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #8B5FBF;
    text-align: center;
}

body.dark-mode .introduction-section h2 {
    color: #9d6bd6;
}

/* Info Buttons Section - Centered and Equal Width */
.info-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
    width: 100%;
    max-width: 800px;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.info-button {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    background: white;
    border: 2px solid #8B5FBF;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    justify-content: center;
}

body.dark-mode .info-button {
    background: #2d2d2d;
    border-color: #9d6bd6;
}

.info-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(139, 95, 191, 0.15);
    background: #f9f5ff;
}

body.dark-mode .info-button:hover {
    box-shadow: 0 10px 20px rgba(157, 107, 214, 0.2);
    background: #1e1e1e;
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #8B5FBF;
}

body.dark-mode .info-icon {
    color: #9d6bd6;
}

.info-button h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #8B5FBF;
}

body.dark-mode .info-button h3 {
    color: #9d6bd6;
}

.info-button p {
    color: #5f6368;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

body.dark-mode .info-button p {
    color: #b0b0b0;
}

.read-more-btn {
    background: #8B5FBF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    margin-top: auto;
}

body.dark-mode .read-more-btn {
    background: #9d6bd6;
}

.read-more-btn:hover {
    background: #7A4DAB;
}

body.dark-mode .read-more-btn:hover {
    background: #8a4bc5;
}

/* NEW: Ethical Criteria Section (Pillar-style cards) */
.criteria-section {
    width: 100%;
    margin-bottom: 60px;
    text-align: left;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(139, 95, 191, 0.1);
    border: 2px solid #b0b0b0;
}

body.dark-mode .criteria-section {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(157, 107, 214, 0.2);
    border-left-color: #9d6bd6;
}

.criteria-section h2 {
    color: #8B5FBF;
    margin-bottom: 20px;
    text-align: center;
}

body.dark-mode .criteria-section h2 {
    color: #9d6bd6;
}

.criteria-section h3 {
    color: #333344;
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
    text-align: center;
}

body.dark-mode .criteria-section h3 {
    color: #e0e0e0;
}

.criteria-content p {
    color: #5f6368;
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: center;
}

body.dark-mode .criteria-content p {
    color: #b0b0b0;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0;
    width: 100%;
}

@media (max-width: 992px) {
    .criteria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .criteria-grid {
        grid-template-columns: 1fr;
    }
}

.criteria-card {
    background: white;
    border-radius: 8px;
    padding: 25px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #F44336;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

body.dark-mode .criteria-card {
    background: #2d2d2d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.criteria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.2);
}

body.dark-mode .criteria-card:hover {
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.criteria-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #F44336;
}

body.dark-mode .criteria-icon {
    color: #ff6b6b;
}

.criteria-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #5f6368;
    flex: 1;
}

body.dark-mode .criteria-text {
    color: #b0b0b0;
}

/* Centered text for all sections */
.section-centered {
    text-align: center;
    width: 100%;
    margin-bottom: 60px;
}

.tagline {
    font-size: 1.4rem;
    color: #5f6368;
    margin-bottom: 15px;
    max-width: 700px;
    padding: 0 15px;
    width: 100%;
    font-weight: 500;
    text-align: center;
    transition: color 0.5s ease;
}

body.dark-mode .tagline {
    color: #b0b0b0;
}

.subtagline {
    font-size: 1.1rem;
    color: #8B5FBF;
    margin-bottom: 40px;
    max-width: 600px;
    padding: 0 15px;
    width: 100%;
    font-style: italic;
    text-align: center;
    transition: color 0.5s ease;
}

body.dark-mode .subtagline {
    color: #9d6bd6;
}

/* Search Form */
.search-container {
    width: 100%;
    margin-bottom: 20px;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-box {
    display: flex;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    padding: 12px 20px;
    background: white;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.08);
    transition: all 0.2s;
    max-width: 600px;
    width: 100%;
}

body.dark-mode .search-box {
    background: #2d2d2d;
    border-color: #444;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.search-box:hover, .search-box:focus-within {
    box-shadow: 0 1px 10px rgba(139, 95, 191, 0.2);
}

body.dark-mode .search-box:hover, 
body.dark-mode .search-box:focus-within {
    box-shadow: 0 1px 10px rgba(157, 107, 214, 0.3);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 0 10px;
    min-width: 0;
    background: transparent;
    color: #333344;
    transition: color 0.5s ease;
}

body.dark-mode .search-input {
    color: #e0e0e0;
}

.search-button {
    background: #8B5FBF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

body.dark-mode .search-button {
    background: #9d6bd6;
}

.search-button:hover {
    background: #7A4DAB;
}

body.dark-mode .search-button:hover {
    background: #8a4bc5;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    max-width: 600px;
}

.quick-link {
    background: white;
    border: 1px solid #dfe1e5;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #5f6368;
    text-decoration: none;
    transition: all 0.2s;
}

body.dark-mode .quick-link {
    background: #2d2d2d;
    border-color: #444;
    color: #b0b0b0;
}

.quick-link:hover {
    background: #8B5FBF;
    color: white;
    border-color: #8B5FBF;
}

body.dark-mode .quick-link:hover {
    background: #9d6bd6;
    border-color: #9d6bd6;
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

/* Pillar Colors - 9 pillars */
.pillar-sustainable { background: #4CAF50; }
.pillar-privacy { background: #2196F3; }
.pillar-news { background: #F44336; }
.pillar-knowledge { background: #9C27B0; }
.pillar-social { background: #FF9800; }
.pillar-creative { background: #009688; }
.pillar-palestine { background: #000000; }
.pillar-health { background: #E91E63; }
.pillar-connect { background: #FF6B8B; }

/* DXD Tag Badge */
.dxd-tag-badge {
    display: inline-block;
    background: #8B5FBF;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 8px;
    white-space: nowrap;
}

body.dark-mode .dxd-tag-badge {
    background: #9d6bd6;
}

/* Features section */
.features {
    margin-bottom: 60px;
    width: 100%;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #8B5FBF;
    text-align: center;
}

body.dark-mode h2 {
    color: #9d6bd6;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 100%;
}

.feature-card {
    background: white;
    border-radius: 8px;
    padding: 25px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #8B5FBF;
    text-align: center;
    width: 100%;
}

body.dark-mode .feature-card {
    background: #2d2d2d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-top-color: #9d6bd6;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(139, 95, 191, 0.2);
}

body.dark-mode .feature-card:hover {
    box-shadow: 0 5px 15px rgba(157, 107, 214, 0.3);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #8B5FBF;
}

body.dark-mode .feature-card h3 {
    color: #9d6bd6;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.icon-1 { color: #8B5FBF; }
.icon-2 { color: #FF7B42; }
.icon-3 { color: #FF6B8B; }
.icon-4 { color: #8B5FBF; }

/* Pillars Grid - 3x3 layout */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
}

@media (max-width: 992px) {
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pillars-grid {
        grid-template-columns: 1fr;
    }
}

.pillar-card {
    background: white;
    border-radius: 8px;
    padding: 25px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid #8B5FBF;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-align: center;
    width: 100%;
}

body.dark-mode .pillar-card {
    background: #2d2d2d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(139, 95, 191, 0.2);
}

body.dark-mode .pillar-card:hover {
    box-shadow: 0 5px 15px rgba(157, 107, 214, 0.3);
}

.pillar-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #8B5FBF;
}

body.dark-mode .pillar-card h3 {
    color: #9d6bd6;
}

.pillar-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.pillar-content {
    flex: 1;
}

.pillar-card p {
    color: #5f6368;
}

body.dark-mode .pillar-card p {
    color: #b0b0b0;
}

.pillar-button {
    background: #8B5FBF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    margin-top: 15px;
    width: 100%;
}

body.dark-mode .pillar-button {
    background: #9d6bd6;
}

.pillar-button:hover {
    background: #7A4DAB;
}

body.dark-mode .pillar-button:hover {
    background: #8a4bc5;
}

/* How to Use section (in modal) */
.how-to-use {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(139, 95, 191, 0.1);
    border-left: 4px solid #4CAF50;
    width: 100%;
    text-align: center;
}

body.dark-mode .how-to-use {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(157, 107, 214, 0.2);
}

.how-to-use h2 {
    color: #4CAF50;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.step {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

body.dark-mode .step {
    background: #1e1e1e;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #8B5FBF;
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 15px;
}

body.dark-mode .step-number {
    background: #9d6bd6;
}

/* Ranking System Info (in modal) */
.ranking-system {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(139, 95, 191, 0.1);
    border-left: 4px solid #FF9800;
    width: 100%;
    text-align: center;
}

body.dark-mode .ranking-system {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(157, 107, 214, 0.2);
}

.ranking-system h2 {
    color: #FF9800;
}

.ranking-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ranking-point {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

body.dark-mode .ranking-point {
    background: #1e1e1e;
}

.ranking-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #8B5FBF;
    color: white;
    border-radius: 50%;
    line-height: 50px;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

body.dark-mode .ranking-icon {
    background: #9d6bd6;
}

/* Version Update section */
.version-update {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(139, 95, 191, 0.1);
    border-left: 4px solid #2196F3;
    width: 100%;
    text-align: center;
}

body.dark-mode .version-update {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(157, 107, 214, 0.2);
}

.version-update h2 {
    color: #2196F3;
}

.version-badge {
    display: inline-block;
    background: #8B5FBF;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

body.dark-mode .version-badge {
    background: #9d6bd6;
}

.version-update p {
    color: #5f6368;
}

body.dark-mode .version-update p {
    color: #b0b0b0;
}

.version-update strong {
    color: #333344;
}

body.dark-mode .version-update strong {
    color: #e0e0e0;
}

.version-update ul {
    color: #5f6368;
}

body.dark-mode .version-update ul {
    color: #b0b0b0;
}

/* FAQ Section */
.faq-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(139, 95, 191, 0.1);
    border-left: 4px solid #FF7B42;
    width: 100%;
    text-align: center;
}

body.dark-mode .faq-section {
    background: #2d2d2d;
    box-shadow: 0 2px 10px rgba(157, 107, 214, 0.2);
}

.faq-section h2 {
    color: #FF7B42;
    margin-bottom: 30px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

body.dark-mode .faq-item {
    border-color: #444;
}

.faq-question {
    padding: 20px;
    background: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

body.dark-mode .faq-question {
    background: #1e1e1e;
    color: #e0e0e0;
}

.faq-question:hover {
    background: #f0f0f0;
}

body.dark-mode .faq-question:hover {
    background: #2d2d2d;
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    color: #5f6368;
}

body.dark-mode .faq-answer p {
    color: #b0b0b0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1000px;
    height: 85%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

body.dark-mode .modal-content {
    background: #2d2d2d;
}

.modal-overlay.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 15px 20px;
    background: #8B5FBF;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .modal-header {
    background: #9d6bd6;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Search Result Items */
.search-result-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #8B5FBF;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
    display: flex;
    align-items: flex-start;
    width: 100%;
}

body.dark-mode .search-result-item {
    background: #2d2d2d;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-left-color: #9d6bd6;
}

.search-result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(139, 95, 191, 0.2);
}

body.dark-mode .search-result-item:hover {
    box-shadow: 0 3px 10px rgba(157, 107, 214, 0.3);
}

.search-result-favicon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    object-fit: contain;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-item h4 {
    color: #8B5FBF;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

body.dark-mode .search-result-item h4 {
    color: #9d6bd6;
}

.search-result-item p {
    color: #5f6368;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

body.dark-mode .search-result-item p {
    color: #b0b0b0;
}

.visit-website {
    display: inline-flex;
    align-items: center;
    background: #8B5FBF;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 8px;
}

body.dark-mode .visit-website {
    background: #9d6bd6;
}

.visit-website:hover {
    background: #7A4DAB;
}

body.dark-mode .visit-website:hover {
    background: #8a4bc5;
}

.visit-website i {
    margin-left: 5px;
    font-size: 0.8rem;
}

/* Load More Button */
.load-more-btn {
    background: #8B5FBF;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    margin: 20px auto;
    display: block;
    width: 200px;
}

body.dark-mode .load-more-btn {
    background: #9d6bd6;
}

.load-more-btn:hover {
    background: #7A4DAB;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

body.dark-mode .load-more-btn:hover {
    background: #8a4bc5;
    box-shadow: 0 4px 12px rgba(157, 107, 214, 0.3);
}

/* Category Section in Search Results */
.category-section {
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease forwards;
    width: 100%;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

body.dark-mode .category-header {
    border-bottom-color: #444;
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #5f6368;
    margin-right: 10px;
}

body.dark-mode .category-title {
    color: #b0b0b0;
}

.category-count {
    background: #8B5FBF;
    color: white;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

body.dark-mode .category-count {
    background: #9d6bd6;
}

/* Ranking Indicator */
.ranking-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #5f6368;
    width: 100%;
    flex-wrap: wrap;
}

body.dark-mode .ranking-indicator {
    background: #1e1e1e;
    color: #b0b0b0;
}

.ranking-indicator i {
    color: #8B5FBF;
    margin-right: 5px;
}

body.dark-mode .ranking-indicator i {
    color: #9d6bd6;
}

/* VERIFIED CONNECT FAMILY CARDS STYLES */
.family-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
    width: 100%;
}

@media (max-width: 992px) {
    .family-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .family-cards-grid {
        grid-template-columns: 1fr;
    }
}

.family-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eaeaea;
}

body.dark-mode .family-card {
    background: #2d2d2d;
    border-color: #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.family-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 139, 0.2);
}

body.dark-mode .family-card:hover {
    box-shadow: 0 8px 20px rgba(255, 107, 139, 0.3);
}

.family-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eaeaea;
}

body.dark-mode .family-image {
    border-bottom-color: #444;
    filter: brightness(0.9);
}

.family-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.family-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333344;
    margin-bottom: 8px;
}

body.dark-mode .family-name {
    color: #e0e0e0;
}

.family-location {
    color: #FF6B8B;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.family-story {
    color: #5f6368;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

body.dark-mode .family-story {
    color: #b0b0b0;
}

.family-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.donation-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FF6B8B;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.donation-btn:hover {
    background: #ff5577;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 139, 0.3);
}

.donation-btn i {
    font-size: 0.9rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    width: fit-content;
}

body.dark-mode .verified-badge {
    background: rgba(76, 175, 80, 0.2);
}

.verified-badge i {
    font-size: 0.7rem;
}

.family-status {
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
    text-align: center;
    padding-top: 10px;
    border-top: 1px dashed #eaeaea;
}

body.dark-mode .family-status {
    color: #888;
    border-top-color: #444;
}

/* Verified Connect Modal Specific */
.verified-connect-intro {
    background: rgba(255, 107, 139, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border-left: 4px solid #FF6B8B;
    text-align: center;
}

body.dark-mode .verified-connect-intro {
    background: rgba(255, 107, 139, 0.15);
}

.verified-connect-intro h3 {
    color: #FF6B8B;
    margin-bottom: 10px;
}

.verified-connect-intro p {
    color: #5f6368;
    font-size: 0.95rem;
}

body.dark-mode .verified-connect-intro p {
    color: #b0b0b0;
}

/* Footer - UPDATED STRUCTURE */
footer {
    background: white;
    padding: 25px 20px;
    border-top: 1px solid #dfe1e5;
    color: #5f6368;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.5s ease;
    width: 100%;
}

body.dark-mode footer {
    background: #1e1e1e;
    border-top-color: #444;
    color: #b0b0b0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    flex-wrap: wrap;
}

body.dark-mode .footer-middle {
    border-top-color: #444;
    border-bottom-color: #444;
}

/* Updated Volunteer Button in Footer - WHITE TEXT ON PURPLE */
.footer-volunteer-btn {
    background: #8B5FBF;
    color: white !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.footer-volunteer-btn:hover {
    background: #7A4DAB;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

body.dark-mode .footer-volunteer-btn {
    background: #9d6bd6;
    color: white !important;
}

body.dark-mode .footer-volunteer-btn:hover {
    background: #8a4bc5;
    color: white !important;
    box-shadow: 0 4px 12px rgba(157, 107, 214, 0.3);
}

.footer-links {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.footer-links li {
    margin-left: 20px;
}

.footer-links a {
    text-decoration: none;
    color: #5f6368;
    transition: color 0.3s;
}

body.dark-mode .footer-links a {
    color: #b0b0b0;
}

.footer-links a:hover {
    color: #FF6B8B;
}

body.dark-mode .footer-links a:hover {
    color: #ff8ba7;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #5f6368;
    color: white;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    text-decoration: none;
}

body.dark-mode .social-icon {
    background-color: #444;
}

.social-icon:hover {
    background-color: #8B5FBF;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(139, 95, 191, 0.4);
}

body.dark-mode .social-icon:hover {
    background-color: #9d6bd6;
    box-shadow: 0 5px 15px rgba(157, 107, 214, 0.4);
}

.substack-icon svg {
    width: 18px;
    height: 18px;
}

/* Empowered by section - UPDATED: Removed purple background, black text */
.empowered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #333344;
    margin-top: 15px;
}

body.dark-mode .empowered-by {
    color: #e0e0e0;
}

.empowered-by-text {
    color: #333344;
}

body.dark-mode .empowered-by-text {
    color: #e0e0e0;
}

.watermelon-tech {
    color: #333344;
    font-weight: 600;
}

body.dark-mode .watermelon-tech {
    color: #e0e0e0;
}

.watermelon-tech a {
    color: #8B5FBF;
    text-decoration: underline;
    transition: color 0.3s;
}

body.dark-mode .watermelon-tech a {
    color: #9d6bd6;
}

.watermelon-tech a:hover {
    color: #7A4DAB;
    text-decoration: underline;
}

body.dark-mode .watermelon-tech a:hover {
    color: #8a4bc5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #8B5FBF;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(139, 95, 191, 0.3);
}

body.dark-mode .back-to-top {
    background: #9d6bd6;
    box-shadow: 0 4px 12px rgba(157, 107, 214, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #7A4DAB;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(139, 95, 191, 0.4);
}

body.dark-mode .back-to-top:hover {
    background: #8a4bc5;
    box-shadow: 0 6px 15px rgba(157, 107, 214, 0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive adjustments - IMPROVED FOR MOBILE */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        width: 100%;
        text-align: center;
        transform: translateY(-150%);
        transition: transform 0.5s ease;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }
    
    body.dark-mode .nav-links {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 0;
        padding: 15px 0;
        border-bottom: 1px solid rgba(240, 240, 240, 0.5);
        width: 100%;
    }
    
    body.dark-mode .nav-links li {
        border-bottom-color: rgba(68, 68, 68, 0.5);
    }
    
    .burger {
        display: block;
        z-index: 100;
    }
    
    .hero-logo img {
        max-width: 200px;
    }
    
    .tagline {
        font-size: 1.2rem;
        margin-bottom: 10px;
        padding: 0 20px;
    }
    
    .subtagline {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 20px;
    }
    
    .search-container {
        padding: 0 20px;
    }
    
    .info-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .info-button {
        min-width: 100%;
        max-width: 100%;
    }
    
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-middle {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .footer-links li {
        margin: 0 10px;
    }
    
    .hero {
        min-height: 60vh;
        padding: 90px 10px 40px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        height: 90%;
    }
    
    .steps, .ranking-points {
        grid-template-columns: 1fr;
    }
    
    /* Improved mobile search box */
    .search-box {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .search-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .search-button {
        width: 100%;
    }
    
    /* Improved ranking indicator for mobile */
    .ranking-indicator {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    /* Improved footer for mobile */
    .footer-top p {
        margin-bottom: 15px;
    }
    
    /* Fix for search result items in modal on mobile */
    .search-result-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 12px !important;
    }
    
    .search-result-favicon {
        margin-right: 0 !important;
        margin-bottom: 10px !important;
        align-self: flex-start;
    }
    
    /* Stack badges and ranking for mobile */
    .search-result-content > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .search-result-content > div:first-child > div {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-top: 5px !important;
    }
    
    /* Stack stats for mobile */
    .search-result-content > div:nth-child(3) {
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .search-result-content > div:nth-child(3) span {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        padding: 5px 0 !important;
    }
    
    /* Adjust modal body padding */
    .modal-body {
        padding: 15px !important;
    }
    
    /* Make category badges wrap properly */
    .category-badge, .dxd-tag-badge {
        white-space: normal !important;
        word-break: break-word !important;
        font-size: 0.7rem !important;
        padding: 3px 8px !important;
        display: inline-block !important;
        max-width: 100% !important;
    }
    
    /* Adjust visit website button for mobile */
    .visit-website {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 10px !important;
        padding: 8px 12px !important;
    }
    
    /* Fix category header for mobile */
    .category-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    .category-count {
        align-self: flex-start !important;
    }
    
    /* Adjust pagination for mobile */
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 35px;
    }
    
    .family-cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-logo img {
        max-width: 180px;
    }
    
    .logo img {
        height: 28px;
    }
    
    .theme-switch {
        width: 50px;
        height: 26px;
    }
    
    .slider:before {
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 4px;
    }
    
    input:checked + .slider:before {
        transform: translateX(24px);
    }
    
    .tagline {
        font-size: 1.1rem;
        margin-bottom: 10px;
        padding: 0 15px;
    }
    
    .subtagline {
        font-size: 0.95rem;
        margin-bottom: 25px;
        padding: 0 15px;
    }
    
    .search-container {
        padding: 0 15px;
    }
    
    .search-box {
        padding: 10px 15px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    .search-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-grid, .pillars-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        min-height: 50vh;
        padding: 80px 5px 30px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .footer-links li {
        margin: 5px 10px;
    }
    
    .social-icons {
        gap: 15px;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .modal-content {
        width: 98%;
        height: 95%;
    }
    
    .quick-links {
        gap: 8px;
    }
    
    .quick-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        font-size: 0.9rem;
    }
    
    /* Even better mobile optimization */
    .nav-container {
        padding: 12px 15px;
    }
    
    .trending-list h3 {
        font-size: 1.1rem;
    }
    
    .trending-name, .trending-clicks {
        font-size: 0.9rem;
    }
    
    .category-badge, .dxd-tag-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .ranking-indicator div {
        font-size: 0.75rem;
    }
    
    /* Further adjustments for very small screens */
    .search-result-item {
        padding: 10px !important;
    }
    
    .search-result-content h4 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    .search-result-content p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Stack badges vertically on very small screens */
    .search-result-content > div:first-child > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .search-result-content > div:nth-child(3) {
        font-size: 0.75rem !important;
    }
    
    .faq-question {
        padding: 12px 15px !important;
        font-size: 0.9rem !important;
    }
    
    .faq-answer {
        font-size: 0.85rem !important;
        padding: 0 15px !important;
    }
    
    .faq-answer.active {
        padding: 15px !important;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
        min-width: 30px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-logo img {
        max-width: 150px;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .subtagline {
        font-size: 0.85rem;
    }
    
    .quick-links {
        gap: 5px;
    }
    
    .quick-link {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-links li {
        margin: 0;
    }
    
    .social-icons {
        gap: 10px;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .modal-content {
        width: 98% !important;
        height: 96% !important;
    }
    
    .modal-body {
        padding: 10px !important;
    }
}

/* Animation for burger menu */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
    background-color: #8B5FBF;
}

body.dark-mode .toggle .line1 {
    background-color: #9d6bd6;
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
    background-color: #8B5FBF;
}

body.dark-mode .toggle .line3 {
    background-color: #9d6bd6;
}

/* Ensure everything is scrollable on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
/* ============================================= */
/* BASE STYLES - END */
/* ============================================= */