@import url('https://fonts.googleapis.com/css2?family=Boogaloo&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --bg: #0a0a14;
    --surface: #12121e;
    --card: #1a1a2e;
    --card-hover: #1f1f38;
    --primary: #ff2d78;
    --primary-dark: #cc1a5a;
    --accent: #ffe600;
    --purple: #7b2fff;
    --text: #e8e8f0;
    --muted: #8888aa;
    --border: rgba(255,255,255,0.07);
    --glow: 0 0 30px rgba(255, 45, 120, 0.25);
}

* { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(123,47,255,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(255,45,120,0.10) 0%, transparent 60%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

/* ── HEADER ── */
header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 0;
}

h1 {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    color: var(--text);
    margin: 0 0 4px;
    letter-spacing: 0.5px;
}

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

.subtitle {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── CAT MASCOT ── */
.cat-mascot {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    display: block;
    filter: drop-shadow(0 4px 20px rgba(255,45,120,0.4));
    transition: filter 0.5s ease;
}

.cat-mascot.state-alert  { filter: drop-shadow(0 4px 20px rgba(255,230,0,0.5)); }
.cat-mascot.state-suspicious { filter: drop-shadow(0 4px 20px rgba(123,47,255,0.5)); }
.cat-mascot.state-chaos  { filter: drop-shadow(0 4px 24px rgba(255,45,120,0.8)); animation: catShake 0.4s infinite; }

@keyframes catShake {
    0%,100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* SVG parts controlled by state */
.eye-pupil { transition: all 0.4s cubic-bezier(.34,1.56,.64,1); }
.eye-lid   { transition: all 0.4s ease; }
.mouth-path { transition: d 0.4s ease; }
.ear-inner { transition: fill 0.4s ease; }

/* calm (default) */
.cat-face .eye-lid { opacity: 0.55; }
/* alert */
.state-alert .eye-lid { opacity: 0; }
.state-alert .eye-pupil { transform: scale(1.15); }
/* suspicious */
.state-suspicious .eye-lid { opacity: 0.72; transform-origin: center; }
/* chaos */
.state-chaos .eye-lid { opacity: 0; }
.state-chaos .ear-inner { fill: var(--primary); }

/* ── QUIZ PROGRESS BAR ── */
.quiz-progress-wrap {
    margin-bottom: 28px;
}

.quiz-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.quiz-progress-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.quiz-progress-count {
    font-family: 'Boogaloo', cursive;
    font-size: 1rem;
    color: var(--primary);
}

.quiz-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.quiz-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--primary) 60%, var(--accent) 100%);
    width: 0%;
    transition: width 0.5s cubic-bezier(.34,1.56,.64,1);
    position: relative;
}

.quiz-progress-fill::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 20px;
    background: rgba(255,255,255,0.35);
    border-radius: 999px;
    filter: blur(4px);
}

/* ── INSTRUCTIONS ── */
.instructions {
    background: rgba(255,230,0,0.05);
    border: 1px solid rgba(255,230,0,0.15);
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 0.92rem;
    color: var(--muted);
}

.instructions p { margin: 0; }

/* ── QUESTION ── */
.question-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    animation: slideIn 0.3s cubic-bezier(.22,1,.36,1);
}

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

.question-text {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text);
    line-height: 1.5;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-btn {
    padding: 11px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    font-size: 0.93rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    width: 100%;
}

.option-btn:hover {
    background: rgba(255,45,120,0.12);
    border-color: rgba(255,45,120,0.35);
    color: #fff;
    transform: translateX(3px);
}

.option-btn.selected {
    background: rgba(255,45,120,0.18);
    border-color: var(--primary);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 0 0 1px var(--primary) inset, 0 2px 12px rgba(255,45,120,0.2);
}

/* ── RESULTS ── */
.results {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
    display: none;
}

.verdict-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(255,45,120,0.12) 0%, rgba(123,47,255,0.12) 100%);
    border: 1px solid rgba(255,45,120,0.3);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    animation: fadeUp 0.4s ease;
}

.verdict-emoji {
    font-size: 2.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.verdict-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.verdict-text {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.4;
}

.verdict-text strong {
    color: var(--text);
    font-weight: 600;
}

.verdict-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    overflow: hidden;
}

.verdict-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple), var(--primary), var(--accent));
    transition: width 0.8s cubic-bezier(.34,1.56,.64,1);
}

.verdict-score {
    font-family: 'Boogaloo', cursive;
    font-size: 2.8rem;
    color: var(--primary);
    line-height: 1;
    text-shadow: 0 0 20px rgba(255,45,120,0.5);
    flex-shrink: 0;
}

.verdict-score small {
    font-size: 1rem;
    color: var(--muted);
}

.results h2 {
    font-family: 'Boogaloo', cursive;
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: var(--text);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 24px;
    text-align: center;
}

.results h2 .psycho-highlight {
    color: var(--primary);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 10px;
}

.result-card h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Result progress bars */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    margin: 0 0 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple), var(--primary));
    width: 0;
    transition: width 0.8s cubic-bezier(.34,1.56,.64,1);
}

.result-card:last-child .progress-bar {
    background: linear-gradient(90deg, var(--purple), var(--primary), var(--accent));
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--muted);
    align-items: center;
    margin-top: 4px;
}

.score-value {
    font-family: 'Boogaloo', cursive;
    font-size: 1.2rem;
    color: var(--primary);
    line-height: 1;
}

