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

:root {
    --wizard-bg: radial-gradient(circle at 20% 20%, #1d2e48 0%, #0f1b2e 50%, #0b1422 100%);
    --panel-bg: linear-gradient(135deg, rgba(12, 22, 38, 0.94), rgba(10, 18, 32, 0.9));
    --panel-border: rgba(255, 255, 255, 0.07);
    --panel-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
    --text-main: #e9f0ff;
    --text-secondary: #cddbf2;
    --accent: #4da3ff;
    --accent-2: #7ae0ff;
    --danger: #ff7b7b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--wizard-bg);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-main);
}

.option-btn-center {
    grid-column: 1 / span 2;
    justify-self: center;
    width: calc(50% - 8px);
}

.audio-section {
    margin: 30px 0;
    padding: 25px;
    background: rgba(15, 25, 40, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

.features .feature:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 340px;
    width: 100%;
}

.audio-section h2 {
    margin-bottom: 20px;
    color: var(--accent-2);
}

.audio-grid {
    display: grid;
    gap: 15px;
}

.audio-item {
    padding: 15px;
    background: rgba(10, 18, 32, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.audio-item p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.audio-item audio {
    width: 100%;
    height: 40px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.auth-card, .setup-card, .step-settings {
    background: rgba(5, 10, 18, 0.75);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    color: var(--text-main);
}

.logo {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2rem;
    color: var(--text-main);
    margin-bottom: 12px;
    text-align: center;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 16px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: center;
}

.welcome-screen .lead:last-of-type {
    margin-top: 20px;
    margin-bottom: 28px;
}

.welcome-cta {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(12, 19, 32, 0.8);
    border: 1px solid var(--panel-border);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
    color: var(--text-main);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(74, 163, 255, 0.25);
    background-color: rgba(12, 19, 32, 0.92);
}

input::placeholder,
textarea::placeholder {
    color: rgba(233, 240, 255, 0.55);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3f78ff, #5ab2ff);
    color: white;
    width: 100%;
    border: none;
    box-shadow: 0 10px 22px rgba(63, 120, 255, 0.45);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3568e5, #4a9fe5);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(63, 120, 255, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-success {
    background: #48bb78;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #38a169;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.error-message {
    background: rgba(255, 123, 123, 0.12);
    border: 1px solid rgba(255, 123, 123, 0.35);
    color: #ffb3b3;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.success-message {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #b8f5dc;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.toggle-auth {
    margin-top: 24px;
    text-align: center;
}

.link-btn {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
}

.link-btn:hover {
    text-decoration: underline;
}

.setup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.welcome-screen {
    text-align: center;
}

.video-placeholder {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 32px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(90, 178, 255, 0.25), rgba(12, 22, 38, 0.92));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    cursor: pointer;
    z-index: 0;
}

.video-icon::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(63, 120, 255, 0.3), rgba(90, 178, 255, 0.15));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-icon:hover::before {
    opacity: 1;
}

.video-container {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid rgba(90, 178, 255, 0.3);
    box-shadow: 0 8px 24px rgba(63, 120, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto 24px auto;
    flex-shrink: 0;
}

.video-container#video-container-final {
    margin-top: 12px;
}

.video-circle {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
    background: #000;
}

.video-container#video-container-final .video-circle {
    object-position: center 22%;
}

/* Видео в шагах: фокус по центру */
.step-media .video-circle {
    object-position: center;
}

.video-container:hover {
    border-color: rgba(90, 178, 255, 0.6);
    box-shadow: 0 12px 32px rgba(63, 120, 255, 0.4);
}

.video-progress-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    transform: rotate(-90deg);
    pointer-events: none;
}

.video-progress-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: none;
}

.video-play-button.visible {
    display: flex;
}

