/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --accent-bg: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(0, 0, 0, 0.03);
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #888;
    --accent-color: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #7b68ee);
    --border-color: rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(0, 0, 0, 0.05);
    --news-hover-shadow: rgba(0, 0, 0, 0.3);
    --font-monserrat: 'Montserrat', sans-serif;
    --color-gray: #3e3e3e;
    --color-yellow: #D9FF40;
}

[data-theme="dark"] {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --accent-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888;
    --accent-color: #00d4ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #7b68ee);
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --news-hover-shadow: rgba(0, 212, 255, 0.4);
    --color-gray: #ddd;
    --color-yellow: #D9FF40;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
    transition: background-color 0.3s ease, color 0.3s ease;
    width: 100%;
    min-width: 0; /* Allow shrinking below content size */
}

/* Accessibility */
.skip-nav {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-nav:focus {
    top: 6px;
}

.visually-hidden {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    filter: grayscale(90%);
    opacity: 0.4;
}

#threejs-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Ensure content is above background */
.header, .main-container, .tools-main-container, .footer {
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    width: 100%;
    overflow: hidden; /* Prevent any overflow */
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
    min-width: 0; /* Allow grid items to shrink */
}

.header-left {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.header-center {
    font-family: "Electrolize", sans-serif;
    font-weight: 400;
    font-style: normal;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    overflow: hidden;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
}

.category-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.45s ease;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    background-position-x: 390px;
    transition: background-position-x 0.9s linear, color 0.45s ease;
    min-width: fit-content;
}

.category-link:hover {
    color: #5AE4FF;
    background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEi%0D%0AIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhs%0D%0AaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB3aWR0%0D%0AaD0iMzkwcHgiIGhlaWdodD0iNTBweCIgdmlld0JveD0iMCAwIDM5MCA1MCIgZW5hYmxlLWJhY2tn%0D%0Acm91bmQ9Im5ldyAwIDAgMzkwIDUwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggZmlsbD0i%0D%0Abm9uZSIgc3Ryb2tlPSIjZDk0ZjVjIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLW1pdGVybGlt%0D%0AaXQ9IjEwIiBkPSJNMCw0Ny41ODVjMCwwLDk3LjUsMCwxMzAsMAoJYzEzLjc1LDAsMjguNzQtMzgu%0D%0ANzc4LDQ2LjE2OC0xOS40MTZDMTkyLjY2OSw0Ni41LDI0My42MDMsNDcuNTg1LDI2MCw0Ny41ODVj%0D%0AMzEuODIxLDAsMTMwLDAsMTMwLDAiLz4KPC9zdmc+Cg==");
    animation: line 1s;
}

.category-link.active {
    color: var(--accent-color);
}

@keyframes line {
    0% {
        background-position-x: 390px;
    }
}

.category-separator {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1rem;
    margin: 0 0.25rem;
}

.logo-link {
    text-decoration: none;
}

.logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    transition: all 0.3s ease;
    filter: var(--logo-filter, none);
}

.logo:hover {
    transform: scale(1.05);
}

[data-theme="dark"] .logo {
    filter: brightness(0) invert(1);
}

.nav-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
}

.search-form {
    min-width: 0;
    flex-shrink: 1;
}

