:root {
    --bg: #080808;
    --surface: #111111;
    --surface-2: #101010;
    --input-bg: #050505;

    --text: #f5f5f5;
    --text-muted: #999999;
    --text-soft: #777777;

    --border: #222222;
    --border-soft: #181818;

    --accent: #ffffff;
    --accent-text: #000000;

    --shadow: rgba(0, 0, 0, 0.6);
}

[data-theme="white"] {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --input-bg: #ffffff;

    --text: #111111;
    --text-muted: #666666;
    --text-soft: #777777;

    --border: #dddddd;
    --border-soft: #e5e5e5;

    --accent: #111111;
    --accent-text: #ffffff;

    --shadow: rgba(0, 0, 0, 0.12);
}
[data-theme="red"] {
    --bg: #120606;
    --surface: #1a0a0a;
    --surface-2: #210d0d;
    --input-bg: #0d0303;

    --text: #fff5f5;
    --text-muted: #d19a9a;
    --text-soft: #a96f6f;

    --border: #4a2020;
    --border-soft: #351515;

    --accent: #ff3b3b;
    --accent-text: #ffffff;

    --shadow: rgba(0, 0, 0, 0.65);
}
[data-theme="blue"] {
    --bg: #050b14;
    --surface: #091322;
    --surface-2: #0d1a2b;
    --input-bg: #03070d;

    --text: #f3f8ff;
    --text-muted: #9bb2cc;
    --text-soft: #7189a3;

    --border: #1b3552;
    --border-soft: #13283e;

    --accent: #3b9cff;
    --accent-text: #ffffff;

    --shadow: rgba(0, 0, 0, 0.65);
}
[data-theme="green"] {
    --bg: #061008;
    --surface: #0b1a0e;
    --surface-2: #102413;
    --input-bg: #030a05;

    --text: #f3fff5;
    --text-muted: #9bc8a3;
    --text-soft: #70a77b;

    --border: #1d4725;
    --border-soft: #15351c;

    --accent: #35d66f;
    --accent-text: #061008;

    --shadow: rgba(0, 0, 0, 0.65);
}

[data-theme="purple"] {
    --bg: #0c0712;
    --surface: #160d20;
    --surface-2: #1d1129;
    --input-bg: #08040d;

    --text: #faf4ff;
    --text-muted: #c0a6d1;
    --text-soft: #9676aa;

    --border: #43245b;
    --border-soft: #301a42;

    --accent: #b45cff;
    --accent-text: #ffffff;

    --shadow: rgba(0, 0, 0, 0.65);
}

[data-theme="orange"] {
    --bg: #120a04;
    --surface: #1d1007;
    --surface-2: #271609;
    --input-bg: #0c0602;

    --text: #fff7ed;
    --text-muted: #d1ae8b;
    --text-soft: #aa8058;

    --border: #553016;
    --border-soft: #3d220f;

    --accent: #ff8a2a;
    --accent-text: #1a0b02;

    --shadow: rgba(0, 0, 0, 0.65);
}

[data-theme="pink"] {
    --bg: #12070d;
    --surface: #1c0b13;
    --surface-2: #260e19;
    --input-bg: #0c0408;

    --text: #fff3f8;
    --text-muted: #d0a0b5;
    --text-soft: #a8758d;

    --border: #512238;
    --border-soft: #3b1929;

    --accent: #ff4f9a;
    --accent-text: #ffffff;

    --shadow: rgba(0, 0, 0, 0.65);
}

[data-theme="cyan"] {
    --bg: #041013;
    --surface: #071b20;
    --surface-2: #0b252b;
    --input-bg: #02090b;

    --text: #effcff;
    --text-muted: #9bc8d0;
    --text-soft: #70a3ad;

    --border: #1a4b54;
    --border-soft: #12363d;

    --accent: #35e5ff;
    --accent-text: #031013;

    --shadow: rgba(0, 0, 0, 0.65);
}

