/*
Theme Name: TikTok Review
Theme URI: https://example.com/tiktok-review
Author: Your Name
Author URI: https://example.com
Description: A modern dark theme for reviewing TikTok videos. SEO and mobile ready.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tiktok-review
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */
:root {
    --bg: #121212;
    --bg-alt: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent: #ff2d55;
    --accent-hover: #ff4d6d;
    --border: #2c2c2c;
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

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

.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.site-logo a {
    color: var(--text);
}

.site-logo a:hover {
    color: var(--accent);
}

/* Search box takes remaining space and is centered */
.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    width: 100%;
	justify-content: center;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius) 0 0 var(--radius);
    background-color: var(--bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-form input[type="search"]:focus {
    border-color: var(--accent);
}

.search-form button {
    padding: 10px 15px;
    border: 1px solid var(--accent);
    background-color: var(--accent);
    color: #fff;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.search-form button:hover {
    background-color: var(--accent-hover);
}

/* Navigation aligned to the right */
.main-navigation {
    flex-shrink: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--accent);
}

/* Mobile Responsive Header */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .site-logo {
        text-align: center;
    }

    .header-search {
        max-width: none;
        margin: 0;
    }

    .main-navigation ul {
        justify-content: center;
        gap: 15px;
    }
}

/* ==========================================================================
   Main Layout
   ========================================================================== */
.site-main {
    padding: 40px 0;
}

.layout-with-sidebar {
    display: flex;
    gap: 30px;
}

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

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .layout-with-sidebar {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

/* ==========================================================================
   Post Grid (used on homepage, archive, search)
   ========================================================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

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

.post-grid .post-card {
    margin-bottom: 0; /* remove extra margin since grid has gap */
}

/* ==========================================================================
   Post Cards (used in grid and elsewhere)
   ========================================================================== */
.post-card {
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.post-card .post-thumbnail {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card .post-content {
    padding: 20px;
}

.post-card .post-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.post-card .post-title a {
    color: var(--text);
}

.post-card .post-title a:hover {
    color: var(--accent);
}

.post-card .post-excerpt {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

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

/* ==========================================================================
   Single Post
   ========================================================================== */
.single-post .post {
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 30px;
}

.single-post .post-title {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.single-post .post-thumbnail {
    margin-bottom: 25px;
    border-radius: var(--radius);
    overflow: hidden;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
}

.single-post .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post .post-content p {
    margin-bottom: 1.5em;
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: 1.5em 0 0.5em;
    color: var(--text);
}

.single-post .post-content img {
    border-radius: var(--radius);
    margin: 20px 0;
}

/* Categories Pills */
.categories-pills {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.categories-pills .label {
    font-weight: 600;
    margin-right: 10px;
    color: var(--text-muted);
}

.categories-pills a {
    display: inline-block;
    background-color: var(--bg);
    color: var(--text);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.categories-pills a:hover {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.widget {
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.random-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.random-post-item:last-child {
    margin-bottom: 0;
}

.random-post-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.random-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.random-post-title {
    font-size: 0.95rem;
    line-height: 1.4;
}

.random-post-title a {
    color: var(--text);
}

.random-post-title a:hover {
    color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}

.pagination .current {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ==========================================================================
   Misc
   ========================================================================== */
.page-title {
    font-size: 2rem;
    margin-bottom: 30px;
}

.no-results {
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
}