/* Base Reset & Variables */
:root {
    --bg-color: #141414;
    --text-color: #ffffff;
    --nav-bg: #000000;
    --card-bg: #2f2f2f;
    --primary-color: #ff9800; /* Subtle highlight */
    --hover-color: #e68a00;
}

/* Study Mode Variables */
body.light-theme {
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --nav-bg: #e0e0e0;
    --card-bg: #ffffff;
    --primary-color: #0056b3;
    --hover-color: #004494;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--nav-bg);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
}

.search-container {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.search-container input {
    padding: 10px 20px;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    border: 1px solid #555;
    background: var(--card-bg);
    color: var(--text-color);
    outline: none;
}

.nav-controls .btn {
    padding: 8px 15px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn-study {
    background-color: #f1f1f1;
    color: #333;
}

.btn-boss {
    background-color: #d32f2f;
    color: white;
}

/* Layout */
.layout-container {
    display: flex;
    max-width: 1400px;
    margin: 20px auto;
    gap: 20px;
    padding: 0 20px;
}

.main-content {
    flex: 3;
}

.sidebar {
    flex: 1;
    background-color: var(--nav-bg);
    padding: 20px;
    border-radius: 8px;
    align-self: start;
}

/* Hero Section */
.hero-section {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-card {
    flex: 1;
    height: 250px;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
    transition: transform 0.3s;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 1;
}

.hero-card > * {
    position: relative;
    z-index: 2;
}

.hero-card:hover {
    transform: scale(1.02);
}

.meowdoku-card { border: 2px solid #ffb74d; }
.tbh-card { border: 2px solid #64b5f6; }

.hero-btn {
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    width: fit-content;
}

/* Grid Layout */
.category-block {
    margin-bottom: 30px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.grid-item {
    background-color: var(--card-bg);
    height: 140px;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    background-image: url('https://placehold.co/300x140/333/555?text=Game');
    background-size: cover;
    background-position: center;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 1;
}

.grid-item span {
    position: relative;
    z-index: 2;
    padding: 10px;
    width: 100%;
    color: var(--text-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    background-color: var(--hover-color);
    color: white;
}

/* Sidebar List */
.sidebar-list {
    list-style: none;
    padding: 0;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid #444;
    cursor: pointer;
}

.sidebar-list li:hover {
    color: var(--primary-color);
}

/* Footer SEO Area */
.seo-footer {
    background-color: var(--nav-bg);
    padding: 40px 20px;
    margin-top: 40px;
}

.seo-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
}

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

/* Study Mode Adjustments */
body.light-theme .hero-card::after {
    background: linear-gradient(to top, rgba(255,255,255,0.9), transparent);
}
body.light-theme .hero-card h2, 
body.light-theme .hero-card p {
    color: #333;
}
