:root {
    --cyan: #2DFFFF;
    --purple: #7822FF;
    --dark: #0C0028;
    --dark2: #161042;
    --dark3: #241D58;
    --dark4: #332651;
    --dark5: #050039;
    --muted: #D8D0EA;
    --white: #FFFFFF;
    
    --brand-gradient: linear-gradient(135deg, #2DFFFF, #7822FF);
    --card-gradient: linear-gradient(45deg, #161042, #241D58);
    --glow-cyan: 0 0 20px rgba(45,255,255,0.15), 0 0 60px rgba(45,255,255,0.05);
    --glow-purple: 0 0 20px rgba(120,34,255,0.2), 0 0 60px rgba(120,34,255,0.08);
}

[data-theme="dark"],
:root:not([data-theme="light"]) {
    --pico-background-color: var(--dark);
    --pico-color: var(--muted);
    
    --pico-h1-color: var(--white);
    --pico-h2-color: var(--white);
    --pico-h3-color: var(--white);
    --pico-h4-color: var(--white);
    --pico-h5-color: var(--white);
    --pico-h6-color: var(--white);
    
    --pico-primary: var(--purple);
    --pico-primary-hover: #8c3aff;
    --pico-primary-focus: rgba(120, 34, 255, 0.25);
    
    --pico-secondary: var(--cyan);
    --pico-secondary-hover: #4dffff;
    --pico-secondary-focus: rgba(45, 255, 255, 0.25);
    
    --pico-card-background-color: var(--dark2);
    --pico-card-border-color: var(--dark4);
    
    --pico-form-element-background-color: var(--dark2);
    --pico-form-element-border-color: var(--dark4);
    --pico-form-element-color: var(--white);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--dark);
    color: var(--muted);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    color: var(--white);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 300;
}

h2 {
    font-size: 2.5rem;
    font-weight: 300;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

.eyebrow {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cyan);
    display: block;
    margin-bottom: 0.5rem;
}

.eyebrow::before {
    content: "/ ";
}

.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

article {
    background: var(--card-gradient);
    border: 1px solid rgba(51, 38, 81, 0.5);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
    transform: scale(1.02);
    box-shadow: var(--glow-purple);
}

button, [type="submit"], [type="button"] {
    border-radius: 999px;
    background-color: var(--purple);
    border-color: var(--purple);
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover, [type="submit"]:hover, [type="button"]:hover {
    background-color: #8c3aff;
    box-shadow: var(--glow-purple);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: var(--dark4);
    border-color: var(--dark4);
}

.btn-secondary:hover {
    background-color: var(--dark3);
    box-shadow: var(--glow-cyan);
}

input, textarea, select {
    background-color: var(--dark2);
    border-color: var(--dark4);
    color: var(--white);
    border-radius: 8px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(45, 255, 255, 0.1);
}

a {
    color: var(--cyan);
    text-decoration: none;
}

a:hover {
    color: var(--purple);
    text-decoration: underline;
}

.container {
    max-width: 1280px;
}

section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.market-summary {
    background: var(--card-gradient);
    border: 1px solid rgba(51, 38, 81, 0.5);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.market-summary:hover {
    transform: scale(1.02);
    box-shadow: var(--glow-purple);
}

.market-summary h3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.market-summary p {
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

thead th .subheader {
    display: block;
    font-weight: 300;
    font-size: 0.7rem;
    margin-top: 0.35rem;
    color: var(--muted);
    opacity: 0.8;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 1.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--dark2);
    border: 1px solid var(--dark4);
    border-radius: 12px;
    display: inline-block;
    transition: all 0.3s ease;
}

section h2:hover {
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.market-summary {
    background: var(--card-gradient);
    border: 1px solid var(--dark4);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.market-summary:hover {
    transform: scale(1.01);
    box-shadow: var(--glow-purple);
}

.market-summary h3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 1rem;
    text-align: center;
}

.market-summary p {
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
}

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dark4);
}

.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(120, 34, 255, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.glow-orb-1 {
    top: -300px;
    right: -300px;
}

.glow-orb-2 {
    bottom: -300px;
    left: -300px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    background-color: var(--dark3);
    color: var(--cyan);
    border: 1px solid var(--dark4);
}

.hero {
    padding: 2rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--dark4);
}

.tab-button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: var(--dark2);
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:first-child {
    border-top-left-radius: 8px;
}

.tab-button:last-child {
    border-top-right-radius: 8px;
}

.tab-button:hover {
    background: var(--dark3);
    color: var(--white);
}

.tab-button.active {
    background: var(--dark);
    color: var(--cyan);
    border-bottom-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--dark2);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, rgba(45, 255, 255, 0.15), rgba(120, 34, 255, 0.15));
    border-bottom: 2px solid var(--cyan);
}

thead th {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--cyan);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

thead th:first-child {
    text-align: left;
}

thead th {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--cyan);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

thead th .subheader {
    display: block;
    font-weight: 300;
    font-size: 0.7rem;
    margin-top: 0.35rem;
    color: var(--muted);
    opacity: 0.8;
}

tbody tr {
    border-bottom: 1px solid var(--dark4);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--dark3);
}

tbody tr.clickable-row {
    cursor: pointer;
}

tbody tr.clickable-row:hover {
    background: var(--dark3);
    transform: translateX(4px);
}

tbody td {
    padding: 0.875rem 1rem;
    color: var(--white);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

tbody td:first-child {
    color: var(--white);
    font-weight: 500;
    text-align: left;
}

.weight-cell {
    background: linear-gradient(135deg, rgba(45, 255, 255, 0.1), rgba(120, 34, 255, 0.1));
    color: var(--cyan);
    font-weight: 600;
    font-size: 1rem;
}

tbody td:first-child {
    color: var(--white);
    font-weight: 500;
    text-align: left;
}

tbody td:not(:first-child) {
    font-weight: 500;
    color: var(--white);
}

.weight-cell {
    background: linear-gradient(135deg, rgba(45, 255, 255, 0.1), rgba(120, 34, 255, 0.1));
    color: var(--cyan);
    font-weight: 600;
    font-size: 1rem;
}

.chat-container {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 400px;
    background: var(--dark2);
    border-left: 2px solid var(--dark4);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.chat-container.collapsed {
    transform: translateX(100%);
}

.chat-header {
    padding: 1rem 1.5rem;
    background: var(--card-gradient);
    border-bottom: 2px solid var(--dark4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--cyan);
}

.chat-toggle {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    color: var(--cyan);
    transform: scale(1.1);
    box-shadow: none;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    padding: 1rem;
    background: var(--dark3);
    border-radius: 12px;
    border: 1px solid var(--dark4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-message:hover {
    background: var(--dark);
    border-color: var(--cyan);
    transform: translateX(-4px);
}

.chat-message-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.chat-message-text {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    background: var(--dark);
    border-top: 2px solid var(--dark4);
}

.chat-input-area textarea {
    width: 100%;
    min-height: 80px;
    margin-bottom: 0.75rem;
    resize: vertical;
}

.chat-input-area button {
    width: 100%;
}

.chat-expand-button {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: var(--purple);
    border: 2px solid var(--dark4);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: var(--glow-purple);
}

.chat-expand-button.show {
    display: flex;
}

.chat-expand-button:hover {
    background: #8c3aff;
    transform: scale(1.05);
}

.main-content {
    transition: margin-right 0.3s ease;
}

.main-content.chat-open {
    margin-right: 400px;
}

@media (max-width: 1200px) {
    .chat-container {
        width: 100%;
    }
    
    .main-content.chat-open {
        margin-right: 0;
    }
}
