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

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
    background: #07111f;
    color: #ffffff;
    overflow-x: hidden;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 28%),
        linear-gradient(135deg, #07111f 0%, #0f172a 45%, #111827 100%);
}

.gradient-circle {
    position: absolute;
    border-radius: 999px;
    filter: blur(60px);
    opacity: 0.45;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: #2563eb;
    top: 8%;
    left: 5%;
}

.circle-2 {
    width: 260px;
    height: 260px;
    background: #9333ea;
    top: 20%;
    right: 8%;
}

.circle-3 {
    width: 220px;
    height: 220px;
    background: #14b8a6;
    bottom: 8%;
    left: 35%;
}

.app-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0 30px;
}

.hero-section {
    text-align: center;
    margin-bottom: 34px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    color: #c4b5fd;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-section h1 {
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -0.06em;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff, #93c5fd, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    max-width: 760px;
    margin: 0 auto;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
}

.glossy-portfolio-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(96, 165, 250, 0.14) 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 1px 1.5px rgba(255, 255, 255, 0.7),
        0 10px 30px rgba(37, 99, 235, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    cursor: pointer;
}

.glossy-portfolio-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
}

.glossy-portfolio-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.65);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(168, 85, 247, 0.22) 100%);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.95),
        0 14px 42px rgba(147, 51, 234, 0.45),
        0 0 24px rgba(56, 189, 248, 0.35);
}

.glossy-portfolio-btn:hover::before {
    left: 140%;
}

.glossy-sparkle {
    font-size: 1rem;
    animation: sparkleSpin 3s ease-in-out infinite;
}

@keyframes sparkleSpin {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(15deg);
    }
}

.glossy-btn-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: -0.01em;
}

.glossy-btn-pill {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

.glossy-btn-arrow {
    color: #93c5fd;
    transition: transform 0.25s ease, color 0.25s ease;
}

.glossy-portfolio-btn:hover .glossy-btn-arrow {
    transform: translate(2px, -2px);
    color: #ffffff;
}

.planner-card,
.result-section {
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    border-radius: 28px;
}

.planner-card {
    padding: 28px;
}

.card-header,
.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.card-header h2,
.result-header h2 {
    font-size: 1.45rem;
    margin-bottom: 8px;
}

.card-header p,
.result-header p {
    color: #94a3b8;
    line-height: 1.5;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
    padding: 8px 13px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 18px #22c55e;
}

.input-area {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: stretch;
}

textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.64);
    color: #ffffff;
    padding: 20px;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
    transition: 0.25s ease;
}

textarea:focus {
    border-color: rgba(96, 165, 250, 0.85);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

textarea::placeholder {
    color: #64748b;
}

#sendBtn {
    position: relative;
    min-width: 175px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 22px;
    padding: 0 26px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92) 0%, rgba(124, 58, 237, 0.88) 50%, rgba(147, 51, 234, 0.82) 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        inset 0 1px 1.5px rgba(255, 255, 255, 0.75),
        inset 0 -2px 4px rgba(0, 0, 0, 0.25),
        0 12px 36px rgba(37, 99, 235, 0.38),
        0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#sendBtn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
    pointer-events: none;
}

#sendBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.65);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.98) 0%, rgba(124, 58, 237, 0.94) 50%, rgba(168, 85, 247, 0.9) 100%);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.95),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        0 16px 48px rgba(124, 58, 237, 0.48),
        0 0 24px rgba(56, 189, 248, 0.35);
}

#sendBtn:hover:not(:disabled)::before {
    left: 140%;
}

#sendBtn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.5),
        0 6px 20px rgba(37, 99, 235, 0.3);
}

#sendBtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.quick-prompts button {
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.7);
    color: #dbeafe;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    transition: 0.2s ease;
}

.quick-prompts button:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(96, 165, 250, 0.5);
}

.result-section {
    margin-top: 26px;
    padding: 28px;
}

.result-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.copy-btn,
.download-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
    transition: 0.25s ease;
}

.copy-btn {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
}

.copy-btn:hover {
    background: rgba(59, 130, 246, 0.22);
}

.download-btn {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.25);
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(34, 197, 94, 0.35);
}

.pdf-content {
    background: #ffffff;
    color: #111827;
    border-radius: 22px;
    padding: 28px;
}

.pdf-title {
    display: none;
    color: #111827;
    font-size: 2rem;
    margin-bottom: 20px;
}

.result-box {
    background: #ffffff;
    color: #1f2937;
    border: none;
    padding: 0;
    white-space: normal;
    overflow-x: auto;
}

.result-box h1,
.result-box h2,
.result-box h3 {
    color: #0f172a;
    margin-top: 26px;
    margin-bottom: 12px;
    line-height: 1.25;
    font-weight: 800;
}

.result-box h1:first-child,
.result-box h2:first-child,
.result-box h3:first-child {
    margin-top: 0;
}

.result-box h1 {
    font-size: 2rem;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 10px;
}

