/* ==========================================================================
   Modern Nulled PHP Scripts - Design System & Custom CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Light Mode */
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-primary: #0088ff;
    --accent-primary-hover: #0066cc;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #0088ff 0%, #8b5cf6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #0066cc 0%, #7c3aed 100%);
    
    --tag-bg: #eff6ff;
    --tag-text: #1d4ed8;
    --tag-border: #bfdbfe;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --bg-primary: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-glass: rgba(17, 24, 39, 0.85);
    --bg-card: #1f2937;
    --border-color: #374151;
    --border-hover: #4b5563;
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --tag-bg: rgba(0, 136, 255, 0.15);
    --tag-text: #60a5fa;
    --tag-border: rgba(0, 136, 255, 0.3);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-logo .logo-badge {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.search-box {
    flex: 1;
    max-width: 450px;
    position: relative;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 45px 0 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

.search-btn:hover {
    color: var(--accent-primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
}

/* Category Navigation Bar */
.category-bar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.cat-chip:hover, .cat-chip.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 136, 255, 0.25);
}

/* ==========================================================================
   Hero & Layout
   ========================================================================== */

.hero-banner {
    padding: 40px 0 20px;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

.main-content {
    flex: 1;
    padding: 30px 0 60px;
}

/* Grid Layout */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Post Card Component */
.post-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    position: relative;
}

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

.card-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--border-color);
}

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

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.btn-read-more:hover {
    gap: 10px;
}

/* ==========================================================================
   Single Post Detail View
   ========================================================================== */

.post-header {
    margin-bottom: 30px;
}

.post-header .post-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.post-banner-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

/* Action Buttons Box */
.action-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-sm);
}

.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(0, 136, 255, 0.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 255, 0.45);
    color: white;
}

.download-mirrors-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
}

.mirror-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mirror-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    gap: 12px;
}

.mirror-url-text {
    font-family: monospace;
    font-size: 0.88rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.btn-copy {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.btn-copy:hover {
    background-color: var(--accent-primary-hover);
}

.post-html-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    font-size: 1rem;
    line-height: 1.8;
}

.post-html-content p {
    margin-bottom: 16px;
}

.post-html-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.page-btn:hover, .page-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

/* Footer */
.site-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: auto;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }
    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
}
