/* ==============================================================
   OmniWire Apps — Premium Dark Theme (Gold/Amber Accents)
   Modern App Store Style CSS (Mobile-First, Lightweight, Clean)
   ============================================================== */

:root {
    --bg-main: #0a0c10;
    --bg-card: #12161f;
    --bg-card-hover: #171d29;
    --bg-glass: rgba(18, 22, 31, 0.85);
    --border: #232a3b;
    --border-hover: #3b4459;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.25);
    --accent-hover: #fbbf24;
    --accent-dark: #b45309;
    --success: #10b981;
    --danger: #ef4444;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Ambient Glows */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 20%;
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==============================================================
   HEADER & NAVBAR
   ============================================================== */
.site-header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

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

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #000;
    box-shadow: 0 4px 14px var(--accent-glow);
    flex-shrink: 0;
}

.brand-text-col {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1.2;
}

.brand-name span {
    color: var(--accent);
}

.brand-tagline {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-item {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-admin-link {
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
}

.nav-admin-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==============================================================
   HERO SECTION
   ============================================================== */
.hero-section {
    padding: 48px 0 32px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 14px;
    color: #fff;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    max-width: 640px;
    margin: 0 auto 30px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

/* Category Filter Tabs */
.filter-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: #fff;
}

.filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ==============================================================
   APPS GRID & CARDS
   ============================================================== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-top-banner {
    height: 140px;
    background: #19202e;
    position: relative;
    overflow: hidden;
}

.card-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.app-card:hover .card-banner-img {
    transform: scale(1.05);
}

.card-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

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

.card-header-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: -38px;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.card-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #1f2737;
    border: 3px solid var(--bg-card);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    object-fit: cover;
    flex-shrink: 0;
}

.card-icon-fallback {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2b3548 0%, #171d29 100%);
    border: 3px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

.card-app-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.card-app-tagline {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
    flex: 1;
}

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

.card-price-box {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.price-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.btn-view-details {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-view-details:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

/* ==============================================================
   APP DETAIL PAGE
   ============================================================== */
.app-detail-wrap {
    padding: 40px 0 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb span.current {
    color: var(--accent);
    font-weight: 600;
}

.app-detail-hero {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
}

.detail-cover-banner {
    height: 240px;
    background: #161c28;
    position: relative;
}

.detail-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-header-content {
    padding: 30px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.detail-icon-wrap {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: #1b2230;
    border: 4px solid var(--bg-card);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    overflow: hidden;
    flex-shrink: 0;
}

.detail-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-icon-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    background: linear-gradient(135deg, #273142 0%, #12161f 100%);
}

.detail-title-col {
    display: flex;
    flex-direction: column;
}

.detail-title {
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 6px;
}

.detail-tagline {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-tag.highlight {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--accent);
}

.detail-action-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 220px;
}

.detail-price-card {
    background: rgba(10, 12, 16, 0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-align: right;
    width: 100%;
}

.detail-price-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
}

/* Two-column layout */
.detail-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.content-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
}

.box-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

.box-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* Screenshots Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.gallery-thumb {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    background: #000;
    aspect-ratio: 9/16;
    transition: var(--transition);
}

.gallery-thumb:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    font-weight: 300;
}

/* Video Walkthrough */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

.video-wrapper iframe, .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Features List */
.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 15px;
}

.features-list li::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border-radius: 50%;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Description Prose */
.prose {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.prose p {
    margin-bottom: 16px;
}

.prose strong {
    color: #fff;
}

/* Sidebar Buy & Download Buttons */
.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.btn-demo-download {
    background: #1f2737;
    border: 1px solid var(--border);
    color: #fff;
}

.btn-demo-download:hover {
    background: #283247;
    border-color: #4b5563;
    color: #fff;
}

.btn-buy-codester {
    background: #2563eb;
    color: #fff;
}
.btn-buy-codester:hover {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-buy-codeintra {
    background: #059669;
    color: #fff;
}
.btn-buy-codeintra:hover {
    background: #047857;
    color: #fff;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

.btn-buy-sellanycode {
    background: #7c3aed;
    color: #fff;
}
.btn-buy-sellanycode:hover {
    background: #6d28d9;
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-buy-flippa {
    background: #0284c7;
    color: #fff;
}
.btn-buy-flippa:hover {
    background: #0369a1;
    color: #fff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

/* Tech Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table th {
    text-align: left;
    padding: 12px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    width: 40%;
}

.specs-table td {
    padding: 12px 0;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

/* ==============================================================
   FOOTER
   ============================================================== */
.site-footer {
    background: #080a0e;
    border-top: 1px solid var(--border);
    padding: 40px 0 30px;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 600px;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ==============================================================
   RESPONSIVE DESIGN (Mobile ~360px up to Desktop)
   ============================================================== */
@media (max-width: 900px) {
    .detail-main-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-header-content {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: -40px;
    }
    
    .detail-icon-wrap {
        margin: 0 auto;
    }
    
    .detail-badges {
        justify-content: center;
    }
    
    .detail-action-col {
        align-items: center;
        width: 100%;
    }
    
    .detail-price-card {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 26px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-title {
        font-size: 22px;
    }
    
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
