/* Prokrastinations-Agent - Main Stylesheet */

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

:root {
    --primary: #6D5D7E;
    --primary-hover: #7F7090;
    --primary-light: #B5A4C7;
    --secondary: #528584;
    --bg-main: #F8F7FA;
    --bg-surface: #FFFFFF;
    --border: #E4DFE9;
    --border-medium: #D1C6DC;
    --text-primary: #4E3F5E;
    --text-secondary: #8A7B9A;
    --text-tertiary: #B5A4C7;
    --success: #52C41A;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
}

/* ===== SCREEN 1 & 5: Welcome / Thank You ===== */
.landing-container {
    max-width: 700px;
    margin: 80px auto;
    padding: 0 24px;
}

.landing-card {
    background: var(--bg-surface);
    border-radius: 24px;
    padding: 56px 48px;
    box-shadow: 0 4px 24px rgba(78, 63, 94, 0.12);
    text-align: center;
}

.landing-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 8px 20px rgba(109, 93, 126, 0.3);
}

.landing-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.landing-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.landing-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: left;
}

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

.info-box {
    background: linear-gradient(135deg, rgba(109, 93, 126, 0.08) 0%, rgba(82, 133, 132, 0.08) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    margin: 24px 0;
    text-align: left;
}

.info-box-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-box ul {
    margin: 12px 0 0 20px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.primary-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(109, 93, 126, 0.3);
    margin-top: 32px;
    text-decoration: none;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(109, 93, 126, 0.4);
}

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

.footer-note {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

.footer-note strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===== SCREEN 2 & 4: Questionnaires ===== */
.questionnaire-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 24px;
}

.questionnaire-card {
    background: var(--bg-surface);
    border-radius: 20px;
    padding: 40px 48px;
    box-shadow: 0 4px 20px rgba(78, 63, 94, 0.1);
}

.questionnaire-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.questionnaire-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.questionnaire-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.question-block {
    margin-bottom: 36px;
}

.question-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

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

.scale-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.scale-label {
    font-size: 12px;
    color: var(--text-secondary);
    width: 100px;
    flex-shrink: 0;
}

.scale-label.right {
    text-align: right;
}

.scale-options {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.scale-option {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.scale-option:hover {
    border-color: var(--primary-light);
    background: rgba(109, 93, 126, 0.05);
}

.scale-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(109, 93, 126, 0.3);
}

.questionnaire-footer {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-text strong {
    color: var(--primary);
    font-weight: 700;
}

/* ===== SCREEN 3: Chat ===== */
.chat-container {
    display: flex;
    height: 100vh;
}

.chat-sidebar {
    width: 320px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(250, 249, 252, 1) 100%);
    border-right: 1px solid var(--border);
    padding: 32px 24px;
}

.chat-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chat-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.timeline-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.timeline-item {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 5px;
    flex-shrink: 0;
}

.timeline-dot.completed {
    background: var(--success);
}

.timeline-dot.pending {
    background: white;
    border: 2px solid var(--border-medium);
}

.timeline-text {
    flex: 1;
}

.timeline-phase {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.timeline-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.chat-main {
    flex: 1;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px 48px;
}

.chat-message {
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chat-message-content {
    flex: 1;
    max-width: 70%;
}

.chat-message.user .chat-message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 18px 18px 4px 18px;
}

.chat-message.assistant .chat-message-content {
    background: var(--bg-main);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 18px 18px 18px 4px;
}

.chat-input-container {
    border-top: 1px solid var(--border);
    padding: 24px 48px;
    background: var(--bg-surface);
}

.chat-input-form {
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109, 93, 126, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .landing-card {
        padding: 40px 32px;
    }

    .questionnaire-card {
        padding: 32px 24px;
    }

    .scale-container {
        flex-direction: column;
        gap: 16px;
    }

    .scale-label {
        width: 100%;
        text-align: center !important;
    }

    .chat-sidebar {
        display: none;
    }

    .chat-messages {
        padding: 24px 16px;
    }

    .chat-input-container {
        padding: 16px;
    }
}
