/*
Theme Name: CodesLL Modern
Description: Modern & Professional Giftcode Theme
Theme URI: https://codesll.com
Version: 6.0.0
Author: CuongIT
Author URI: https://codesll.com
Tags: theme game, apk, download game, giftcode
Textdomain: Codesll.Com
*/

:root {
    --primary: #6c5ce7;
    --primary-dark: #5649c0;
    --accent: #00b894;
    --secondary: #2d3436;
    --text-main: #2d3436;
    --text-light: #636e72;
    --bg-body: #f5f6fa;
    --bg-card: #ffffff;
    --border: #dfe6e9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --container-width: 1200px;
    --header-height: 70px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
}
a { text-decoration: none; color: var(--primary); transition: 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
ul, ol { list-style: none; }

/* Layout Containers */
#container, .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 10px;
}

.content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

#main-content {
    flex: 1;
    min-width: 0; /* Fix flex overflow */
}

#sidebar, #container #sidebar { /* Specificity fix */
    width: 320px;
    flex-shrink: 0;
}

/* Header */
header {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

nav#container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo span {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

/* Menu PC */
.menu-pc .dropdown {
    display: inline-block;
    position: relative;
    margin-left: 20px;
}

.menu-pc .dropbtn a {
    color: var(--text-main);
    font-weight: 600;
    padding: 10px 0;
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-card);
    min-width: 200px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius);
    padding: 10px 0;
    z-index: 1001;
    top: 100%;
}

.dropdown:hover .dropdown-content { display: block; animation: fadeIn 0.2s; }
.dropdown-content a {
    color: var(--text-main);
    padding: 10px 20px;
    display: block;
    font-size: 14px;
}
.dropdown-content a:hover { background-color: var(--bg-body); color: var(--primary); }

/* Search Bar */
.input-group {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 20px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background: var(--bg-body);
    transition: 0.3s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
}

/* Grid System for Posts */
.flex-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Card Design */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.card-image-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card .thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: 0.3s;
}

.card:hover .thumb { transform: scale(1.05); }

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
    gap: 10px;
}

.app-tag {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-excerpt {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Section Title */
.title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--primary);
    position: absolute;
    bottom: -2px;
}
.title { position: relative; }

.title a {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

/* Single Post */
article {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

h1.title-name {
    font-size: 28px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.entry-content {
    font-size: 17px;
    line-height: 1.8;
}

.entry-content h2 { margin-top: 30px; margin-bottom: 15px; font-size: 22px; }
.entry-content h3 { margin-top: 25px; margin-bottom: 10px; font-size: 19px; }
.entry-content p { margin-bottom: 20px; }

/* Info Table */
.table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.table th, .table td { padding: 12px 15px; border-bottom: 1px solid var(--border); }
.table th { width: 40%; color: var(--text-light); font-weight: 500; text-align: left; }
.table td { width: 60%; font-weight: 600; color: var(--text-main); text-align: right; }
.table tr:last-child th, .table tr:last-child td { border-bottom: none; }

/* Code Box (Important for this theme) */
.code-full-detail {
    background: #f0f3ff;
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
}

.code-full-detail strong {
    font-family: monospace;
    font-size: 18px;
    color: var(--primary);
    letter-spacing: 1px;
}

.get-code {
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.get-code:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Pagination */
#wp_page {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

#wp_page a, #wp_page span {
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 600;
}

#wp_page .current, #wp_page a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Footer */
footer {
    background: var(--secondary);
    color: #b2bec3;
    padding: 50px 0 20px;
    margin-top: 50px;
}

footer .socials {
    margin-bottom: 20px;
}

footer .socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin: 0 5px;
    color: #fff;
}

footer .socials a:hover { background: var(--primary); }

/* Sidebar Widget */
.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Mobile & Responsive */
.menu-mobile { display: none; }
#sidenav { display: none; }

@media (max-width: 1024px) {
    #sidebar { display: none; }
    #main-content { width: 100%; }
}

@media (max-width: 768px) {
    .content { flex-direction: column; }
    .hide-on-med-and-down { display: none; }
    .menu-mobile { display: block; margin-right: 15px; }
    .input-group { width: auto; }
    
    header { justify-content: space-between; padding: 0 15px; }
    
    /* Sidenav Styles */
    #sidenav {
        display: block;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: var(--bg-card);
        z-index: 2000;
        transition: 0.3s;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        padding: 20px;
    }
    
    #nav-check:checked ~ #sidenav { left: 0; }
    
    .title-mobile {
        font-size: 20px;
        font-weight: 700;
        color: var(--primary);
        display: block;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border);
        padding-bottom: 15px;
    }
    
    .list-sidenav a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        color: var(--text-main);
        font-weight: 500;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SVG Utilities */
.svg-2 { width: 18px; height: 18px; }
.svg-3 { width: 16px; height: 16px; fill: currentColor; }
.font-small { display: flex; align-items: center; gap: 5px; }