.video-caption {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.video-text {
    font-size: 16px;
    line-height: 1.6;
    font-style: italic;
}

.step-description {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.step-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: center;
}

.step-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

@media (max-width: 768px) {
    .step-intro {
        grid-template-columns: 1fr;
    }
}

.step-description h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.step-description p {
    color: var(--text-secondary);
    opacity: 0.92;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.row.g-3 {
    gap: 1rem;
}

.col-md-5, .col-md-7 {
    padding: 0 0.75rem;
}

.col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

.col-md-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
}

@media (max-width: 768px) {
    .col-md-5, .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
    justify-content: center;
    justify-items: stretch;
    gap: 20px;
    max-width: 740px;
    margin: 0 auto;
}

.feature {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

.feature-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 4px;
}

.feature p {
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.9;
}

.time-notice {
    background: rgba(243, 156, 18, 0.12);
    border: 1px solid rgba(243, 156, 18, 0.35);
    color: #ffd89b;
    padding: 16px;
    border-radius: 10px;
    margin: 24px 0;
    font-size: 16px;
}

.progress-container {
    margin-bottom: 32px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5ab2ff, #3f78ff);
    box-shadow: 0 0 20px rgba(90, 178, 255, 0.8), 0 0 40px rgba(90, 178, 255, 0.4);
    transition: width 0.3s ease;
    border-radius: 999px;
}

.step-slide {
    margin-bottom: 32px;
    animation: fadeIn 0.25s ease-in;
}

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

.video-placeholder-small {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
}

.video-icon-small {
    font-size: 32px;
}

.video-text-small {
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
}

.step-title {
    font-size: 1.75rem;
    color: var(--text-main);
    margin-bottom: 24px;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 0.375rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #3f78ff, #5ab2ff);
    color: #0b1422;
    border: none;
    box-shadow: 0 6px 14px rgba(63, 120, 255, 0.45);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-main);
}

.option-btn:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.option-btn.selected {
    border-color: var(--accent);
    background: rgba(77, 163, 255, 0.15);
    box-shadow: 0 6px 18px rgba(63, 120, 255, 0.22);
}

.option-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 16px;
}

.option-desc {
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.9;
}

.checkbox-btn {
    position: relative;
}

.checkbox {
    font-size: 24px;
    margin-right: 8px;
}

.custom-input {
    margin-top: 16px;
}

.custom-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 16px;
    resize: vertical;
    font-family: inherit;
}

.text-input-large {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--panel-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-radius: 12px;
    font-size: 16px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 16px;
}

.text-input-large:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.text-input-container {
    margin-bottom: 20px;
}

.voice-recorder {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
}

.btn-voice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-voice:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
}

.recording-indicator {
    font-size: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.recording-timer {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
}

.audio-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 8px;
}

.audio-preview audio {
    flex: 1;
    height: 40px;
}

.moderation-question {
    margin-top: 24px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.moderation-question h3 {
    margin-bottom: 16px;
    color: #2d3748;
}

.navigation-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.navigation-buttons .btn {
    flex: 1;
}

.summary-card {
    max-width: 1200px;
    margin: 0 auto;
}

.success-icon {
    font-size: 80px;
    text-align: center;
    margin-bottom: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 32px 0;
    align-items: stretch;
}

.summary-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    min-height: 140px;
    border: 1px solid var(--panel-border);
    overflow: hidden;
}

.summary-item-cta {
    grid-column: 2;
}

.summary-item h3 {
    color: var(--text-main);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.summary-item p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.summary-item audio {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
}

.summary-item ul {
    list-style: none;
    padding-left: 0;
}

.summary-item li {
    color: #4a5568;
    padding: 4px 0 4px 20px;
    position: relative;
}

.summary-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.custom-value {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-top: 8px;
    font-style: italic;
    color: #2d3748;
}

.next-steps {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 16px;
}

.action-buttons {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 250px;
}

.final-message {
    text-align: center;
    margin-top: 32px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.footer-actions {
    margin-top: 32px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 32px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .auth-card, .setup-card, .summary-card {
        padding: 24px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .option-btn-center {
        grid-column: auto;
        width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-item-cta {
        grid-column: auto;
    }

    .action-buttons {
        flex-direction: column;
    }
}