/* ── CAT NAME INPUT ── */
.cat-name-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cat-name-input label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}

.cat-name-input input {
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.cat-name-input input::placeholder { color: var(--muted); }

.cat-name-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,45,120,0.15);
}

/* Remove the wrapping .results from cat-name-form-section */
#cat-name-form-section {
    background: transparent;
    padding: 0;
    margin: 0;
}

/* ── SHARE ── */
.share-container {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
}

.share-title {
    margin: 0 0 16px;
    color: var(--text);
    font-family: 'Boogaloo', cursive;
    font-size: 1.2rem;
}

/* Step 2 (link + social) hidden until name is entered */
.share-step2 {
    display: none;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.3s ease;
}
.share-step2--visible { display: block; }

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

/* More prominent cat name input in share section */
.share-container .cat-name-input label {
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: none;
    font-weight: 600;
}

.share-container .cat-name-input input {
    border-color: rgba(255,230,0,0.3);
    font-size: 1.1rem;
}

.share-container .cat-name-input input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,230,0,0.15);
}

.share-link-container {
    display: flex;
    margin-bottom: 12px;
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.share-link {
    flex-grow: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border: none;
    font-size: 0.82rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    padding: 10px 18px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
    border-radius: 0;
}

.copy-btn:hover { background: var(--primary-dark); }

.share-success {
    display: none;
    margin-top: 8px;
    padding: 8px 14px;
    background: rgba(80,200,80,0.15);
    border: 1px solid rgba(80,200,80,0.3);
    color: #7ef0a0;
    border-radius: 7px;
    font-size: 0.85rem;
    text-align: center;
}

/* ── SOCIAL SHARE BUTTONS ── */
.social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.resp-sharing-button__link,
.resp-sharing-button__icon {
    display: inline-block;
}

button.resp-sharing-button__link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.resp-sharing-button__link {
    text-decoration: none;
    color: #fff;
    margin: 0;
}

.resp-sharing-button {
    border-radius: 8px;
    transition: 0.18s ease;
    padding: 0.45em 0.8em;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0;
}

.resp-sharing-button__icon svg {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.35em;
    vertical-align: middle;
}

.resp-sharing-button__icon {
    stroke: #fff;
    fill: none;
    line-height: 20px;
    display: flex;
    align-items: center;
}

.resp-sharing-button__icon--solid { fill: #fff; stroke: none; }
.resp-sharing-button__icon--solidcircle { fill: #fff; stroke: none; }

.resp-sharing-button--email .resp-sharing-button__icon--solidcircle {
    fill: none;
    stroke: #fff;
    stroke-width: 1.5;
}

.resp-sharing-button--facebook { background-color: #3b5998; border: 1px solid #3b5998; }
.resp-sharing-button--facebook:hover { background-color: #2d4373; border-color: #2d4373; }
.resp-sharing-button--x { background-color: #111; border: 1px solid #333; }
.resp-sharing-button--x:hover { background-color: #333; }
.resp-sharing-button--email { background-color: #555; border: 1px solid #555; }
.resp-sharing-button--email:hover { background-color: #444; }
.resp-sharing-button--whatsapp { background-color: #25D366; border: 1px solid #25D366; }
.resp-sharing-button--whatsapp:hover { background-color: #1DA851; }
.resp-sharing-button--telegram { background-color: #54A9EB; border: 1px solid #54A9EB; }
.resp-sharing-button--telegram:hover { background-color: #4B97D1; }
.resp-sharing-button--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border: none; }
.resp-sharing-button--instagram:hover { background: linear-gradient(45deg, #d4822b, #ca5a34, #c0213b, #b01e59, #a21376); }

/* ── BUTTONS ── */
button {
    padding: 11px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
}

button:hover { background-color: var(--primary-dark); transform: translateY(-1px); }
button:disabled { background-color: #333; color: var(--muted); cursor: not-allowed; transform: none; }

.reset-btn {
    background: rgba(255,255,255,0.07);
    color: var(--muted);
    border: 1px solid var(--border);
    margin-top: 20px;
    display: inline-block;
    font-size: 0.88rem;
}

.reset-btn:hover { background: rgba(255,255,255,0.12); color: var(--text); transform: none; }

a.reset-btn {
    text-decoration: none;
    padding: 11px 24px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}

.test-my-cat-btn {
    display: block;
    text-decoration: none;
    text-align: center;
    margin-top: 28px;
    padding: 16px 32px;
    border-radius: 12px;
    font-family: 'Boogaloo', cursive;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    box-shadow: 0 4px 24px rgba(255,45,120,0.4), 0 1px 0 rgba(255,255,255,0.1) inset;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    animation: pulse 2.5s ease-in-out infinite;
}

.test-my-cat-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 32px rgba(255,45,120,0.55), 0 1px 0 rgba(255,255,255,0.1) inset;
    animation: none;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(255,45,120,0.4); }
    50%       { box-shadow: 0 4px 36px rgba(255,45,120,0.7), 0 0 0 6px rgba(255,45,120,0.1); }
}

/* ── NAV CONTAINER ── */
.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
    .results-grid { grid-template-columns: 1fr; }
    .result-card:last-child { grid-column: 1; }
    .cat-mascot { width: 80px; height: 80px; }
    h1 { font-size: 1.5rem; }
}
