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

:root {
    --primary: #1a1a2e;
    --accent: #e94560;
    --surface: #16213e;
    --surface2: #0f3460;
    --text: #eaeaea;
    --text-muted: #9aa0b4;
    --radius: 8px;
    --transition: 0.2s ease;
}

html {
    background: var(--primary);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--primary);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header — always dark regardless of page theme */
.site-header {
    background: var(--surface) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text);
}

.site-logo span {
    color: var(--accent);
}

.site-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
}

.site-nav a:hover {
    color: var(--text);
}

/* Hero */
.hero {
    text-align: center;
    padding: 5rem 2rem 3rem;
    position: relative;
}

.hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 0;
}

.hero h1 span { color: var(--accent); }

.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto;
}

/* Title wrapper */
.hero-title-wrap {
    display: inline-block;
    margin-bottom: 1rem;
}

/* OC — anchored to hero, bottom aligned with paragraph */
.hero-oc-wrap {
    position: absolute;
    left: calc(50% + 260px);
    bottom: 0rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.oc-sprite {
    display: block;
    height: 200px;
    width: auto;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Speech bubble */
.oc-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #1a1a2e;
    border-radius: 10px;
    padding: 7px 13px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Segoe UI', system-ui, sans-serif;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    z-index: 200;
}

.oc-bubble.visible { opacity: 1; }

.oc-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #fff;
}

.oc-cursor {
    display: inline-block;
    color: var(--accent);
    animation: cursor-blink 0.7s step-end infinite;
    font-size: 0.6rem;
    vertical-align: middle;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes oc-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

@media (max-width: 700px) {
    .hero-oc-wrap { display: none; }
}

/* About section */
.about {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 3.5rem;
}

.about-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 2.5rem;
}

.about-block {
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
}

.about-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.about-block p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.about-block a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.about-block a:hover {
    color: var(--text);
}

/* Filter tabs */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0 2rem 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

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

/* Products grid */
.products-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}

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

.product-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color var(--transition), transform var(--transition);
}

.product-card:hover {
    border-color: rgba(233, 69, 96, 0.4);
    transform: translateY(-2px);
}

.product-card-top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.product-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.product-meta {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-badges {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-active   { background: rgba(52,199,89,0.15);  color: #34c759; }
.badge-beta     { background: rgba(255,159,10,0.15); color: #ff9f0a; }
.badge-free     { background: rgba(233,69,96,0.12);  color: var(--accent); }
.badge-paid     { background: rgba(100,210,255,0.12); color: #64d2ff; }
.badge-category { background: rgba(255,255,255,0.07); color: var(--text-muted); }

.product-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.product-links {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.link-btn {
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    transition: all var(--transition);
    cursor: pointer;
}

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

.link-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.link-btn.primary:hover {
    opacity: 0.85;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.empty-state p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Gift nav button */
.nav-gift-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid rgba(233,69,96,0.35);
    border-radius: 999px;
    background: rgba(233,69,96,0.08);
    color: var(--accent) !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.nav-gift-btn:hover {
    background: rgba(233,69,96,0.15);
    border-color: var(--accent);
}

/* Founder strip */
.founder-strip {
    display: flex;
    justify-content: center;
    padding: 0 2rem 2rem;
}

.founder-card {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.founder-card:hover {
    border-color: rgba(255,255,255,0.16);
    background: var(--surface2);
}

.founder-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.founder-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.founder-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.founder-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.founder-url {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Footer — always dark regardless of page theme */
.site-footer {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted) !important;
    background: var(--primary) !important;
    font-size: 0.82rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Error page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
}

.error-page h2 { font-size: 1.5rem; }
.error-page p  { color: var(--text-muted); }

@media (max-width: 600px) {
    .site-header { padding: 0 1rem; }
    .products-section { padding: 0 1rem 4rem; }
    .hero { padding: 3rem 1rem 2rem; }
}
