/*
Theme Name: DevVN Premium
Theme URI: https://wp-plugin.io.vn
Author: AcmaTvirus
Description: WordPress theme for the DevVN Premium plugin showcase landing page.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: devvn-premium
*/

:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --accent-color: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.15);
    --secondary-color: #4f46e5;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(226, 232, 240, 0.8);
    --card-hover-shadow: rgba(0, 0, 0, 0.08);
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    font-weight: 700;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.logo-link {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.search-box input {
    background: #f1f5f9;
    border: 1px solid transparent;
    color: var(--text-color);
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.9rem;
}

.search-box input:focus {
    background: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Hero */
.hero {
    position: relative;
    padding: 10rem 0 6rem;
    background: radial-gradient(circle at top right, #e0f2fe, white);
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(79, 70, 229, 0.05) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
    margin: 0 auto;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--accent-color);
    font-weight: 900;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Filters */
.category-filter {
    padding: 1.5rem 0;
    position: sticky;
    top: 4rem;
    z-index: 900;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(8px);
}

.filter-wrapper {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0.25rem 1rem;
}

.filter-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 8px 16px var(--accent-glow);
}

/* Plugin Grid */
.plugin-showcase {
    padding: 2rem 0 6rem;
}

.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.plugin-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.plugin-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 25px -5px var(--card-hover-shadow);
}

.plugin-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-color);
    background: #f0f9ff;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    align-self: flex-start;
}

.plugin-title {
    font-size: 1.15rem;
    color: #0f172a;
    line-height: 1.3;
}

.plugin-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-learn {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Single Post */
.single-main {
    padding: 8rem 0 5rem;
}

.archive-main {
    padding-top: 7.5rem;
}

.single-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px var(--card-hover-shadow);
    max-width: 880px;
    margin: 0 auto;
    padding: 2rem;
}

.single-plugin-page {
    max-width: 1120px;
    margin: 0 auto;
}

.single-plugin-hero {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 28px;
    box-shadow: 0 20px 25px -5px var(--card-hover-shadow);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.single-plugin-summary {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.single-plugin-icon {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    flex: 0 0 88px;
    box-shadow: 0 16px 24px -12px var(--accent-glow);
}

.single-plugin-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    margin-bottom: 0.85rem;
}

.single-plugin-author {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.single-plugin-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.single-plugin-button {
    background: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: white;
    border-radius: 14px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0.8rem 1rem;
    text-decoration: none;
    font-weight: 700;
}

.single-plugin-button.is-secondary {
    background: white;
    color: var(--accent-color);
}

.single-plugin-tabs {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.single-plugin-tabs a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
}

.single-plugin-tabs a:hover {
    background: #f8fafc;
    color: var(--accent-color);
}

.single-plugin-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
}

.single-plugin-content {
    min-width: 0;
}

.single-plugin-panel {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px var(--card-hover-shadow);
    padding: 2rem;
}

.single-plugin-panel + .single-plugin-panel {
    margin-top: 1.5rem;
}

.single-section-title {
    font-size: 1.4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #0f172a;
}

.single-plugin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.single-sidebar-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px var(--card-hover-shadow);
    padding: 1.5rem;
}

.single-sidebar-card h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.single-meta-list {
    display: grid;
    gap: 0.9rem;
}

.single-meta-item {
    display: grid;
    gap: 0.2rem;
}

.single-meta-item strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.single-meta-item span,
.single-meta-item a {
    color: var(--text-color);
    text-decoration: none;
}

.single-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.single-taxonomy-list a {
    text-decoration: none;
}

.archive-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px var(--card-hover-shadow);
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
}

.single-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.single-header {
    margin-bottom: 2rem;
}

.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.single-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
    color: #0f172a;
    margin-bottom: 1rem;
}

.single-excerpt {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 720px;
}

.single-content {
    color: var(--text-color);
    font-size: 1rem;
}

.single-content > * + * {
    margin-top: 1rem;
}

.single-content h2,
.single-content h3,
.single-content h4 {
    color: #0f172a;
    line-height: 1.25;
}

.single-content a {
    color: var(--accent-color);
}

.single-content ul,
.single-content ol {
    padding-left: 1.25rem;
}

.archive-header {
    margin-bottom: 1.5rem;
}

.archive-list {
    display: grid;
    gap: 1rem;
}

.archive-item {
    padding: 1.25rem 0;
    border-top: 1px solid #e2e8f0;
}

.archive-item:first-child {
    border-top: none;
    padding-top: 0;
}

.archive-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

.archive-title a {
    color: #0f172a;
    text-decoration: none;
}

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

.archive-excerpt,
.archive-empty {
    color: var(--text-muted);
}

.archive-pagination {
    margin-top: 1.5rem;
}

.archive-pagination .nav-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.archive-pagination a,
.archive-pagination span {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--text-color);
    padding: 0.55rem 0.9rem;
    text-decoration: none;
}

.archive-pagination .current {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.single-empty-state {
    text-align: center;
}

/* Footer */
footer {
    border-top: 1px solid #e2e8f0;
    padding: 3rem 0;
    background: #ffffff;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations Scroll */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .glass-header {
        padding: 0.5rem 0;
    }

    .glass-header .container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        text-align: center;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .hero {
        padding: 10rem 0 4rem;
    }

    .hero-stats {
        gap: 0.5rem;
    }

    .category-filter {
        top: 6.5rem;
        /* Adjust for taller header on mobile */
    }

    .filter-wrapper {
        justify-content: flex-start;
    }

    .plugin-grid {
        grid-template-columns: 1fr;
    }

    .single-main {
        padding-top: 9rem;
    }

    .single-card {
        padding: 1.5rem;
    }

    .archive-card {
        padding: 1.5rem;
    }

    .single-plugin-hero,
    .single-plugin-layout {
        grid-template-columns: 1fr;
    }

    .single-plugin-summary {
        flex-direction: column;
    }

    .single-plugin-actions {
        width: 100%;
    }

    .single-plugin-panel,
    .single-sidebar-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .category-filter {
        top: 7rem;
    }
}
