/*
Theme Name: CheapFPS Tech Blog
Description: Modern tech blog theme for CheapFPS.com with featured posts grid and gaming news
Version: 1.0
*/

/* CSS Variables for Dark/Light Mode */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #e6e6e6;
    --text-muted: #b8b8b8;
    --accent-color: #00d4aa;
    --accent-hover: #00b894;
    --border-color: #333333;
    --footer-bg: #0f0f0f;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #495057;
    --accent-color: #008972;
    --accent-hover: #007461;
    --border-color: #dee2e6;
    --footer-bg: #f8f9fa;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: var(--bg-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.main-nav a:hover,
.main-nav a.current {
    color: var(--accent-color);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 2px;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
}

.theme-toggle-slider {
    background: var(--accent-color);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #000;
}

[data-theme="light"] .theme-toggle-slider {
    transform: translateX(30px);
}

.theme-toggle-icon {
    font-size: 0.7rem;
}

/* Show header on all pages including home */

/* Featured Posts Grid - Matches Reference Image Layout */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    margin: 20px;
    height: 600px;
    max-width: 1400px;
    margin: 20px auto;
}

/* Gaming Gear - Top Left (small) */
.featured-post:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

/* Apple's First - Left side spanning 2 rows (tall) */
.featured-post:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

/* AMD Stagnation - Center large (main feature) */
.featured-post:nth-child(3) {
    grid-column: 2;
    grid-row: 1 / 3;
}

/* Tech Culture - Top right */
.featured-post:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
}

/* Software - Middle right */
.featured-post:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

/* Retro - Bottom left */
.featured-post:nth-child(6) {
    grid-column: 1;
    grid-row: 2;
}

.featured-post {
    background: linear-gradient(45deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-post:hover {
    transform: translateY(-5px);
}

.featured-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: 2;
}

.featured-post img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.featured-content {
    position: relative;
    z-index: 3;
    padding: 20px;
    color: white;
}

.post-category {
    display: inline-block;
    background: var(--accent-color);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.featured-post h3 {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.3;
    margin: 0;
}

.featured-post a {
    color: inherit;
    text-decoration: none;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin: 40px 0;
    padding: 0 20px;
}

/* Gaming News Section */
.gaming-news {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 30px;
}

.section-title {
    color: var(--accent-color);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.news-grid {
    display: grid;
    gap: 20px;
}

.news-post {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.news-post:hover {
    background: var(--border-color);
}

.news-post img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.news-content h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

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

.news-post a {
    color: inherit;
    text-decoration: none;
}

/* Trending Sidebar */
.trending-sidebar {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.trending-post {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.trending-number {
    background: var(--accent-color);
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.trending-content h5 {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

.trending-post a {
    color: inherit;
    text-decoration: none;
}

/* Blog Pages */
.blog-header {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.blog-header h1 {
    color: #00d4aa;
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 20px;
    margin-bottom: 40px;
}

.blog-post {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post-content {
    padding: 25px;
}

.blog-post h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-post p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-post a {
    color: inherit;
    text-decoration: none;
}

.read-more {
    color: #00d4aa;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Contact Page */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: #1a1a1a;
    border-radius: 12px;
}

.contact-form h2 {
    color: #00d4aa;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: #2a2a2a;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00d4aa;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(45deg, #00d4aa, #00b894);
    color: #000;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

/* Footer Styles */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: 80px;
}

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

.footer-section h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .main-nav ul li {
        border-bottom: 1px solid var(--border-color);
        padding: 15px 0;
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .social-links {
        justify-content: center;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 15px;
        height: auto;
    }
    
    .featured-post:nth-child(n) {
        grid-column: 1;
        grid-row: auto;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .news-post {
        flex-direction: column;
    }
    
    .news-post img {
        width: 100%;
        height: 200px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .featured-grid,
    .main-content {
        padding: 0 10px;
    }
    
    .gaming-news,
    .trending-sidebar {
        padding: 20px;
    }
    
    .contact-form {
        padding: 25px;
    }
}