/*
Theme Name: Zibll Lite
Theme URI: https://example.com/zibll-lite
Author: Zibll Team
Author URI: https://example.com
Description: A fully-featured WordPress theme with membership system, paid content, points system, referral program, check-in rewards, social login, SEO optimization, and responsive design. Features include user center, paid posts/downloads, recharge/withdrawal, commission system, post submission review, profile cards, comment interactions, ad management, visual settings panel, user levels, paid columns, tips, statistics dashboard.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zibll-lite
Tags: blog, e-commerce, flexible-header, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, responsive-layout
*/

/* CSS Reset & Base Styles */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --background-color: #ffffff;
    --card-background: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container-width: 1200px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    max-height: 40px;
    margin-right: 10px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.main-navigation {
    flex: 1;
    margin: 0 30px;
}

.main-navigation ul {
    display: flex;
    align-items: center;
}

.main-navigation li {
    position: relative;
    margin: 0 15px;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 0;
    display: block;
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--primary-color);
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-background);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    min-width: 180px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.main-navigation li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    margin: 0;
}

.main-navigation .sub-menu a {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.main-navigation .sub-menu a:hover {
    background: var(--light-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search {
    position: relative;
}

.header-search input {
    padding: 8px 35px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--light-color);
    width: 200px;
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--card-background);
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.875rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Main Content */
.site-main {
    padding: 30px 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Post Card */
.post-card {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 20px;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card-image {
    position: relative;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.post-card-content {
    padding: 20px;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-color);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-card-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.post-card-stats {
    display: flex;
    gap: 15px;
}

.post-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Sidebar */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 10px;
}

.widget a {
    color: var(--text-color);
    transition: var(--transition);
}

.widget a:hover {
    color: var(--primary-color);
}

/* Single Post */
.single-post {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.entry-header {
    margin-bottom: 25px;
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.entry-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 2em 0 1em;
    font-weight: 600;
    line-height: 1.4;
}

.entry-content h1 {
    font-size: 2rem;
}

.entry-content h2 {
    font-size: 1.75rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    margin: 2em 0;
    background: var(--light-color);
    border-radius: var(--radius-sm);
}

.entry-content code {
    background: var(--light-color);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background: var(--dark-color);
    color: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2em 0;
}

.entry-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: 1.5em auto;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.entry-content th {
    background: var(--light-color);
    font-weight: 600;
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-tag {
    background: var(--light-color);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: var(--transition);
}

.post-tag:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.post-interactions {
    display: flex;
    gap: 15px;
}

.post-interaction-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.post-interaction-btn:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.post-interaction-btn.active {
    color: var(--primary-color);
}

/* Paid Content Box */
.paid-content-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
    text-align: center;
}

.paid-content-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.paid-content-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.paid-content-points {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* User Center */
.user-center {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.user-sidebar {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.user-profile-card {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.user-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.user-profile-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-profile-level {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 3px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.user-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.user-stat-item {
    text-align: center;
}

.user-stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.user-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-menu {
    list-style: none;
}

.user-menu li {
    margin-bottom: 5px;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.user-menu a:hover,
.user-menu a.active {
    background: var(--light-color);
    color: var(--primary-color);
    text-decoration: none;
}

.user-dashboard {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    padding: 25px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.stat-card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Comments */
.comments-area {
    background: var(--card-background);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    float: left;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.comment-content {
    overflow: hidden;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.comment-text {
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0;
    transition: var(--transition);
}

.comment-action-btn:hover {
    color: var(--primary-color);
}

.comment-reply {
    margin-left: 65px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.footer-widget a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    background: var(--card-background);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .widget-area {
        order: -1;
    }
    
    .user-center {
        grid-template-columns: 1fr;
    }
    
    .user-sidebar {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-search input {
        width: 150px;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .single-post {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 1.5rem;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .comment-reply {
        margin-left: 55px;
    }
}

@media (max-width: 576px) {
    .header-actions {
        gap: 10px;
    }
    
    .header-search {
        display: none;
    }
    
    .user-actions .btn-text {
        display: none;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none;
}

.visible-xs {
    display: none;
}

@media (max-width: 768px) {
    .visible-xs {
        display: block;
    }
    
    .hidden-xs {
        display: none;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert Boxes */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-background);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-control-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* VIP Badge */
.vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 5px;
}

.vip-badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.vip-badge.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

/* Points Display */
.points-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--light-color);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--primary-color);
}

/* Lock Icon for Paid Content */
.lock-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    position: relative;
}

.lock-icon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 7px;
    border: 2px solid #fff;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.lock-icon::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    border: 2px solid #fff;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
