/* ===========================================================================
   companion.css — shared styles for the AI companion SEO hub + category pages
   Used by: /ai-companion/, /ai-girlfriend/, /ai-boyfriend/, /virtual-pet/
   (and all localized versions). Themed via a body class.
   =========================================================================== */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-strong: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-soft: rgba(255, 255, 255, 0.08);

    /* default (companion / brand) accent */
    --accent-1: #E91E63;
    --accent-2: #9C27B0;
    --accent-glow: rgba(233, 30, 99, 0.35);
}

/* Per-page themes ---------------------------------------------------------- */
body.theme-girlfriend {
    --accent-1: #E91E63;
    --accent-2: #FF6B9D;
    --accent-glow: rgba(233, 30, 99, 0.4);
}

body.theme-boyfriend {
    --accent-1: #6366F1;
    --accent-2: #22D3EE;
    --accent-glow: rgba(99, 102, 241, 0.4);
}

body.theme-pet {
    --accent-1: #F59E0B;
    --accent-2: #10B981;
    --accent-glow: rgba(245, 158, 11, 0.4);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 18% 18%, var(--accent-glow) 0%, transparent 48%),
        radial-gradient(ellipse at 82% 78%, rgba(156, 39, 176, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(233, 30, 99, 0.05) 0%, transparent 70%);
    z-index: -1;
    animation: gradientPulse 9s ease-in-out infinite;
}

@keyframes gradientPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigation --------------------------------------------------------------- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.82);
    border-bottom: 1px solid var(--border-soft);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}

.logo .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    box-shadow: 0 10px 30px var(--accent-glow);
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s;
}

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

/* Breadcrumbs -------------------------------------------------------------- */
.breadcrumbs {
    max-width: 1160px;
    margin: 0 auto;
    padding: 6.5rem 1.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-1); }
.breadcrumbs span { margin: 0 0.4rem; }

/* Hero --------------------------------------------------------------------- */
.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

.hero .eyebrow {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1.3rem;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Buttons ------------------------------------------------------------------ */
.cta-row {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
    font-size: 0.98rem;
}

.btn svg { width: 20px; height: 20px; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px var(--accent-glow);
}

.btn-play {
    background: linear-gradient(135deg, #0f9d58, #4285f4);
    color: #fff;
}

.btn-play:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(66, 133, 244, 0.4); }

.btn-ghost {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
}

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

/* Generic sections --------------------------------------------------------- */
section.block { padding: 3.5rem 1.5rem; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.8rem; }

.section-head h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.section-head p { color: var(--text-secondary); font-size: 1.08rem; }

.prose {
    max-width: 820px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.08rem;
}

.prose h2 {
    color: var(--text-primary);
    font-size: 1.9rem;
    margin: 2.5rem 0 1rem;
}

.prose h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 1.8rem 0 0.7rem;
}

.prose p { margin-bottom: 1.1rem; }

.prose ul { margin: 0 0 1.3rem 1.2rem; }
.prose li { margin-bottom: 0.55rem; }
.prose strong { color: var(--text-primary); }

/* Type / category cards ---------------------------------------------------- */
.card-grid {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.6rem;
}

.type-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.25s, border-color 0.25s, background 0.25s;
}

.type-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-1);
    background: var(--bg-card-strong);
}

.type-card .ic {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.type-card h3 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.type-card p { color: var(--text-secondary); font-size: 0.98rem; }
.type-card .more { display: inline-block; margin-top: 1rem; color: var(--accent-1); font-weight: 600; font-size: 0.92rem; }

/* App cards ---------------------------------------------------------------- */
.app-grid {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.6rem;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 1.8rem;
    transition: transform 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
}

.app-card:hover { transform: translateY(-4px); border-color: var(--accent-1); }

.app-card .app-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }

.app-card .app-head img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.app-card .app-head h3 { font-size: 1.25rem; line-height: 1.2; }
.app-card .app-head h3 a { color: var(--text-primary); text-decoration: none; }
.app-card .app-head h3 a:hover { color: var(--accent-1); }
.app-card .app-head .sub { color: var(--text-muted); font-size: 0.88rem; }

.app-card .app-desc { color: var(--text-secondary); font-size: 0.98rem; margin-bottom: 1.2rem; flex-grow: 1; }

.app-card .store-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.25s, border-color 0.25s;
}

.store-badge svg { width: 16px; height: 16px; }
.store-badge:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--accent-1); }

/* Feature list ------------------------------------------------------------- */
.feature-grid {
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 1.6rem;
}

.feature .ic {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
}

.feature h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.feature p { color: var(--text-secondary); font-size: 0.95rem; }

/* Comparison table --------------------------------------------------------- */
.table-wrap { max-width: 920px; margin: 0 auto; overflow-x: auto; }

table.compare {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    font-size: 0.96rem;
}

table.compare th, table.compare td {
    padding: 0.95rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

table.compare thead th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-weight: 700;
}

table.compare td { color: var(--text-secondary); }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare td:first-child, table.compare th:first-child { color: var(--text-primary); font-weight: 600; }

/* FAQ ---------------------------------------------------------------------- */
.faq { max-width: 820px; margin: 0 auto; }

.faq details {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 0.9rem;
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent-1); font-size: 1.5rem; font-weight: 400; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin-top: 0.9rem; color: var(--text-secondary); }

/* CTA banner --------------------------------------------------------------- */
.cta-banner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.14), rgba(156, 39, 176, 0.14));
    border: 1px solid var(--border-soft);
}

.cta-banner h2 { font-size: 2rem; margin-bottom: 0.8rem; }
.cta-banner p { color: var(--text-secondary); margin-bottom: 1.6rem; max-width: 560px; margin-left: auto; margin-right: auto; }

/* Ad container ------------------------------------------------------------- */
.ad-container { max-width: 1160px; margin: 1.5rem auto; text-align: center; padding: 0 1.5rem; }

/* Footer ------------------------------------------------------------------- */
footer {
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border-soft);
    margin-top: 2rem;
}

.footer-content {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent-1); }
.copyright { color: var(--text-muted); font-size: 0.85rem; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero .lead { font-size: 1.08rem; }
    .section-head h2 { font-size: 1.7rem; }
    .nav-links { gap: 1rem; }
    .nav-links a:not(.btn) { display: none; }
}
