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

:root {
    --bg: #06111f;
    --panel: #0d1f36;
    --panel2: #102744;
    --panel3: #071829;
    --border: rgba(255,255,255,0.09);
    --text: #ffffff;
    --muted: #9eb3d1;
    --accent: #7257ff;
    --accent2: #8a35ff;
    --green: #31d27c;
    --red: #ff5277;
    --yellow: #ffcc47;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top left, #11284a 0%, #06111f 42%, #030913 100%);
    color: var(--text);
    min-height: 100vh;
}

button, textarea, input {
    font-family: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 292px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: rgba(5, 17, 31, 0.92);
    border-right: 1px solid var(--border);
    padding: 26px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 34px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 20px 45px rgba(114, 87, 255, 0.35);
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    color: var(--muted);
    margin-top: 4px;
    font-size: 14px;
}

.nav {
    display: grid;
    gap: 12px;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    background: rgba(255,255,255,0.045);
    border: 1px solid transparent;
    padding: 15px 16px;
    border-radius: 16px;
    font-weight: 700;
    transition: 0.18s ease;
}

.nav a:hover,
.nav a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 16px 30px rgba(114, 87, 255, 0.22);
}

.sidebar-card {
    margin-top: 34px;
    background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    text-align: center;
}

.sidebar-card-title {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-card-number {
    font-size: 48px;
    font-weight: 900;
    margin-top: 8px;
}

.sidebar-card-text {
    color: var(--muted);
    line-height: 1.5;
}

.main {
    padding: 34px;
    overflow: hidden;
}

.hero {
    border-radius: 28px;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(114,87,255,0.98), rgba(138,53,255,0.98)),
        radial-gradient(circle at 80% 10%, rgba(255,255,255,0.35), transparent 35%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 24px 70px rgba(114, 87, 255, 0.24);
}

.eyebrow {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1;
    letter-spacing: -0.06em;
    max-width: 920px;
}

.hero p {
    margin-top: 18px;
    color: rgba(255,255,255,0.88);
    font-size: 20px;
    line-height: 1.45;
    max-width: 860px;
}

.hero-badge {
    min-width: 150px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 16px;
    border-radius: 18px;
    text-align: center;
}

.hero-badge span {
    display: block;
    color: rgba(255,255,255,0.78);
    font-size: 13px;
}

.hero-badge strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.workspace {
    margin-top: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.7fr);
    gap: 28px;
    align-items: start;
}

.coach-panel,
.score-card,
.matches-card,
.action-card {
    background: rgba(13, 31, 54, 0.88);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}

.coach-panel {
    padding: 24px;
}

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

.panel-header h2 {
    font-size: 28px;
    letter-spacing: -0.03em;
}

.panel-header p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.5;
}

.clear-btn {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border-radius: 14px;
    padding: 11px 14px;
    cursor: pointer;
}

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

.quick-prompts button,
.side-question {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.055);
    color: var(--text);
    padding: 11px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.18s ease;
}

.quick-prompts button:hover,
.side-question:hover,
.clear-btn:hover {
    background: rgba(114,87,255,0.35);
}

.chat-window {
    height: 480px;
    overflow-y: auto;
    background: rgba(4, 14, 26, 0.85);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.user-message {
    justify-content: flex-end;
}

.user-message .avatar {
    order: 2;
    background: linear-gradient(135deg, #39a7ff, #7257ff);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, #31d27c, #36a2ff);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    flex: 0 0 38px;
}

.bubble {
    max-width: 78%;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.075);
    border: 1px solid var(--border);
    line-height: 1.65;
    white-space: pre-wrap;
}

.user-message .bubble {
    background: linear-gradient(135deg, var(--accent), #5463ff);
    border-color: rgba(255,255,255,0.12);
}

.typing .bubble {
    color: var(--muted);
}

.chat-form {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.chat-form textarea {
    min-height: 96px;
    max-height: 180px;
    resize: vertical;
    border: 1px solid var(--border);
    background: rgba(4, 14, 26, 0.9);
    color: var(--text);
    border-radius: 20px;
    padding: 16px;
    font-size: 16px;
    outline: none;
    line-height: 1.5;
}

.chat-form textarea:focus {
    border-color: rgba(114,87,255,0.8);
    box-shadow: 0 0 0 4px rgba(114,87,255,0.16);
}

.chat-form button {
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--text);
    padding: 0 24px;
    height: 58px;
    border-radius: 18px;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(114,87,255,0.25);
}

.chat-form button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.insight-panel {
    display: grid;
    gap: 22px;
}

.score-card,
.matches-card,
.action-card {
    padding: 24px;
}

.score-card h3,
.matches-card h3,
.action-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.score-card p {
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.score-grid div {
    background: rgba(4,14,26,0.75);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.score-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.score-grid strong {
    display: block;
    font-size: 30px;
    margin-top: 7px;
}

.match-item {
    background: rgba(4,14,26,0.75);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.match-item strong {
    display: block;
    margin-bottom: 5px;
}

.match-item span {
    color: var(--muted);
    font-size: 14px;
}

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

.action-card {
    display: grid;
    gap: 12px;
}

.side-question {
    border-radius: 16px;
    text-align: left;
    width: 100%;
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

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

    .hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 18px;
    }

    .sidebar {
        padding: 20px;
    }

    .chat-form {
        grid-template-columns: 1fr;
    }

    .bubble {
        max-width: 88%;
    }

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