:root {
    --primary: #0b8b86;
    --primary-hover: #097a76;
    --secondary: #1f2732;
    --secondary-hover: #273140;
    --bg-body: #14181d;
    --surface: #1b2128;
    --surface-2: #202833;
    --text-main: #f3f4f6;
    --text-muted: #9aa4b2;
    --border: #2a3442;
    --radius: 12px;
    --shadow: 0 18px 30px -18px rgba(0,0,0,0.8), 0 10px 16px -12px rgba(0,0,0,0.6);
    --shadow-sm: 0 10px 16px -12px rgba(0,0,0,0.75);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

input::placeholder {
    color: rgba(243,244,246,0.55);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* Header */
.site-header { background: rgba(27,33,40,0.86); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.site-logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--text-main); font-weight: 700; font-size: 1.25rem; }
.site-logo img { height: 28px; width: auto; max-width: 240px; display: block; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__top { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: lowercase; color: var(--text-muted); font-weight: 600; }
.brand__main { font-family: ui-serif, Georgia, 'Times New Roman', serif; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text-main); margin-top: 0.05rem; }
.brand__single { color: var(--text-main); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: 0.2s; }
.site-nav a:hover { color: var(--primary); }

.site-content { flex: 1; padding: 2rem 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0; text-align: center; color: var(--text-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 600; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: 0.2s; text-decoration: none; font-family: inherit; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: var(--text-main); border-color: var(--border); }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-lg { padding: 0.875rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-full { width: 100%; }

/* Hero */
.hero { background: linear-gradient(135deg, #0b8b86 0%, #14181d 55%, #0a3f3e 100%); color: #fff; padding: 4rem 0; text-align: center; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.125rem; opacity: 0.9; max-width: 600px; margin: 0 auto 2rem; }
.hero-search { display: flex; max-width: 500px; margin: 0 auto; background: rgba(27,33,40,0.92); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; padding: 0.5rem; box-shadow: var(--shadow-sm); }
.hero-search input { flex: 1; border: none; padding: 0.5rem 1rem; font-size: 1rem; font-family: inherit; outline: none; background: transparent; }
.hero-search input { color: var(--text-main); }
.hero-search button { background: var(--primary); color: #fff; border: none; padding: 0.5rem 1.5rem; border-radius: 999px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.hero-search button:hover { background: var(--primary-hover); }

/* Catalog */
.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; }
.filter-card { margin-bottom: 2rem; }
.filter-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.filter-list { list-style: none; }
.filter-list li { margin-bottom: 0.5rem; }
.filter-list a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; display: flex; align-items: center; gap: 0.5rem; transition: 0.2s; }
.filter-list a:hover { color: var(--primary); }
.filter-list a.active { color: var(--primary); font-weight: 600; }
.filter-list a.active::before { content: "•"; color: var(--primary); }

.plugin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.plugin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: 0.3s; display: flex; flex-direction: column; }
.plugin-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: rgba(11,139,134,0.45); }
.plugin-card__image { aspect-ratio: 16/9; position: relative; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.plugin-card__image img { width: 100%; height: 100%; object-fit: cover; }
.plugin-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.35); }
.plugin-card__image .badge { position: absolute; top: 0.75rem; right: 0.75rem; }
.plugin-card__body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.plugin-card__body h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.plugin-card__body p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.plugin-card__meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: auto; }
.plugin-card__meta .price { font-weight: 700; color: var(--text-main); }
.plugin-card__meta .version { font-size: 0.75rem; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 0.25rem 0.5rem; border-radius: 4px; border: 1px solid rgba(255,255,255,0.08); }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { font-size: 0.75rem; padding: 0.25rem 0.75rem; background: rgba(255,255,255,0.06); color: var(--text-muted); border-radius: 999px; text-decoration: none; transition: 0.2s; border: 1px solid rgba(255,255,255,0.08); }
.tag:hover { background: rgba(255,255,255,0.1); color: var(--text-main); border-color: rgba(11,139,134,0.35); }
.tag.active { background: rgba(11,139,134,0.18); color: #7ef5ef; border-color: rgba(11,139,134,0.55); }

/* Badges */
.badge { display: inline-block; padding: 0.25rem 0.625rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1; }
.badge-free { background: rgba(11,139,134,0.18); color: #7ef5ef; border: 1px solid rgba(11,139,134,0.55); }
.badge-freemium { background: rgba(245,158,11,0.16); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.badge-subscription { background: rgba(168,85,247,0.14); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.35); }
.badge-oneshot { background: rgba(14,165,233,0.14); color: #7dd3fc; border: 1px solid rgba(14,165,233,0.35); }
.badge-plus { background: rgba(249,115,22,0.14); color: #fdba74; border: 1px solid rgba(249,115,22,0.35); }
.badge-version { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.1); }
.badge-active { background: rgba(34,197,94,0.14); color: #86efac; border: 1px solid rgba(34,197,94,0.35); }
.badge-draft { background: rgba(245,158,11,0.16); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.badge-expired { background: rgba(239,68,68,0.14); color: #fecaca; border: 1px solid rgba(239,68,68,0.35); }
.badge-revoked { background: rgba(239,68,68,0.14); color: #fecaca; border: 1px solid rgba(239,68,68,0.35); }
.badge-pending { background: rgba(245,158,11,0.16); color: #fbbf24; border: 1px solid rgba(245,158,11,0.35); }
.badge-suspended { background: rgba(100,116,139,0.16); color: #cbd5e1; border: 1px solid rgba(100,116,139,0.35); }

/* Plugin Detail */
.plugin-detail { margin-top: 2rem; margin-bottom: 4rem; }
.plugin-detail__header { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.plugin-detail__image { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.plugin-detail__image img { width: 100%; height: 100%; object-fit: cover; }
.plugin-detail__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.35); }
.plugin-detail__badges { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.plugin-detail__info h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.2; }
.plugin-detail__short-desc { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 1rem; }
.plugin-detail__author { font-size: 0.875rem; color: #94a3b8; margin-bottom: 1.5rem; }
.plugin-detail__cats { display: flex; gap: 0.5rem; margin-bottom: 2rem; }
.cat-link { font-size: 0.875rem; color: var(--primary); text-decoration: none; font-weight: 500; }
.cat-link:hover { text-decoration: underline; }
.external-link { display: inline-block; margin-top: 1rem; font-size: 0.875rem; color: var(--text-muted); text-decoration: none; }
.external-link:hover { color: var(--primary); }

.plugin-detail__pricing { background: var(--surface); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.price-block { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; background: var(--surface-2); border-radius: 8px; border: 1px solid var(--border); }
.price-block--featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.price-block--free { flex-direction: row; justify-content: space-between; align-items: center; }
.price-label { font-size: 0.875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.price-amount { font-size: 1.75rem; font-weight: 800; color: var(--text-main); }
.price-period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

.plugin-detail__tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tab-btn { background: transparent; border: none; padding: 1rem 0; font-size: 1rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: 0.2s; }
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

.prose { max-width: 800px; font-size: 1.0625rem; line-height: 1.7; color: var(--text-main); }
.prose p { margin-bottom: 1.25rem; }
.prose h1 { font-size: 2rem; margin: 1.75rem 0 1rem; line-height: 1.2; }
.prose h2 { font-size: 1.5rem; margin: 1.5rem 0 0.875rem; line-height: 1.25; }
.prose h3 { font-size: 1.25rem; margin: 1.25rem 0 0.75rem; line-height: 1.3; }
.prose ul, .prose ol { padding-left: 1.5rem; margin: 0 0 1.25rem; }
.prose li { margin: 0.35rem 0; }
.prose blockquote { border-left: 3px solid var(--border); padding-left: 1rem; color: var(--text-muted); margin: 0 0 1.25rem; }
.prose pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; overflow-x: auto; margin: 0 0 1.25rem; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.95em; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }

.media-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.media-gallery a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; transition: 0.2s; }
.media-gallery a:hover { transform: scale(1.02); box-shadow: var(--shadow-sm); border-color: var(--primary); }
.media-gallery img { width: 100%; height: 100%; object-fit: cover; }

.changelog { max-width: 800px; }
.changelog-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.changelog-item:last-child { border-bottom: none; }
.changelog-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.version-tag { font-size: 1.125rem; font-weight: 700; color: var(--text-main); background: rgba(255,255,255,0.06); padding: 0.25rem 0.75rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); }
.changelog-date { color: var(--text-muted); font-size: 0.875rem; }
.changelog-body { color: var(--text-muted); font-size: 0.9375rem; }

/* Checkout */
.checkout-page { display: flex; justify-content: center; padding: 4rem 0; }
.checkout-card { width: 100%; max-width: 500px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.checkout-summary { background: var(--surface-2); padding: 2rem; border-bottom: 1px solid var(--border); }
.checkout-summary h2 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.order-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.order-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.order-type { display: block; font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }
.order-total { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; border-top: 1px dashed rgba(255,255,255,0.12); font-size: 1.25rem; }
.paypal-badge { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-muted); }
.checkout-form { padding: 2rem; }
.checkout-form h2 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.875rem; }
.form-group input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 1rem; transition: 0.2s; background: var(--surface-2); color: var(--text-main); }
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,139,134,0.18); }

/* My Licenses */
.email-search-form { max-width: 500px; margin: 0 auto; }
.input-group { display: flex; gap: 0.5rem; }
.input-group input { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: var(--surface-2); color: var(--text-main); }
.licenses-list { display: grid; gap: 1.5rem; }
.license-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; box-shadow: var(--shadow-sm); }
.license-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 1.125rem; }
.license-card__key { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.license-card__key code { font-family: monospace; font-size: 1.125rem; font-weight: 600; letter-spacing: 1px; color: var(--primary); }
.license-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.license-card__meta strong { color: var(--text-main); }
.license-card__actions { display: flex; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Alerts */
.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.875rem; }
.alert-error { background: rgba(239,68,68,0.14); color: #fecaca; border: 1px solid rgba(239,68,68,0.35); }
.alert-info { background: rgba(11,139,134,0.14); color: #7ef5ef; border: 1px solid rgba(11,139,134,0.35); }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state svg { margin-bottom: 1rem; color: rgba(255,255,255,0.35); }
.empty-state h3 { color: var(--text-main); font-size: 1.25rem; margin-bottom: 0.5rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .plugin-detail__header { grid-template-columns: 1fr; gap: 1.5rem; }
    .price-grid { grid-template-columns: 1fr; }
    .license-card__meta { grid-template-columns: 1fr; }
    .license-card__key { flex-direction: column; gap: 1rem; text-align: center; }
    .brand__main { font-size: 1.25rem; }
}
