:root {
    --bg-body: #f0f2f5;
    --bg-header: #2c3e50;
    --bg-nav: #34495e;
    --bg-block: #ffffff;
    --text-main: #333333;
    --text-link: #2980b9;
    --text-link-hover: #c0392b;
    --border-color: #ddd;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --font-stack: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark Mode Override for "Dark Theme" requirement retention but adapted style */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #1a1a1a;
        --bg-header: #262626;
        --bg-nav: #333;
        --bg-block: #2d2d2d;
        --text-main: #e0e0e0;
        --text-link: #5dade2;
        --text-link-hover: #e74c3c;
        --border-color: #444;
    }
}

/* Force Dark Mode Theme as per user orig request, overriding light defaults */
:root {
    --bg-body: #121212;
    --bg-header: #1f1f1f;
    --bg-nav: #000000;
    --bg-block: #1e1e1e;
    --text-main: #cccccc;
    --text-link: #5dade2;
    --text-link-hover: #ff5252;
    --text-meta: #888;
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-stack);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.4;
}

a {
    text-decoration: none;
    color: var(--text-link);
}

a:hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-header);
    padding: 15px 0;
    border-bottom: 3px solid var(--border-color);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px black;
}

.top-search {
    display: flex;
    gap: 5px;
}

.top-search input {
    padding: 5px 10px;
    background: #333;
    border: 1px solid #444;
    color: #fff;
}

.top-search button {
    padding: 5px 15px;
    background: var(--text-link);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* Nav */
.main-nav {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
}

.main-nav .container {
    display: flex;
    flex-wrap: wrap;
}

.main-nav a {
    color: #fff;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: var(--text-link);
    color: white;
    text-decoration: none;
}

/* Layout */
.main-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.main-content {
    flex: 3;
    min-width: 0;
    /* Prevent overflow */
}

.sidebar {
    flex: 1;
    min-width: 250px;
}

/* Sections */
.section-block {
    background-color: var(--bg-block);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-radius: 4px;
}

.section-title {
    background: linear-gradient(to right, #2c3e50, #34495e);
    color: white;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.section-title span {
    border-left: 3px solid var(--text-link);
    padding-left: 10px;
}

/* Update List */
.update-list {
    padding: 10px;
}

.update-item {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    gap: 10px;
}

.update-item:last-child {
    border-bottom: none;
}

.cat-tag {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    min-width: 50px;
    text-align: center;
}

.cat-tag.tamil {
    background-color: #e74c3c;
}

.cat-tag.telugu {
    background-color: #f39c12;
}

.cat-tag.hindi {
    background-color: #27ae60;
}

.cat-tag.malayalam {
    background-color: #8e44ad;
}

.cat-tag.kannada {
    background-color: #2980b9;
}

.update-item a {
    font-weight: 500;
    color: var(--text-link);
    font-size: 14px;
}

.date {
    font-size: 11px;
    color: var(--text-meta);
    margin-left: auto;
    white-space: nowrap;
}

/* Movie Grid Dense */
.movie-grid-dense {
    padding: 10px;
}

.movie-row {
    padding: 6px 0;
    border-bottom: 1px dotted var(--border-color);
    padding-left: 15px;
    position: relative;
}

.movie-row::before {
    content: "►";
    position: absolute;
    left: 0;
    font-size: 10px;
    color: var(--text-meta);
    top: 9px;
}

/* Sidebar Widgets */
.widget {
    background-color: var(--bg-block);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-radius: 4px;
}

.widget-title {
    background-color: var(--bg-nav);
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.widget-list {
    list-style: none;
    padding: 0;
}

.widget-list li {
    border-bottom: 1px solid var(--border-color);
}

.widget-list li a {
    display: block;
    padding: 8px 12px;
    color: var(--text-link);
    transition: background 0.2s;
}

.widget-list li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 15px;
}

.telegram-box {
    padding: 15px;
    text-align: center;
}

.telegram-box button {
    margin-top: 10px;
    background-color: #0088cc;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

/* Footer */
.site-footer {
    background-color: var(--bg-header);
    color: #888;
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 3px solid var(--border-color);
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #aaa;
    margin: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .update-item {
        flex-direction: column;
        gap: 5px;
    }

    .date {
        margin-left: 0;
    }
}