.result-box h2 {
    font-size: 1.45rem;
    border-left: 5px solid #2563eb;
    padding-left: 12px;
    background: #eff6ff;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 10px;
}

.result-box h3 {
    font-size: 1.15rem;
    color: #1d4ed8;
}

.result-box p {
    margin-bottom: 14px;
    line-height: 1.75;
    color: #374151;
}

.result-box ul,
.result-box ol {
    margin: 10px 0 18px 24px;
    color: #374151;
}

.result-box li {
    margin-bottom: 8px;
    line-height: 1.65;
}

.result-box strong {
    color: #111827;
    font-weight: 800;
}

.result-box hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 24px 0;
}

.result-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    color: #374151;
}

.result-box th,
.result-box td {
    border: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
}

.result-box th {
    background: #eff6ff;
    color: #111827;
    font-weight: 800;
}

.error-box {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(239, 68, 68, 0.13);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    line-height: 1.5;
}

/* =========================================
   Travel Agent Workflow Stepper (Progress Card)
   ========================================= */

.agent-progress-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 28px;
    padding: 26px 32px 30px;
    margin-top: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.85);
    animation: fadeInSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.progress-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.progress-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.progress-plane-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}

.progress-title-wrap h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
}

#agentStatusText {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 500;
    transition: all 0.3s ease;
}

.agent-active-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.35);
    }
}

/* Stepper horizontal track & steps */
.stepper-wrapper {
    position: relative;
    padding: 0 36px;
    margin-top: 18px;
}

.stepper-track-container {
    position: absolute;
    top: 39px;
    left: 81px;
    right: 81px;
    height: 3px;
    z-index: 1;
    overflow: hidden;
    border-radius: 999px;
}

.stepper-track-bg {
    position: absolute;
    inset: 0;
    height: 3px;
    background: #e2e8f0;
    border-radius: 999px;
}

.stepper-track-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    height: 3px;
    background: #22c55e;
    border-radius: 999px;
    z-index: 2;
    width: 0%;
    transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    text-align: center;
}

/* Caret indicator above active step */
.step-caret-wrap {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s ease;
}

.step-caret-svg {
    color: #22c55e;
}

.stepper-step.active .step-caret-wrap {
    opacity: 1;
    transform: translateY(0);
}

.stepper-step.active .step-caret-svg {
    animation: caretBounce 1.1s ease-in-out infinite;
}

@keyframes caretBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* Step Circle */
.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 4;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
}

.stepper-step.active .step-circle {
    border-color: #22c55e;
    background: #22c55e;
    color: #ffffff;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.22);
    transform: scale(1.05);
}

.stepper-step.completed .step-circle {
    border-color: #22c55e;
    background: #22c55e;
    color: #ffffff;
}

.step-check-svg {
    color: #ffffff;
}

.stepper-step.completed .step-check-svg {
    animation: checkPop 0.35s ease forwards;
}

@keyframes checkPop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Step Labels */
.step-label-wrap {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.step-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.stepper-step.active .step-title {
    color: #0f172a;
    font-weight: 800;
}

.stepper-step.completed .step-title {
    color: #1e293b;
    font-weight: 700;
}

.step-agent-name {
    font-size: 11px;
    font-weight: 500;
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.stepper-step.active .step-agent-name {
    color: #16a34a;
    font-weight: 700;
}

.stepper-step.completed .step-agent-name {
    color: #64748b;
    font-weight: 500;
}

.loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    color: #64748b;
    padding: 30px 16px 40px;
    font-size: 0.92rem;
}

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

@media print {
    body {
        background: #ffffff;
    }

    .planner-card,
    .hero-section,
    footer,
    .result-actions,
    #threadInfo {
        display: none;
    }

    .result-section {
        box-shadow: none;
        border: none;
        background: #ffffff;
    }

    .pdf-title {
        display: block;
    }
}

@media (max-width: 760px) {
    .app-container {
        padding-top: 34px;
    }

    .planner-card,
    .result-section {
        padding: 20px;
        border-radius: 22px;
    }

    .agent-progress-card {
        padding: 20px 16px 24px;
        border-radius: 20px;
    }

    .progress-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stepper-wrapper {
        padding: 0 10px;
    }

    .stepper-track-container {
        left: 40px;
        right: 40px;
        top: 34px;
    }

    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .step-caret-wrap {
        height: 18px;
    }

    .step-title {
        font-size: 11.5px;
    }

    .step-agent-name {
        font-size: 9.5px;
    }

    .stepper-step {
        width: 60px;
    }

    .card-header,
    .result-header {
        flex-direction: column;
    }

    .input-area {
        grid-template-columns: 1fr;
    }

    #sendBtn {
        min-height: 56px;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .result-actions {
        width: 100%;
    }

    .copy-btn,
    .download-btn {
        flex: 1;
    }

    .pdf-content {
        padding: 20px;
    }
}