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

:root {
    --bg: #07111f;
    --panel: #0d1b2a;
    --panel-light: #13263a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #00a8e8;
    --accent-light: #67e8f9;
    --success: #4ade80;
    --warning: #facc15;
    --danger: #f87171;
    --border: rgba(148, 163, 184, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(0, 168, 232, 0.16),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 90%,
            rgba(14, 116, 144, 0.12),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #07111f,
            #030712
        );

    color: var(--text);
}

#root {
    min-height: 100vh;
}

/* ==============================
   APP
================================ */

.app {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 28px 18px;
}

/* ==============================
   MAIN CARD
================================ */

.card {
    width: 100%;
    max-width: 820px;

    padding: 42px;

    border: 1px solid var(--border);
    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(13, 27, 42, 0.96),
            rgba(7, 17, 31, 0.94)
        );

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(20px);
}

/* ==============================
   HEADER
================================ */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 8px 15px;

    border: 1px solid rgba(103, 232, 249, 0.25);
    border-radius: 999px;

    background: rgba(0, 168, 232, 0.10);

    color: var(--accent-light);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.5px;

    margin-bottom: 18px;
}

h1 {
    font-size: 44px;
    line-height: 1.1;

    margin-bottom: 10px;

    letter-spacing: -1px;
}

.subtitle {
    color: var(--muted);

    font-size: 16px;

    margin-bottom: 32px;
}

/* ==============================
   ASSISTANT
================================ */

.assistant-circle {
    width: 132px;
    height: 132px;

    margin: 0 auto 16px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 35% 30%,
            #b6f8ff,
            #00a8e8 45%,
            #075985 100%
        );

    color: white;

    font-size: 32px;
    font-weight: 800;

    box-shadow:
        0 0 0 10px rgba(0, 168, 232, 0.06),
        0 0 45px rgba(0, 168, 232, 0.35);

    animation: assistantPulse 3s infinite ease-in-out;
}

@keyframes assistantPulse {

    0%,
    100% {
        transform: scale(1);

        box-shadow:
            0 0 0 10px rgba(0, 168, 232, 0.06),
            0 0 45px rgba(0, 168, 232, 0.35);
    }

    50% {
        transform: scale(1.04);

        box-shadow:
            0 0 0 18px rgba(0, 168, 232, 0.04),
            0 0 65px rgba(0, 168, 232, 0.5);
    }
}

.status {
    text-align: center;

    color: var(--success);

    font-size: 14px;
    font-weight: 700;

    margin-bottom: 26px;
}

/* ==============================
   VOICE
================================ */

.voice-area {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 8px;

    margin-bottom: 24px;
}

.voice-button {
    width: 60px;
    height: 60px;

    padding: 0;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 168, 232, 0.13);

    border: 1px solid rgba(103, 232, 249, 0.30);

    box-shadow:
        0 0 20px rgba(0, 168, 232, 0.08);
}

.voice-button:hover {
    transform: scale(1.06);

    box-shadow:
        0 0 28px rgba(0, 168, 232, 0.20);
}

.voice-button.listening {
    animation: voicePulse 0.9s infinite;

    background:
        rgba(0, 168, 232, 0.35);
}

@keyframes voicePulse {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.14);
    }

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

.voice-area span {
    color: var(--muted);

    font-size: 12px;
}

/* ==============================
   INPUT
================================ */

.input-area {
    display: flex;

    gap: 10px;

    width: 100%;
}

input {
    flex: 1;

    min-width: 0;

    padding: 15px 17px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.045);

    color: white;

    font-size: 16px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

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

input:focus {
    border-color:
        rgba(103, 232, 249, 0.65);

    background:
        rgba(255, 255, 255, 0.06);

    box-shadow:
        0 0 0 3px rgba(0, 168, 232, 0.08);
}

/* ==============================
   BUTTONS
================================ */

button {
    border: none;

    padding: 15px 20px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #00a8e8,
            #0284c7
        );

    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 25px rgba(0, 168, 232, 0.25);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

