/* ============================================================
   Christmas Name Generator — Premium CSS
   thewheelofname.com/christmasname
   ============================================================ */

:root {
    --cn-red:        #DC2626;
    --cn-red-dark:   #B91C1C;
    --cn-green:      #16A34A;
    --cn-green-dark: #15803D;
    --cn-gold:       #F59E0B;
    --cn-gold-dark:  #D97706;
    --cn-snow:       #F8FAFC;
    --cn-text:       #1E293B;
    --cn-muted:      #64748B;
    --cn-radius:     16px;
    --cn-shadow:     0 4px 24px rgba(0,0,0,0.10);
}

/* ── Hero ───────────────────────────────────────────────────── */
.cn-hero {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 40%, #15803D 100%);
    color: #fff;
    border-radius: var(--cn-radius);
    padding: 2rem 1.5rem 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.cn-hero::before {
    content: '🎄🎅❄️🧝🦌⛄🔔🌟';
    position: absolute;
    top: 0.5rem; left: 0; right: 0;
    font-size: 1.5rem;
    letter-spacing: 0.8rem;
    opacity: 0.18;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
}
.cn-hero h1 { font-size: clamp(1.6rem,4vw,2.4rem); font-weight: 800; margin-bottom: 0.5rem; }
.cn-hero p  { opacity: 0.9; font-size: 1.05rem; margin: 0; }

/* ── Tool layout ────────────────────────────────────────────── */
.cn-tool-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.cn-generator-col { flex: 0 0 auto; min-width: 280px; flex: 1 1 380px; }
.cn-panel-col     { flex: 1 1 300px; min-width: 280px; }

/* ── Generator card ─────────────────────────────────────────── */
.cn-generator-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: var(--cn-radius);
    padding: 1.5rem;
    box-shadow: var(--cn-shadow);
}

/* ── Category buttons ───────────────────────────────────────── */
.cn-category-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--cn-muted);
    margin-bottom: 0.5rem;
}
.cn-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.cn-cat-btn {
    background: #F8FAFC;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    padding: 0.5rem 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: center;
}
.cn-cat-btn:hover { background: #FEF2F2; border-color: var(--cn-red); color: var(--cn-red-dark); }
.cn-cat-btn.cn-active {
    background: #FEE2E2;
    border-color: var(--cn-red-dark);
    color: var(--cn-red-dark);
}

/* ── Input ──────────────────────────────────────────────────── */
.cn-input-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cn-text);
    margin-bottom: 0.35rem;
    display: block;
}
.cn-textarea {
    width: 100%;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    font-size: 0.88rem;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
    min-height: 90px;
}
.cn-textarea:focus { outline: none; border-color: var(--cn-red); box-shadow: 0 0 0 3px rgba(220,38,38,0.12); }

/* ── Count selector ─────────────────────────────────────────── */
.cn-count-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cn-text);
}
.cn-count-btn {
    width: 2rem; height: 2rem;
    border-radius: 50%;
    border: 1.5px solid #CBD5E1;
    background: #F8FAFC;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.cn-count-btn.cn-active {
    background: var(--cn-red);
    border-color: var(--cn-red-dark);
    color: #fff;
}

/* ── Generate button ────────────────────────────────────────── */
.cn-generate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--cn-red-dark), var(--cn-red));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(220,38,38,0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}
.cn-generate-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(220,38,38,0.45); }
.cn-generate-btn:active { transform: translateY(0); }

/* ── Action buttons row ─────────────────────────────────────── */
.cn-action-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.cn-action-btn {
    background: #fff;
    border: 1.5px solid #CBD5E1;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cn-action-btn:hover { background: #F1F5F9; border-color: #94A3B8; }

/* ── Result card ────────────────────────────────────────────── */
.cn-result-card {
    background: linear-gradient(135deg, #FFF8F0, #FEF3C7);
    border: 2px solid var(--cn-gold);
    border-radius: var(--cn-radius);
    padding: 1.25rem 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cn-result-card.cn-pop { transform: scale(1.03); box-shadow: 0 8px 28px rgba(245,158,11,0.3); }
.cn-result-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cn-muted); margin-bottom: 0.35rem; }
.cn-result-names { font-size: 1.35rem; font-weight: 800; color: var(--cn-red-dark); line-height: 1.6; word-break: break-word; }
.cn-result-names.cn-multi { font-size: 1rem; text-align: left; width: 100%; }

/* ── Panel sections ─────────────────────────────────────────── */
.cn-panel-section {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: var(--cn-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--cn-shadow);
}
.cn-panel-section h3, .cn-panel-section h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cn-text);
    margin-bottom: 0.75rem;
}

