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

:root {
    --primary-color: #f7931a;
    --secondary-color: #627eea;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    font-size: 2rem;
    color: var(--dark-bg);
}

.logo .highlight {
    color: var(--primary-color);
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Ad Containers */
.ad-container {
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    min-height: 90px;
    text-align: center;
}

.ad-leaderboard {
    max-width: 970px;
    margin: 1rem auto;
    min-height: 90px;
}

.ad-sidebar {
    min-height: 250px;
}

.ad-native,
.ad-in-content {
    background: transparent;
    border: none;
    margin: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0f3460 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    outline: none;
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #e67e00;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Main Content Layout */
.main-content {
    padding: 3rem 0;
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 2rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark-bg);
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.resource-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.resource-card h4 {
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
}

.resource-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.resource-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Tools Container */
.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.tool-card h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.tool-demo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tool-input,
.tool-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.tool-input {
    width: 100px;
}

.tool-arrow {
    font-size: 1.2rem;
    color: var(--text-light);
}

.tool-btn {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

/* Gas Tracker */
.gas-tracker {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.gas-level {
    text-align: center;
}

.gas-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

.gas-price {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-bg);
    margin-top: 0.25rem;
}

/* Learn Grid */
.learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.learn-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.learn-card h4 {
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
}

.learn-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

/* News Container */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.news-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.news-title {
    margin: 0.5rem 0;
    color: var(--dark-bg);
}

.news-excerpt {
    color: var(--text-light);
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Newsletter Box */
.newsletter-box {
    background: var(--dark-bg);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.newsletter-box h4 {
    margin-bottom: 0.5rem;
}

.newsletter-box p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.newsletter-btn {
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
}

/* Trending Box */
.trending-box {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.trending-box h4 {
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.trending-list {
    list-style: none;
}

.trending-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.trending-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h5 {
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr 300px;
    }
    
    .sidebar-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-right {
        order: 2;
    }
    
    .quick-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-input,
    .search-btn {
        width: 100%;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-container {
        grid-template-columns: 1fr;
    }
    
    .tool-demo {
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a2e;
        --text-dark: #ffffff;
        --text-light: #cccccc;
        --border-color: #333333;
    }
    
    body {
        background-color: #0f0f0f;
    }
    
    .header,
    .main-content {
        background: #1a1a2e;
    }
    
    .resource-card,
    .tool-card,
    .learn-card,
    .news-item,
    .trending-box {
        background: #252540;
        border-color: #333333;
    }
}