/* ==============================
   TOOL INDICATOR
================================ */

.tool-indicator {
    display: block;

    width: fit-content;

    margin: 18px auto 0;

    padding: 7px 12px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.045);

    border: 1px solid var(--border);

    color: var(--muted);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.2px;
}

/* ==============================
   QUICK ACTIONS
================================ */

.quick-actions {
    margin-top: 26px;

    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.025);
}

.quick-title {
    margin-bottom: 12px;

    color: var(--muted);

    font-size: 13px;
    font-weight: 700;
}

.quick-buttons {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 9px;
}

.quick-button {
    padding: 12px;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.035);

    color: #cbd5e1;

    font-size: 12px;

    text-align: left;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.quick-button:hover {
    background:
        rgba(0, 168, 232, 0.10);

    border-color:
        rgba(103, 232, 249, 0.3);

    transform: translateY(-1px);
}

/* ==============================
   RESPONSE
================================ */

.response {
    margin-top: 24px;

    padding: 24px;

    min-height: 100px;

    border:
        1px solid var(--border);

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(3, 7, 18, 0.55),
            rgba(13, 27, 42, 0.35)
        );

    color: #cbd5e1;

    text-align: left;

    line-height: 1.6;

    overflow-wrap: break-word;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.response h3 {
    color: white;

    margin-bottom: 16px;

    font-size: 19px;
}

.response p {
    color: #cbd5e1;
}

/* ==============================
   TOOL LABEL
================================ */

.tool-label {
    display: inline-block;

    margin-bottom: 14px;

    padding: 5px 10px;

    border-radius: 999px;

    background:
        rgba(0, 168, 232, 0.10);

    border:
        1px solid rgba(103, 232, 249, 0.15);

    color: var(--accent-light);

    font-size: 11px;
    font-weight: 700;
}

/* ==============================
   STUDY PLAN
================================ */

.plan-day {
    margin-bottom: 12px;

    padding: 15px;

    border-left:
        3px solid var(--accent);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.04);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.plan-day:hover {
    transform: translateX(3px);

    background:
        rgba(0, 168, 232, 0.06);
}

.plan-day strong {
    display: block;

    color: var(--accent-light);

    margin-bottom: 5px;
}

.plan-day p {
    color: #e2e8f0;

    margin-bottom: 4px;
}

.plan-day small {
    color: var(--muted);
}

/* ==============================
   RESOURCES
================================ */

.resource-item {
    margin-bottom: 12px;

    padding: 15px;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.04);

    border:
        1px solid rgba(255, 255, 255, 0.04);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.resource-item:hover {
    transform: translateX(3px);

    background:
        rgba(0, 168, 232, 0.06);
}

.resource-item strong {
    display: block;

    color: var(--accent-light);

    margin-bottom: 5px;
}

.resource-item p {
    color: var(--muted);
}

/* ==============================
   CONVERSATION
================================ */

.conversation {
    margin-top: 24px;

    display: flex;

    flex-direction: column;

    gap: 12px;

    max-height: 420px;

    overflow-y: auto;

    padding-right: 4px;
}

.conversation::-webkit-scrollbar {
    width: 5px;
}

.conversation::-webkit-scrollbar-thumb {
    background:
        rgba(103, 232, 249, 0.20);

    border-radius: 999px;
}

.conversation-message {
    padding: 15px;

    border-radius: 16px;

    border:
        1px solid var(--border);

    animation:
        messageAppear 0.25s ease;
}

@keyframes messageAppear {

    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.conversation-message.user {
    margin-left: 12%;

    background:
        rgba(0, 168, 232, 0.08);

    border-color:
        rgba(0, 168, 232, 0.16);
}

.conversation-message.assistant {
    margin-right: 8%;

    background:
        rgba(255, 255, 255, 0.035);
}

.message-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 8px;
}

.message-header strong {
    color: var(--accent-light);

    font-size: 13px;
}

.message-header small {
    color: #64748b;

    font-size: 11px;
}

