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

:root {
    --bg: #1a1a2e;
    --surface: #16213e;
    --surface-light: #1f2f50;
    --accent: #e94560;
    --accent-soft: #ff6b6b;
    --text: #eee;
    --text-dim: #8892b0;
    --input-bg: #0f3460;
    --border: #2a3a5e;
    --success: #4ecdc4;
    --warning: #f39c12;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
}

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.header {
    padding: 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 36px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-soft);
}

.subtitle {
    font-size: 13px;
    color: var(--text-dim);
}

.header-nav {
    display: flex;
    gap: 12px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-light);
}

/* Content */
.content {
    flex: 1;
    padding: 24px 20px;
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step.active {
    display: block;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.step-header.sub {
    margin-top: 28px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238892b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-group.small {
    flex: 1;
    min-width: 100px;
}

.filters-row {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 20px;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 12px 24px;
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-small {
    padding: 6px 14px;
    background: var(--surface-light);
    color: var(--text-dim);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
}

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

.pricing-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 12px;
}

.disclaimer {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 8px;
    opacity: 0.7;
}

/* Personas preview */
.personas-preview {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-dim);
}

.personas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.persona-mini {
    background: var(--surface-light);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}

.persona-mini-name {
    font-weight: 600;
    color: var(--accent-soft);
    margin-bottom: 2px;
}

.persona-mini-info {
    color: var(--text-dim);
    line-height: 1.4;
}

/* Progress */
.progress-info {
    margin-bottom: 24px;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 13px;
    color: var(--text-dim);
}

.progress-personas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.progress-persona {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.progress-persona.done {
    border-color: var(--success);
}

.progress-persona.running {
    border-color: var(--warning);
}

.progress-persona .name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.progress-persona .status-icon {
    float: right;
}

.progress-persona .info {
    color: var(--text-dim);
    font-size: 12px;
}

/* Results */
.results-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 14px;
}

.results-summary h3 {
    color: var(--accent-soft);
    font-size: 15px;
    margin: 16px 0 8px;
}

.results-summary h3:first-child {
    margin-top: 0;
}

.results-summary ul, .results-summary ol {
    padding-left: 20px;
    margin: 8px 0;
}

.results-summary li {
    margin-bottom: 4px;
    color: var(--text-dim);
}

.results-summary strong {
    color: var(--text);
}

.results-summary blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 12px;
    margin: 8px 0;
    color: var(--text-dim);
    font-style: italic;
}

.results-score {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding: 16px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface-light);
    border: 3px solid var(--success);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--success);
    line-height: 1;
}

.score-label {
    font-size: 11px;
    color: var(--text-dim);
}

.score-text {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

.section-title {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text);
}

/* Interview cards */
.interviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.interview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

.interview-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.interview-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.interview-card-name {
    font-weight: 600;
    color: var(--accent-soft);
    font-size: 14px;
}

.interview-card-score {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.interview-card-score.low {
    color: var(--accent);
}

.interview-card-score.mid {
    color: var(--warning);
}

.interview-card-info {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    line-height: 1.4;
}

.interview-card-opinion {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.interview-card-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.interview-card-badge.yes {
    background: rgba(78, 205, 196, 0.15);
    color: var(--success);
}

.interview-card-badge.no {
    background: rgba(233, 69, 96, 0.15);
    color: var(--accent-soft);
}

.interview-card-badge.maybe {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
}

/* Chat modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.modal-persona-info {
    font-size: 14px;
}

.modal-persona-info .name {
    font-weight: 600;
    color: var(--accent-soft);
}

.modal-persona-info .details {
    font-size: 12px;
    color: var(--text-dim);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.2s ease;
}

.chat-msg.user {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.assistant {
    align-self: flex-start;
    background: var(--surface-light);
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.chat-input input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--accent);
}

.btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* Mobile */
@media (max-width: 600px) {
    .header {
        padding: 12px 16px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .content {
        padding: 16px;
    }

    .filters-row {
        flex-wrap: wrap;
    }

    .form-group.small {
        min-width: 80px;
    }

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

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

    .modal-content {
        height: 90vh;
    }

    .results-score {
        flex-direction: column;
        text-align: center;
    }
}
