:root {
    --bg: #0A0A0A;
    --bg-card: #141414;
    --bg-card-hover: #1E1E1E;
    --purple: #CC0000;
    --purple-light: #E62222;
    --purple-glow: rgba(204, 0, 0, 0.25);
    --purple-subtle: rgba(204, 0, 0, 0.08);
    --purple-border: rgba(204, 0, 0, 0.3);
    --white: #FFFFFF;
    --text: #E8E4E4;
    --text-muted: #8A8484;
    --text-dim: #5A5555;
    --border: #2A2A2A;
    --input-bg: #0E0E0E;
    --success: #5BCA7B;
    --radius: 14px;
}

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

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(204, 0, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.back-home {
    display: inline-block;
    color: var(--purple-light);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 12px 20px;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--white);
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 20px 100px;
    position: relative;
    z-index: 1;
}

/* PROGRESS */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--border);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--purple-light));
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px var(--purple-glow);
}

.progress-text {
    position: fixed;
    top: 8px;
    right: 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    z-index: 101;
    letter-spacing: 0.03em;
}

/* HEADER */
.header {
    text-align: center;
    padding: 40px 0 48px;
    animation: fadeUp 0.7s ease-out;
}

.logo {
    max-width: 220px;
    height: auto;
    margin: 0 auto 28px;
    display: block;
    filter: drop-shadow(0 4px 24px rgba(204, 0, 0, 0.35));
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    margin-bottom: 8px;
}

.header .subtitle {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto 20px;
    font-weight: 300;
    line-height: 1.7;
}

.header .meta-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--purple-light);
    background: var(--purple-subtle);
    border: 1px solid var(--purple-border);
    padding: 6px 14px;
    border-radius: 20px;
}

/* SECTIONS */
.section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px 30px 28px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.6s ease-out both;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.section:hover::before {
    opacity: 1;
}

.section:nth-child(2) {
    animation-delay: 0.05s;
}

.section:nth-child(3) {
    animation-delay: 0.10s;
}

.section:nth-child(4) {
    animation-delay: 0.15s;
}

.section:nth-child(5) {
    animation-delay: 0.20s;
}

.section:nth-child(6) {
    animation-delay: 0.25s;
}

.section:nth-child(7) {
    animation-delay: 0.30s;
}

.section:nth-child(8) {
    animation-delay: 0.35s;
}

.section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--purple-light);
    margin-bottom: 8px;
}

.section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.section .hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 300;
}

/* FIELDS */
.field {
    margin-bottom: 22px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: flex;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.field label .req {
    color: var(--purple-light);
    margin-left: 2px;
}

.field .field-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-weight: 400;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 16px;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-glow);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-dim);
    font-weight: 300;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.inline-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.inline-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

/* RADIO */
.options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.options-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.options-horizontal .option-item {
    flex: 1 1 0;
    min-width: 100px;
}

.option-item {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    user-select: none;
}

.option-item:hover {
    border-color: var(--purple-border);
    background: var(--bg-card-hover);
}

.option-item input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--text-dim);
    border-radius: 50%;
    margin: 0;
    flex-shrink: 0;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: transparent;
}

.option-item input[type="radio"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--purple-light);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-item input[type="radio"]:checked {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15);
}

.option-item input[type="radio"]:checked::after {
    transform: translate(-50%, -50%) scale(1);
}

.option-item .dot {
    display: none;
}

.option-item .opt-text {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

.option-item:has(input[type="radio"]:checked) {
    border-color: var(--purple);
    background: var(--purple-subtle);
}

.option-item input[type="radio"]:checked~.opt-text {
    font-weight: 600;
    color: var(--white);
}

/* Horizontal radio (kafelki) */
.options-horizontal .option-item {
    justify-content: center;
    text-align: center;
    padding: 10px 12px;
}

.options-horizontal .option-item input[type="radio"] {
    display: none;
}

.options-horizontal .option-item .opt-text {
    font-size: 13px;
}

/* CHECKBOX */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.check-item {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 13px;
}

.check-item:hover {
    border-color: var(--purple-border);
    background: var(--bg-card-hover);
}

.check-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--text-dim);
    border-radius: 5px;
    margin: 0;
    flex-shrink: 0;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    background: transparent;
}