.message-content {
    color: #cbd5e1;

    font-size: 14px;

    line-height: 1.55;

    overflow-wrap: break-word;
}

/* ==============================
   CLEAR
================================ */

.conversation-area {
    margin-top: 20px;

    text-align: center;
}

.clear-button {
    padding: 9px 14px;

    background: transparent;

    border:
        1px solid var(--border);

    color: var(--muted);

    font-size: 12px;
}

.clear-button:hover {
    color: white;

    background:
        rgba(255, 255, 255, 0.05);

    box-shadow: none;
}

/* ==============================
   MOBILE
================================ */

@media (max-width: 600px) {

    .app {
        padding: 14px;
    }

    .card {
        padding: 28px 17px;

        border-radius: 24px;
    }

    h1 {
        font-size: 34px;
    }

    .subtitle {
        font-size: 14px;
    }

    .assistant-circle {
        width: 110px;
        height: 110px;

        font-size: 27px;
    }

    .input-area {
        flex-direction: column;
    }

    input,
    button {
        width: 100%;
    }

    .response {
        padding: 18px;
    }

    .quick-buttons {
        grid-template-columns: 1fr;
    }

    .conversation-message.user {
        margin-left: 4%;
    }

    .conversation-message.assistant {
        margin-right: 4%;
    }
    
    }
/* ============================= */
/* Agent Workflow                */
/* ============================= */

.agent-workflow {
    margin-top: 24px;
    padding: 20px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.025);
}

.workflow-title {
    margin-bottom: 16px;

    color: white;

    font-size: 14px;
    font-weight: 700;
}

.workflow-canvas {
    display: flex;
    align-items: center;

    gap: 8px;

    overflow-x: auto;

    padding: 8px 2px 12px;
}

.workflow-node {
    min-width: 125px;

    padding: 14px 12px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(19, 38, 58, 0.95),
            rgba(7, 17, 31, 0.95)
        );

    text-align: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.workflow-node:hover {
    transform: translateY(-2px);

    border-color:
        rgba(103, 232, 249, 0.35);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25);
}

.workflow-node.active {
    border-color:
        rgba(103, 232, 249, 0.7);

    box-shadow:
        0 0 20px rgba(0, 168, 232, 0.18);
}

.workflow-node.completed {
    border-color:
        rgba(74, 222, 128, 0.45);
}

.workflow-icon {
    font-size: 22px;

    margin-bottom: 7px;
}

.workflow-node strong {
    display: block;

    color: #e2e8f0;

    font-size: 12px;

    margin-bottom: 4px;
}

.workflow-node small {
    color: var(--muted);

    font-size: 10px;
}

.workflow-arrow {
    flex-shrink: 0;

    color: #64748b;

    font-size: 18px;
    font-weight: 700;
}

.workflow-status {
    margin-top: 12px;

    color: var(--muted);

    font-size: 11px;

    text-align: center;
}

@media (max-width: 600px) {

    .agent-workflow {
        padding: 15px;
    }

    .workflow-canvas {
        justify-content: flex-start;
    }

    .workflow-node {
        min-width: 110px;
    }

}

/* ============================= */
/* Live Workflow Execution       */
/* ============================= */

.workflow-node.running {
    border-color: var(--accent-light);

    background:
        rgba(0, 168, 232, 0.12);

    box-shadow:
        0 0 25px rgba(0, 168, 232, 0.25);

    animation:
        workflowPulse 1s infinite;
}

.workflow-node.completed {
    border-color:
        rgba(74, 222, 128, 0.45);

    background:
        rgba(74, 222, 128, 0.045);
}

.workflow-node.pending {
    opacity: 0.45;
}

.workflow-node.running .workflow-icon {
    animation:
        workflowIconPulse 0.8s infinite;
}

.workflow-check {
    display: inline-block;

    margin-left: 4px;

    color: var(--success);

    font-size: 10px;
}

.workflow-running {
    display: inline-block;

    margin-left: 4px;

    color: var(--accent-light);

    font-size: 10px;

    animation:
        workflowDots 1.2s infinite;
}

