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

:root {
    --bg: #0A0A0F;
    --card: #16162A;
    --card-border: #2A2A45;
    --accent: #9B1B30;
    --accent-hover: #B8223C;
    --hot: #E63946;
    --purple: #7B2D8E;
    --text: #F5F0EB;
    --muted: #8A8A9A;
    --slider-track: #2A2A45;
    --slider-fill: #9B1B30;
    --radius: 14px;
}

html, body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 20px;
    flex: 1;
    width: 100%;
}

.top-logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo-small {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.logo-small:hover {
    opacity: 1;
}

.logo-small .logo-c {
    font-size: 1.6rem;
    color: var(--accent);
}

.logo-small .logo-heart {
    font-size: 1rem;
    color: var(--hot);
    animation: pulse 2s infinite;
}

.logo-small .logo-text {
    color: var(--text);
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 3rem;
    font-weight: 800;
}

.logo-c {
    color: var(--accent);
    font-size: 3.5rem;
}

.logo-heart {
    color: var(--hot);
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.logo-text {
    color: var(--text);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.tagline {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 320px;
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}

.btn-group form { width: 100%; }

.btn-group button { width: 100%; }

.btn-romance, .btn-coquin, .btn-primary {
    color: white;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-romance {
    background: var(--purple);
}

.btn-romance:hover {
    background: #9333B0;
    transform: translateY(-1px);
}

.btn-coquin, .btn-primary {
    background: var(--accent);
}

.btn-coquin:hover, .btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-romance:active, .btn-coquin:active, .btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--card-border);
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

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

/* Session page */
.session-header {
    text-align: center;
    margin-bottom: 32px;
}

.session-header h1 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.session-id {
    color: var(--muted);
    font-size: 0.8rem;
    font-family: monospace;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.link-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px;
}

.link-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--muted);
}

.link-label strong {
    color: var(--text);
}

.link-row {
    display: flex;
    gap: 8px;
}

.link-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: monospace;
    font-size: 0.75rem;
}

.btn-copy {
    background: var(--purple);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: #9333B0;
}

/* Status / spinner */
.status-waiting, .status-done, .merci-screen {
    text-align: center;
    padding: 32px 0;
    color: var(--muted);
}

.status-done p {
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 700;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--card-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 16px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Questionnaire */
.q-header {
    text-align: center;
    margin-bottom: 32px;
}

.q-header h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.q-header p {
    color: var(--muted);
    font-size: 0.9rem;
}

.mode-tag {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(123, 45, 142, 0.2);
    color: #B07DCC;
}

.mode-tag.mode-coquin {
    background: rgba(155, 27, 48, 0.2);
    color: var(--accent);
}

.categorie-section {
    margin-bottom: 32px;
}

.cat-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--card-border);
}

.question-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
}

.q-label {
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 600;
}

.q-emoji {
    margin-right: 4px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-label {
    font-size: 0.75rem;
    color: var(--muted);
    min-width: 60px;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

.slider-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.slider-values {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 4px;
    font-size: 0.6rem;
    color: var(--muted);
}

.slider-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    min-width: 28px;
    text-align: center;
}

/* Custom range slider */
.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--slider-track);
    outline: none;
    cursor: pointer;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--text);
    cursor: pointer;
    transition: transform 0.15s;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.custom-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--text);
    cursor: pointer;
}

.btn-submit {
    display: block;
    margin: 32px auto 48px;
    font-size: 1.15rem;
    padding: 16px 48px;
}

/* Two columns */
.cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.col {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
}

.col-h { border-color: #2B5EA7; }
.col-f { border-color: #C44A6A; }

.col-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.col-h .col-title { color: #6B9BD3; }
.col-f .col-title { color: #D47A94; }

.etat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.etat-list li {
    font-size: 0.9rem;
    line-height: 1.7;
}

.etat-list li.muted { color: var(--muted); }

.etat-label {
    display: inline-block;
    font-weight: 700;
    color: var(--accent);
    min-width: 70px;
}

.caresses-block {
    margin-top: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    border-top: 1px solid var(--card-border);
    padding-top: 10px;
}

.caresses-block strong { color: var(--purple); }

.caresses-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.caresses-list li {
    background: rgba(123, 45, 142, 0.12);
    color: var(--text);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Results */
.results-header {
    text-align: center;
    margin-bottom: 32px;
}

.results-header h1 {
    font-size: 1.6rem;
}

.subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

.matches-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.match-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.2s;
}

.match-card.hot {
    border-color: var(--hot);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.1);
}

.match-content {
    flex: 1;
}

.match-question {
    font-weight: 600;
    font-size: 0.95rem;
}

.match-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dots {
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent);
}

.dots-label {
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
}

.hot-badge {
    background: var(--hot);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    animation: glow 2s infinite;
    white-space: nowrap;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 8px rgba(230, 57, 70, 0.4); }
    50% { box-shadow: 0 0 20px rgba(230, 57, 70, 0.8); }
}

.no-matches {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.no-matches p {
    margin-bottom: 8px;
}

.results-actions {
    text-align: center;
    margin: 32px 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 0.8rem;
    opacity: 0.5;
}