[data-theme="gold"] {
    --bg: #100d05;
    --surface: #1a1508;
    --surface-2: #241d0b;
    --input-bg: #0a0803;

    --text: #fffbed;
    --text-muted: #d0c08c;
    --text-soft: #a99862;

    --border: #4d4018;
    --border-soft: #372e11;

    --accent: #ffd447;
    --accent-text: #171104;

    --shadow: rgba(0, 0, 0, 0.65);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.navbar {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: 24px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--text-muted);
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

nav a:hover {
    color: var(--text);
}

.hero {
    max-width: 900px;
    margin: 110px auto 120px;
    padding: 0 20px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.hero h1 {
    font-size: clamp(48px, 8vw, 82px);
    line-height: 0.95;
    letter-spacing: -4px;
    margin-bottom: 25px;
}

.hero p {
    max-width: 600px;
    margin: auto;
    color: var(--text-muted);
    font-size: 17px;
}

.analyzer {
    max-width: 650px;
    margin: 40px auto 0;

    display: flex;
    gap: 10px;
    padding: 7px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.analyzer input {
    flex: 1;
    min-width: 0;

    background: transparent;
    border: none;
    outline: none;

    color: var(--text);
    padding: 14px;
    font-size: 15px;
}

.analyzer button {
    border: none;
    border-radius: 8px;
    padding: 0 22px;

    background: white;
    color: black;

    font-weight: 700;
    cursor: pointer;
}

.analyzer button:hover {
    background: var(--text-muted);
}

#status {
    margin-top: 15px;
    font-size: 14px;
    color: #777;
}

.results {
    max-width: 900px;
    margin: auto;
    padding: 0 20px 100px;
}

.hidden {
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.results-header h2 {
    font-size: 32px;
}

.small-label {
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: 2px;
}

.score {
    font-size: 40px;
    font-weight: 800;
}

.issue {
    border: 1px solid var(--border);
    background: var(--surface-2);

    border-radius: 10px;
    padding: 22px;
    margin-bottom: 12px;
}

.issue-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.issue h3 {
    font-size: 17px;
}

.issue p {
    color: var(--text-muted);
    margin-top: 8px;
    font-size: 14px;
}

.severity {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.section {
    max-width: 1100px;
    margin: auto;
    padding: 100px 20px;
    border-top: 1px solid var(--border-soft);
}

.section h2 {
    font-size: 48px;
    line-height: 1;
    letter-spacing: -2px;
    margin: 20px 0 60px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step {
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 10px;
}

.step strong {
    color: var(--text-soft);
    font-size: 13px;
}

.step h3 {
    margin: 25px 0 10px;
}

.step p {
    color: var(--text-soft);
    font-size: 14px;
}

footer {
    border-top: 1px solid var(--border-soft);
    padding: 40px 20px;

    max-width: 1100px;
    margin: auto;

    display: flex;
    justify-content: space-between;
}

footer p {
    color: var(--text-soft);
    font-size: 13px;
}

@media (max-width: 700px) {

    nav {
        display: none;
    }

    .hero {
        margin-top: 70px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .analyzer {
        flex-direction: column;
    }

    .analyzer button {
        height: 48px;
    }

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

    footer {
        flex-direction: column;
        gap: 10px;
    }
}
.chat {
    position: fixed;

    top: 120px;
    right: 30px;

    width: 650px;
    max-width: calc(100vw - 40px);

    height: 600px;
    max-height: calc(100vh - 160px);

    z-index: 1000;

    padding: 25px;

    
    border-radius: 12px;

    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow:
    0 20px 60px var(--shadow);

    display: none;

    overflow: hidden;
}
.chat-header {
    margin-bottom: 30px;
}

.chat-header h2 {
    margin-top: 10px;
}

.chat-messages {

    display: flex;

    flex-direction: column;

    gap: 15px;

    height: 380px;

    overflow-y: auto;

    padding-right: 10px;

    margin-bottom: 25px;
}

.chat-message {
    max-width: 80%;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.chat-message p {
    margin-top: 8px;
    color: var(--text-muted);
}

.chat-message.assistant {
    align-self: flex-start;
}
.chat-message.user {
    align-self: flex-end;

    background: var(--surface-2);
    border-color: var(--border);
}
.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    height: 48px;
    padding: 0 15px;
    border-radius: 8px;
    outline: none;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
}

.chat-input button {
    padding: 0 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.chat-header {
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.chat-header:active {
    cursor: grabbing;
}
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
.theme-picker {
    position: relative;
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);

    padding: 9px 14px;
    border-radius: 8px;

    cursor: pointer;
    font-size: 13px;
}

.theme-toggle:hover {
    background: var(--surface-2);
}

.theme-menu {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    width: 180px;

    padding: 8px;

    background: var(--surface);

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

    box-shadow:
        0 15px 40px var(--shadow);

    z-index: 2000;
}

.theme-option {
    width: 100%;

    display: block;

    padding: 10px 12px;

    border: none;
    border-radius: 7px;

    background: transparent;
    color: var(--text);

    text-align: left;

    cursor: pointer;
}

.theme-option:hover {
    background: var(--surface-2);
}

.chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 30px;
}

.chat-close {
    width: 38px;
    height: 38px;

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

    background: transparent;
    color: var(--accent);

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

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

.chat-close:hover {
    background: var(--accent);
    color: var(--accent-text);
}

.chat-open {
    position: fixed;

    right: 30px;
    bottom: 30px;

    width: 52px;
    height: 52px;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--surface);
    color: var(--accent);

    font-size: 20px;

    cursor: pointer;

    box-shadow: 0 10px 30px var(--shadow);

    z-index: 999;

    display: none;
}

.chat-open:hover {
    background: var(--accent);
    color: var(--accent-text);
}