@keyframes workflowPulse {

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

    50% {
        transform: scale(1.03);
    }
}

@keyframes workflowIconPulse {

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

    50% {
        transform: scale(1.15);
    }
}

@keyframes workflowDots {

    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

/* ================================
   Branching Agent Workflow
================================ */

.branch-workflow {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.025);
}

.branch-workflow-title {
    margin-bottom: 18px;
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.branch-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.branch-node {
    min-width: 125px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(19, 38, 58, 0.95),
            rgba(7, 17, 31, 0.95)
        );
    text-align: center;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.branch-node strong {
    display: block;
    color: #e2e8f0;
    font-size: 12px;
    margin-bottom: 4px;
}

.branch-node small {
    color: var(--muted);
    font-size: 10px;
}

.branch-icon {
    font-size: 21px;
    margin-bottom: 6px;
}

.branch-arrow {
    color: #64748b;
    font-size: 18px;
    font-weight: 700;
}

.branch-tools {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    position: relative;
}

.branch-tool {
    flex: 1;
    max-width: 145px;
}

.branch-tool-line {
    width: 1px;
    height: 18px;
    background: #475569;
    margin: 0 auto;
}

.branch-tool-arrow {
    color: #64748b;
    text-align: center;
    font-size: 16px;
    margin: 5px 0;
}

/* Workflow states */

.branch-node.pending {
    opacity: 0.42;
}

.branch-node.running {
    border-color: var(--accent-light);
    background: rgba(0, 168, 232, 0.12);
    box-shadow: 0 0 25px rgba(0, 168, 232, 0.25);
    animation: branchPulse 1s infinite;
}

.branch-node.completed {
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(74, 222, 128, 0.045);
}

.branch-node.selected {
    border-color: rgba(103, 232, 249, 0.7);
    box-shadow: 0 0 20px rgba(0, 168, 232, 0.18);
}

.branch-check {
    display: inline-block;
    margin-left: 4px;
    color: var(--success);
    font-size: 10px;
}

.branch-running {
    display: inline-block;
    margin-left: 4px;
    color: var(--accent-light);
    font-size: 10px;
    animation: branchDots 1.2s infinite;
}

.branch-status {
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

@keyframes branchPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes branchDots {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

@media (max-width: 700px) {
    .branch-tools {
        flex-wrap: wrap;
    }

    .branch-tool {
        flex: 0 0 calc(50% - 8px);
        max-width: none;
    }
}

@media (max-width: 420px) {
    .branch-tool {
        flex: 0 0 100%;
        max-width: 180px;
    }
}

/* ================================
   Web Search UI
================================ */

.web-search-query {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.web-search-summary {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.web-summary-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
}

.web-search-summary p {
    margin: 0;
    line-height: 1.65;
    font-size: 14px;
}

.web-sources-title {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
}

.web-sources {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.web-source-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.web-source-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
}

.web-source-number {
    width: 28px;
    height: 28px;
    min-width: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);

    font-size: 12px;
    font-weight: 700;
}

.web-source-content {
    flex: 1;
    min-width: 0;
}

.web-source-content strong {
    display: block;
    font-size: 14px;
    line-height: 1.45;
}

.web-source-content p {
    margin: 7px 0 10px;
    font-size: 13px;
    line-height: 1.55;
    opacity: 0.78;
}

.web-source-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
}

.web-source-meta a {
    text-decoration: none;
    font-weight: 600;
}

.web-source-meta a:hover {
    text-decoration: underline;
}

.web-source-meta span {
    opacity: 0.7;
}


/* ================================
   Web Search Mobile
================================ */

@media (max-width: 600px) {

    .web-search-summary {
        padding: 14px;
    }

    .web-source-card {
        padding: 12px;
        gap: 10px;
    }

    .web-source-content strong {
        font-size: 13px;
    }

    .web-source-content p {
        font-size: 12px;
    }

    .web-source-meta {
        font-size: 11px;
    }

}