.check-item input[type="checkbox"]:checked {
    background: var(--purple);
    border-color: var(--purple);
}

.check-item input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.check-item .box {
    display: none;
}

.check-item:has(input[type="checkbox"]:checked) {
    border-color: var(--purple);
    background: var(--purple-subtle);
}

.check-item input[type="checkbox"]:checked~.chk-text {
    font-weight: 600;
    color: var(--white);
}

.chk-text {
    color: var(--text);
    line-height: 1.4;
}

/* SCALE */
.scale-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scale-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.scale-item:hover {
    border-color: var(--purple-border);
    color: var(--text);
}

.scale-item.active {
    background: var(--purple);
    color: var(--white);
    border-color: var(--purple);
    box-shadow: 0 0 16px var(--purple-glow);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 6px;
    font-weight: 300;
}

/* RODO */
.rodo-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rodo-item {
    align-items: flex-start;
    padding: 14px 16px;
}

.rodo-item input[type="checkbox"] {
    margin-top: 2px;
}

.rodo-item .chk-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

.rodo-item input:checked~.chk-text {
    color: var(--text);
}

/* DIVIDER */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* SUBMIT */
.submit-area {
    text-align: center;
    margin-top: 28px;
    animation: fadeUp 0.6s ease-out 0.4s both;
}

.btn-submit {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    border: none;
    padding: 16px 56px;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 24px var(--purple-glow);
    letter-spacing: 0.02em;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(204, 0, 0, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.submit-note {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 14px;
    font-weight: 300;
}

.signature {
    margin-top: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.01em;
}

/* VALIDATION */
.field.has-error input[type="text"],
.field.has-error textarea {
    border-color: #e05252;
    box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.15);
}

.field.has-error .option-item,
.field.has-error .check-item,
.rodo-checks.has-error .check-item {
    border-color: #e05252;
}

.field-error {
    font-size: 12px;
    color: #e05252;
    margin-top: 4px;
    display: none;
    font-weight: 500;
}

.field.has-error .field-error {
    display: block;
}

/* SUCCESS OVERLAY */
.success-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 200;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    overflow-y: auto;
}

.success-overlay.show {
    display: flex;
}

.success-content {
    max-width: 520px;
    animation: fadeUp 0.6s ease-out;
}

.success-check {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    animation: popIn 0.5s ease-out;
    box-shadow: 0 0 60px var(--purple-glow);
}

.success-check svg {
    width: 46px;
    height: 46px;
    stroke: white;
}

.success-overlay h2 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.success-overlay .success-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 40px;
    font-weight: 300;
    line-height: 1.7;
}

.success-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    text-align: left;
}

.success-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.step-number {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: var(--purple-subtle);
    border: 1px solid var(--purple-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--purple-light);
}

.step-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.step-text p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.6;
}

.success-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.success-footer p {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
}

.success-footer .name {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--white);
    font-weight: 600;
    margin-top: 8px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 520px) {
    .container {
        padding: 20px 14px 70px;
    }

    .section {
        padding: 24px 20px 22px;
    }

    .inline-row,
    .inline-row-3,
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 26px;
    }

    .logo {
        max-width: 170px;
    }

    .success-overlay h2 {
        font-size: 28px;
    }

    .success-step {
        padding: 16px 18px;
    }

    .options-horizontal {
        flex-direction: column;
    }

    .options-horizontal .option-item {
        min-width: unset;
        width: 100%;
    }

    .option-item {
        padding: 10px 14px;
    }

    .option-item .opt-text {
        white-space: normal;
    }
}