.search-box {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 100%;
    max-width: 120px;
    min-width: 80px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.search-box::placeholder {
    color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: absolute;
}

.theme-icon.sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-icon.moon {
    opacity: 0;
    transform: rotate(180deg) scale(0.5);
}

[data-theme="dark"] .theme-icon.sun {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
}

[data-theme="dark"] .theme-icon.moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.subscribe-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.email-input {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 100%;
    max-width: 250px;
    min-width: 200px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex: 1;
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.email-input::placeholder {
    color: var(--text-muted);
}

.subscribe-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.subscribe-btn:active {
    transform: translateY(0);
}

.subscribe-btn.loading {
    background: var(--accent-bg);
    cursor: not-allowed;
}

/* Main Content (Index page with sidebar) */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    width: 100%;
    min-width: 0;
}

/* Tools Main Container (Single column layout) */
.tools-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Guides Main Container (Single column layout) */
.guides-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Sponsor Main Container (Centered layout) */
.sponsor-main-container {
    min-height: calc(75vh - 140px); /* Subtract header height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    width: 100%;
}

.sponsor-content {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

/* Hero Section */
.hero-section {
    height: auto;
    min-height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 1rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    animation: heroGlow 6s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { 
        opacity: 0.5; 
        transform: translate(-50%, -50%) scale(0.8); 
    }
    100% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2); 
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text {
    font-family: "Saira Semi Condensed", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-text .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.hero-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: center;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.news-item {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
    min-width: 0;
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px var(--news-hover-shadow);
    border-color: var(--accent-color);
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    transition: left 0.3s ease;
}

.news-item:hover::before {
    left: 0;
}

.news-image {
    width: 200px;
    height: 160px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.news-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.1), rgba(123, 104, 238, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item:hover .news-image::before {
    opacity: 1;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-item:hover .news-title {
    color: var(--accent-color);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.source-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.news-source {
    color: #666;
    font-weight: 500;
}

.news-category {
    color: #7b68ee;
    font-weight: 600;
}

.separator {
    color: var(--text-muted);
}

.trending-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent-color);
}

/* Tools Page Styles */
.tools-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tools-title {
    font-family: "Saira Semi Condensed", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.tools-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.tools-filter-container {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 0 auto 2rem auto;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
    max-width: 1000px;
    width: 100%;
}

.tools-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.tools-filter-item {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tools-filter-item:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.tools-filter-item.active {
    background: var(--accent-gradient);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* Mobile Filter Dropdown */
.tools-filter-dropdown {
    display: none;
    width: 100%;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    min-height: 44px;
    box-sizing: border-box;
}

.tools-filter-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

[data-theme="dark"] .tools-filter-dropdown {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.tools-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.tools-count {
    color: var(--accent-color);
    font-weight: 600;
}

.tools-no-tools {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 3rem 0;
    grid-column: 1 / -1;
}

/* Tool Card Styles */
.tool-card {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.tool-card:hover {
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.tool-card-date {
    background: var(--accent-color);
    position: absolute;
    top: 8px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-align: center;
    line-height: 12px;
    font-weight: bold;
    padding-top: 8px;
    font-size: 0.7rem;
    z-index: 10;
}

.tool-card-thumb {
    height: 180px;
    overflow: hidden;
    background-color: var(--secondary-bg);
    transition: height 0.3s ease;
    position: relative;
}

.tool-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(1);
}

.tool-card:hover .tool-card-thumb img {
    opacity: 0.7;
    transform: scale(1.1);
}

.tool-card:hover .tool-card-thumb {
    height: 100px;
}

.tool-card-body {
    position: relative;
    padding: 20px;
    height: 100px;
    transition: height 0.3s ease;
}

.tool-card:hover .tool-card-body {
    height: 180px;
}

.tool-card-title {
    padding: 0 0 10px 0;
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tool-card:hover .tool-card-title {
    animation: titleBlur 0.3s ease;
}

.tool-card-category {
    margin: 0;
    padding: 0 0 10px 0;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.tool-card:hover .tool-card-category {
    animation: subtitleBlur 0.3s ease;
}

.tool-card-description {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    margin: 0;
    padding: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transition-delay: 0s;
    transform: translateY(25px);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tool-card:hover .tool-card-description {
    opacity: 1;
    transition-delay: 0.1s;
    transform: translateY(0);
}

/* Tool Card Animations */
@keyframes titleBlur {
    0% {
        opacity: 0.6;
        text-shadow: 0px 5px 5px rgba(0, 0, 0, 0.6);
    }
    100% {
        opacity: 1;
        text-shadow: 0px 5px 5px transparent;
    }
}

@keyframes subtitleBlur {
    0% {
        opacity: 0.6;
        text-shadow: 0px 5px 5px rgba(0, 212, 255, 0.6);
    }
    100% {
        opacity: 1;
        text-shadow: 0px 5px 5px rgba(0, 212, 255, 0);
    }
}

/* Guides Page Styles */
.guides-header {
    text-align: center;
    margin-bottom: 2rem;
}

.guides-title {
    font-family: "Saira Semi Condensed", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.guides-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.guides-filter-container {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 0 auto 2rem auto;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
    max-width: 1000px;
    width: 100%;
}

.guides-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.guides-filter-item {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guides-filter-item:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.guides-filter-item.active {
    background: var(--accent-gradient);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.guides-filter-dropdown {
    display: none;
    width: 100%;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    min-height: 44px;
    box-sizing: border-box;
}

.guides-filter-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

[data-theme="dark"] .guides-filter-dropdown {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

.guides-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.guides-count {
    color: var(--accent-color);
    font-weight: 600;
}

.guides-list {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.guide-item {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    overflow: hidden;
    width: 100%;
}

.guide-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--accent-color);
}

.guide-link {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    gap: 1.5rem;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
}

.guide-link:hover {
    text-decoration: none;
    color: inherit;
}

.guide-thumbnail {
    position: relative;
    width: 200px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.guide-item:hover .guide-thumbnail img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 212, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.guide-item:hover .play-icon {
    background: rgba(0, 212, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.guide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.guide-title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.guide-item:hover .guide-title {
    color: var(--accent-color);
}

.guide-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.guide-category {
    background: var(--accent-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.guide-duration {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.guide-date {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    min-width: 100px;
}

.guides-no-guides {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 3rem 0;
    padding: 2rem;
    background: var(--accent-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Sponsor Page Styles */
.sponsor-header {
    margin-bottom: 2rem;
}

.sponsor-title {
    font-family: "Saira Semi Condensed", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.sponsor-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Advertisement Styles */
.ad-block {
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.1), rgba(0, 212, 255, 0.1));
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.ad-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    z-index: 1;
}

.ad-label {
    background: var(--accent-bg);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin: -0.75rem -0.75rem 0.75rem -0.75rem;
}

.ad-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.ad-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ad-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.ad-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ad-feature {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-left: 0.25rem;
}

.ad-feature::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

.ad-button {
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    border: none;
    cursor: pointer;
    display: inline-block;
}

.ad-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    text-decoration: none;
    color: white;
}

.ad-button:active {
    transform: translateY(0);
}

.ad-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--accent-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.ad-price-old {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

.ad-price-new {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.ad-discount {
    background: #ff4757;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contact Form Styles */
.contact-background {
    display: flex;
    min-height: 25vh;
    width: 100%;
}

.contact-container {
    flex: 0 1 700px;
    margin: auto;
    padding: 10px;
    width: 100%;
    max-width: 100%;
}

.contact-screen {
    position: relative;
    background: #3e3e3e;
    border-radius: 15px;
    width: 100%;
}

.contact-screen:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    bottom: 0;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
    z-index: -1;
}

.contact-screen-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: #4d4d4f;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.contact-screen-header-left {
    margin-right: auto;
}

.contact-screen-header-button {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    border-radius: 8px;
    background: white;
}

.contact-screen-header-button.close {
    background: #ed1c6f;
}

.contact-screen-header-button.maximize {
    background: #e8e925;
}

.contact-screen-header-button.minimize {
    background: #74c54f;
}

.contact-screen-header-right {
    display: flex;
}

.contact-screen-header-ellipsis {
    width: 3px;
    height: 3px;
    margin-left: 2px;
    border-radius: 8px;
    background: #999;
}

.contact-screen-body {
    display: flex;
    width: 100%;
}

.contact-screen-body-item {
    flex: 1;
    padding: 50px;
    min-width: 0;
}

.contact-screen-body-item.left {
    display: flex;
    flex-direction: column;
}

.contact-app-title {
    display: flex;
    flex-direction: column;
    position: relative;
    color: #ea1d6f;
    font-size: 26px;
    font-family: var(--font-monserrat);
    font-weight: 700;
    letter-spacing: 1.4px;
}

.contact-app-title:after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 25px;
    height: 4px;
    background: #ea1d6f;
}

.contact-app-form-group {
    margin-bottom: 15px;
}

.contact-app-form-group.message {
    margin-top: 40px;
}

.contact-app-form-group.buttons {
    margin-bottom: 0;
    text-align: right;
}

.contact-app-form-control {
    width: 100%;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 1px solid #666;
    color: #ddd;
    font-size: 14px;
    text-transform: uppercase;
    outline: none;
    transition: border-color .2s;
    font-family: var(--font-monserrat);
    font-weight: 700;
    letter-spacing: 1.4px;
    resize: none;
}

.contact-textarea {
    min-height: 60px;
    resize: vertical;
}

.contact-app-form-control::placeholder {
    color: #666;
}

.contact-app-form-control:focus {
    border-bottom-color: #ddd;
}

.contact-app-form-control.error {
    border-bottom-color: #ea1d6f;
}

.contact-app-form-button {
    background: none;
    border: none;
    color: #ea1d6f;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    font-family: var(--font-monserrat);
    font-weight: 700;
    letter-spacing: 1.4px;
    transition: color 0.3s ease;
}

.contact-app-form-button:hover {
    color: #b9134f;
}

/* Send Button Styles */
.send-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding: 0 10px;
    width: 100%;
}

.envelop-btn {
    --transition: 0.5s;
    display: inline-block;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    min-height: 20px;
    background: var(--color-gray);
    border: 1px solid #1a1a1a;
    border-radius: 5px;
    box-shadow: inset 0 0 8px var(--color-gray);
    font-family: var(--font-monserrat);
    font-weight: 500;
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}

.envelop-btn:focus {
    box-shadow: 0 0 12px rgba(64 242 255 / 0.5);
}

.envelop-btn::after {
    content: "";
    display: block;
    aspect-ratio: 1;
    width: 200%;
    background: #1a1a1a;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: 0% 0%;
    rotate: 45deg;
    transition: var(--transition);
}

.envelop-btn__text {
    display: block;
    position: relative;
    z-index: 1;
}

.envelop-btn__text-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    color: #1a1a1a;
    transition: var(--transition);
}

.envelop-btn__text-inner:last-child {
    color: var(--color-gray);
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
}

.envelop-btn__text-inner svg {
    translate: 0 1px;
}

.envelop-btn__text-inner path {
    stroke: currentColor;
}

@media (hover: hover) and (pointer: fine) {
    .envelop-btn:hover {
        background: #1175E7;
        box-shadow: inset 0 0 8px var(--color-gray), 0 0 12px rgba(30 177 191 / 0.5);
    }

    .envelop-btn:hover::after {
        translate: -50% -50%;
    }

    .envelop-btn:hover .envelop-btn__text-inner:first-child {
        translate: 0 -100%;
    }

    .envelop-btn:hover .envelop-btn__text-inner:last-child {
        translate: -50% -100%;
    }
}

@media (hover: none) {
    .envelop-btn:active {
        background: #1896E5;
        box-shadow: inset 0 0 8px var(--color-gray), 0 0 12px rgba(55 180 237 / 0.5);
    }

    .envelop-btn:active::after {
        translate: -50% -50%;
    }

    .envelop-btn:active .envelop-btn__text-inner:first-child {
        translate: 0 -100%;
    }

    .envelop-btn:active .envelop-btn__text-inner:last-child {
        translate: -50% -100%;
    }
}

/* Form Success and Error Messages */
.form-success-message {
    background: var(--glass-bg);
    border: 2px solid var(--accent-color);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem auto;
    font-weight: bold;
}

.form-success-message h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.form-success-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

.form-error-message {
    background: #ff4757;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Pagination */
.pagination-container {
    margin: 3rem 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0 1rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    overflow-x: auto;
}

.pagination-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
}

.page-number:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.page-number.active {
    background: var(--accent-gradient);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.page-number.active:hover {
    transform: translateY(-2px);
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0.75rem 0.5rem;
    font-weight: 600;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: fit-content;
    width: 100%;
}

.sidebar-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: .75rem;
    backdrop-filter: blur(20px);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Job Filter */
.job-filter {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border: none;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.filter-label:hover {
    background: var(--hover-bg);
}

.filter-radio {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--primary-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    appearance: none;
    margin: 0;
    flex-shrink: 0;
}

.filter-radio:checked {
    border-color: var(--accent-color);
    background: var(--accent-color);
}

.filter-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.filter-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.filter-label:hover .filter-text {
    color: var(--accent-color);
}

/* AI Jobs */
.ai-insights {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 104, 238, 0.1));
    border: 1px solid var(--accent-color);
}

.ai-jobs-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.ai-jobs-container::-webkit-scrollbar {
    width: 4px;
}

.ai-jobs-container::-webkit-scrollbar-track {
    background: var(--accent-bg);
    border-radius: 2px;
}

.ai-jobs-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 2px;
}

.ai-jobs-container::-webkit-scrollbar-thumb:hover {
    background: #00b8e6;
}

.ai-insight-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-insight-item:last-child {
    border-bottom: none;
}

.ai-job-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.ai-job-title {
    font-size: 0.9rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-job-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.ai-icon {
    width: 8px;
    height: 8px;
    background: var(--accent-gradient);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Smooth Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    transform: translateY(20px);
}

/* Loading States */
.loading {
    background: linear-gradient(90deg, var(--accent-bg) 25%, var(--hover-bg) 50%, var(--accent-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 3rem 0 2rem;
    width: 100%;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    filter: var(--logo-filter, none);
}

[data-theme="dark"] .footer-logo {
    filter: brightness(0) invert(1);
}

.footer-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 400px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-nav h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
}

.footer-nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-nav-links a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-social h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.social-icon:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--accent-color);
}

/* Show/Hide Filter Elements Based on Screen Size */
@media (max-width: 1024px) {
    .tools-filter-grid,
    .guides-filter-grid {
        display: none !important;
    }

    .tools-filter-dropdown,
    .guides-filter-dropdown {
        display: block !important;
    }
}

@media (min-width: 1025px) {
    .tools-filter-grid,
    .guides-filter-grid {
        display: grid !important;
    }

    .tools-filter-dropdown,
    .guides-filter-dropdown {
        display: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Prevent any horizontal overflow */
    body {
        overflow-x: hidden;
        width: 100vw;
        position: relative;
    }

    /* Header Mobile Styles */
    .header-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 0.75rem;
        text-align: center;
    }

    .header-left, .header-center, .header-right {
        justify-content: center;
    }

    .header-menu {
        gap: 0.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .category-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        min-width: fit-content;
    }

    .category-separator {
        font-size: 0.9rem;
        margin: 0 0.1rem;
    }

    .nav-controls {
        justify-content: center;
        gap: 0.75rem;
    }

    .search-box {
        max-width: 100px;
        min-width: 80px;
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .search-box::placeholder {
        font-size: 0.8rem;
    }

    /* Main Content Mobile */
    .main-container,
    .tools-main-container,
    .guides-main-container,
    .sponsor-main-container {
        grid-template-columns: 1fr;
        padding: 1rem 0.75rem;
        gap: 1rem;
        max-width: 100vw;
        width: 100%;
    }

    .content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 1.5rem 0.75rem;
        margin-bottom: 1rem;
    }

    .hero-text {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .subscribe-container {
        flex-direction: column;
        gap: 0.75rem;
        margin: 1rem 0;
        width: 100%;
        max-width: 100%;
    }

    .email-input {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 0.85rem;
    }

    .subscribe-btn {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.85rem 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .hero-stat-number {
        font-size: 1.5rem;
    }

    .hero-stat-label {
        font-size: 0.8rem;
    }

    /* News Grid Mobile */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }

    .news-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
        width: 100%;
        max-width: 100%;
    }

    .news-image {
        width: 100%;
        height: 200px;
        flex-shrink: 0;
    }

    .news-content {
        width: 100%;
    }

    .news-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .source-category {
        gap: 0.25rem;
    }

    /* Sidebar Mobile */
    .sidebar {
        position: static;
        top: auto;
        width: 100%;
    }

    /* Tools Mobile Styles */
    .tools-title, .guides-title {
        font-size: 2rem;
    }

    .tools-subtitle, .guides-subtitle {
        font-size: 1rem;
    }

    .tools-filter-container, .guides-filter-container {
        margin-bottom: 1.5rem;
        padding: 0.75rem;
    }

    .tools-stats, .guides-stats {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
    }

    .tool-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Mobile: Always show description, no hover needed */
    .tool-card-thumb {
        height: 160px;
    }

    .tool-card-body {
        height: auto;
        min-height: 200px;
        padding: 1rem;
    }

    .tool-card-description {
        position: static;
        opacity: 1;
        transform: translateY(0);
        transition: none;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    /* Remove hover effects on mobile */
    .tool-card:hover .tool-card-thumb {
        height: 160px;
    }

    .tool-card:hover .tool-card-thumb img {
        opacity: 1;
        transform: scale(1);
    }

    .tool-card:hover .tool-card-body {
        height: auto;
        min-height: 200px;
    }

    .tool-card-title {
        font-size: 1.1rem;
    }

    /* Guides Mobile Styles */
    .guides-list {
        width: 100%;
    }

    .guide-item {
        width: 100%;
    }

    .guide-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .guide-thumbnail {
        width: 100%;
        height: 180px;
        align-self: stretch;
    }

    .guide-content {
        width: 100%;
    }

    .guide-title {
        font-size: 1.1rem;
    }

    .guide-description {
        -webkit-line-clamp: 3;
    }

    .guide-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .guide-date {
        text-align: left;
        min-width: auto;
        margin-top: 0.5rem;
        font-size: 0.85rem;
    }

    /* Sponsor Mobile Styles */
    .sponsor-main-container {
        min-height: calc(100vh - 120px);
        align-items: flex-start;
        padding-top: 2rem;
    }

    .sponsor-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .sponsor-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .contact-container {
        padding: 0.5rem;
    }

    .contact-screen-body {
        flex-direction: column;
    }

    .contact-screen-body-item {
        padding: 1.5rem;
    }

    .contact-app-title {
        font-size: 1.2rem;
    }

    .contact-app-form-control {
        font-size: 0.85rem;
    }

    .contact-app-form-button {
        font-size: 0.85rem;
    }

    .envelop-btn {
        min-width: 100px;
        font-size: 0.7rem;
    }

    .envelop-btn__text-inner {
        padding: 8px 16px;
        gap: 4px;
    }

    .send-button-container {
        justify-content: center;
        margin-top: 1rem;
        padding: 0;
    }

    /* Pagination Mobile */
    .pagination-container {
        margin: 2rem 0 1rem;
        padding: 0 0.5rem;
    }

    .pagination {
        padding: 0.5rem;
        gap: 0.25rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
    }

    .pagination-btn,
    .page-number {
        min-width: 36px;
        height: 36px;
        padding: 0.25rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .page-numbers {
        margin: 0;
        gap: 0.125rem;
    }

    .page-info {
        font-size: 0.85rem;
    }

    /* Footer Mobile */
    .footer-content {
        padding: 0 0.75rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-description {
        max-width: 100%;
        font-size: 0.9rem;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-nav-links {
        align-items: center;
    }

    .footer-bottom {
        font-size: 0.8rem;
        padding-top: 1.5rem;
    }

    /* Advertisement Mobile */
    .ad-title {
        font-size: 1.1rem;
    }
    
    .ad-description {
        font-size: 0.85rem;
    }
    
    .ad-feature {
        font-size: 0.8rem;
    }
    
    .ad-button {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .ad-price {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .ad-price-new {
        font-size: 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .header-content {
        padding: 0 0.5rem;
    }

    .main-container,
    .tools-main-container,
    .guides-main-container,
    .sponsor-main-container {
        padding: 0.75rem 0.5rem;
    }

    .hero-section {
        padding: 1rem 0.5rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .category-link {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    .search-box {
        max-width: 80px;
        min-width: 60px;
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }

    .news-item {
        padding: 0.5rem;
    }

    .news-title {
        font-size: 0.9rem;
    }

    .tools-grid {
        gap: 1rem;
    }

    .tool-card-body {
        padding: 0.75rem;
    }

    .pagination-container {
        margin: 1.5rem 0 0.75rem;
    }

    .pagination {
        padding: 0.4rem;
        gap: 0.15rem;
    }

    .pagination-btn,
    .page-number {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .sponsor-title {
        font-size: 1.6rem;
    }

    .contact-screen-body-item {
        padding: 1rem;
    }

    .envelop-btn {
        min-width: 80px;
        font-size: 0.6rem;
    }

    .envelop-btn__text-inner {
        padding: 6px 12px;
        gap: 3px;
    }

    .footer-content {
        padding: 0 0.5rem;
    }
}

/* Large Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-center {
        gap: 0.75rem;
    }

    .header-menu {
        gap: 0.75rem;
    }

    .category-link {
        font-size: 0.85rem;
        padding: 0.45rem 0.7rem;
    }

    .category-separator {
        margin: 0 0.5rem;
    }

    .hero-text {
        font-size: 1.2rem;
    }

    .subscribe-container {
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .email-input {
        max-width: 200px;
        min-width: 150px;
    }
    
    .subscribe-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .news-image {
        width: 180px;
        height: 140px;
    }

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .guide-thumbnail {
        width: 160px;
        height: 100px;
    }

    .guide-title {
        font-size: 1.2rem;
    }

    .sponsor-main-container {
        min-height: calc(100vh - 140px);
        padding: 1.5rem;
    }

    .sponsor-title {
        font-size: 2.2rem;
    }

    .envelop-btn {
        min-width: 112px;
        font-size: 0.65rem;
    }
}

/* Very Large Screens */
@media (min-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}