/* ── History list ───────────────────────────────────────────── */
.cn-history-list { list-style: none; padding: 0; margin: 0 0 0.75rem; max-height: 200px; overflow-y: auto; }
.cn-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.85rem;
    gap: 0.5rem;
}
.cn-history-name { font-weight: 600; color: var(--cn-text); flex: 1; }
.cn-history-type { color: var(--cn-muted); font-size: 0.75rem; }

/* ── Name ideas section ─────────────────────────────────────── */
.cn-names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.cn-names-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.cn-names-card h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.5rem; }
.cn-names-card ul { list-style: none; padding: 0; margin: 0; }
.cn-names-card li { font-size: 0.83rem; color: #374151; padding: 0.2rem 0; border-bottom: 1px solid #F9FAFB; }
.cn-names-card li:last-child { border-bottom: none; }

/* ── GEO section ────────────────────────────────────────────── */
.cn-geo-section { margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 2px solid #F1F5F9; }
.cn-geo-section h2 { font-size: 1.45rem; font-weight: 800; color: var(--cn-red-dark); margin-bottom: 0.75rem; }
.cn-geo-section h3 { font-size: 1.05rem; font-weight: 700; color: var(--cn-green-dark); margin: 1.25rem 0 0.4rem; }
.cn-geo-section p  { color: #374151; line-height: 1.75; margin-bottom: 0.75rem; }

/* ── Content cards ──────────────────────────────────────────── */
.cn-content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; margin: 1.25rem 0; }
.cn-content-card { background: linear-gradient(135deg,#FFF8F0,#fff); border: 1px solid #FDE68A; border-radius: 12px; padding: 1.1rem; }
.cn-content-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--cn-red-dark); margin-bottom: 0.4rem; }
.cn-content-card p  { font-size: 0.84rem; color: #4B5563; margin: 0; line-height: 1.6; }

/* ── FAQ accordion ──────────────────────────────────────────── */
.cn-faq-section { margin: 2.5rem 0; }
.cn-faq-section h2 { font-size: 1.45rem; font-weight: 800; color: var(--cn-red-dark); margin-bottom: 1rem; }
.cn-faq-item { border: 1px solid #E2E8F0; border-radius: 10px; margin-bottom: 0.5rem; overflow: hidden; transition: box-shadow 0.2s; }
.cn-faq-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.cn-faq-q { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; color: var(--cn-text); background: #fff; user-select: none; gap: 1rem; }
.cn-faq-q:hover { background: #FEF2F2; color: var(--cn-red-dark); }
.cn-faq-icon { font-size: 1.1rem; transition: transform 0.25s; flex-shrink: 0; }
.cn-faq-item.cn-open .cn-faq-icon { transform: rotate(45deg); }
.cn-faq-a { display: none; padding: 0 1.1rem 1rem; font-size: 0.9rem; color: #374151; line-height: 1.7; background: #fff; }
.cn-faq-item.cn-open .cn-faq-a { display: block; }

/* ── Related tools ──────────────────────────────────────────── */
.cn-related { background: linear-gradient(135deg,#0F172A,#1E293B); color: #fff; border-radius: var(--cn-radius); padding: 1.5rem; margin: 2rem 0; }
.cn-related h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; color: #FCD34D; }
.cn-related-grid { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cn-related-link { background: rgba(255,255,255,0.1); color: #fff; border-radius: 50px; padding: 0.4rem 1rem; font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: background 0.15s; }
.cn-related-link:hover { background: rgba(245,158,11,0.3); color: #FCD34D; }

/* ── Snow canvas ────────────────────────────────────────────── */
#cnSnowCanvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.cn-content-wrapper { position: relative; z-index: 1; }

/* ── Responsive ─────────────────────────────────────────────── */
@@media (max-width: 767px) {
    .cn-tool-row { flex-direction: column; }
    .cn-category-grid { grid-template-columns: repeat(2,1fr); }
    .cn-hero { padding: 1.5rem 1rem 1rem; }
}
@@media (max-width: 400px) {
    .cn-category-grid { grid-template-columns: 1fr 1fr; }
    .cn-generate-btn { font-size: 1rem; }
}
