/* Glassmorphism Theme - $SCHIZO */

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

body {
    background: linear-gradient(135deg, #0a0f0f 0%, #0d1a1a 50%, #0a1212 100%);
    background-attachment: fixed;
    color: #8cdbc7;
    font-family: 'Courier New', 'Courier', monospace;
    padding: 30px 40px;
    line-height: 1.6;
    min-height: 100vh;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(140, 219, 199, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(140, 219, 199, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Scanlines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.15;
}

/* Glass Panel Base */
.glass {
    background: rgba(13, 25, 25, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(140, 219, 199, 0.2);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(140, 219, 199, 0.1);
}

/* Header */
header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(140, 219, 199, 0.2);
    position: relative;
}

.header-grid {
    display: grid;
    grid-template-columns: 350px 1fr 350px;
    gap: 20px;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.header-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 20px rgba(140, 219, 199, 0.3));
    transition: transform 0.1s ease;
    /* Faster transition for eye tracking */
}

/* Glitch Effect */
@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(-2px, 1px);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
        transform: translate(2px, -1px);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
        transform: translate(-2px, 2px);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(2px, -2px);
    }

    80% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-1px, 1px);
    }

    100% {
        clip-path: inset(30% 0 30% 0);
        transform: translate(1px, -1px);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(2px, -1px);
    }

    20% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-2px, 2px);
    }

    40% {
        clip-path: inset(30% 0 20% 0);
        transform: translate(2px, 1px);
    }

    60% {
        clip-path: inset(15% 0 80% 0);
        transform: translate(-1px, -2px);
    }

    80% {
        clip-path: inset(55% 0 10% 0);
        transform: translate(1px, 2px);
    }

    100% {
        clip-path: inset(40% 0 30% 0);
        transform: translate(-2px, 1px);
    }
}

.glitch {
    font-size: 3.5em;
    color: #8cdbc7;
    position: relative;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0d1a1a;
    /* Match background to hide original somewhat */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip-path: inset(0 0 0 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip-path: inset(0 0 0 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.tagline {
    color: rgba(140, 219, 199, 0.7);
    font-size: 1.1em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Terminal Window */
#terminal-window {
    width: 100%;
    height: 220px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.terminal-header {
    background: #1a1a1a;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.terminal-title {
    color: #8cdbc7;
    font-size: 0.75em;
    opacity: 0.7;
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.control {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

#terminal-content {
    padding: 12px;
    color: #4ade80;
    font-size: 0.8em;
    line-height: 1.4;
    flex: 1;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-family: 'Consolas', 'Monaco', monospace;
    text-shadow: 0 0 5px rgba(74, 222, 128, 0.4);
}

.terminal-line {
    margin-bottom: 4px;
    word-break: break-all;
}

/* $SCHIZO Token Card */
#schizo-token-card {
    position: relative;
    /* Reset from absolute */
    top: auto;
    right: auto;
    background: rgba(13, 25, 25, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(140, 219, 199, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    width: 320px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(140, 219, 199, 0.1);
    text-align: left;
}

.token-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(140, 219, 199, 0.1);
}

.token-card-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(140, 219, 199, 0.3);
    filter: drop-shadow(0 0 10px rgba(140, 219, 199, 0.3));
}

.token-card-title {
    display: flex;
    flex-direction: column;
}

.token-card-name {
    font-size: 1.4em;
    font-weight: bold;
    color: #8cdbc7;
    text-shadow: 0 0 10px rgba(140, 219, 199, 0.3);
}

.token-card-status {
    font-size: 0.75em;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    margin-top: 2px;
}

.token-card-status.live {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.token-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.token-card-stat {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 10px;
    border-radius: 8px;
}

.token-card-stat .stat-label {
    font-size: 0.7em;
    color: rgba(140, 219, 199, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.token-card-stat .stat-value {
    font-size: 1em;
    font-weight: bold;
    color: #8cdbc7;
}

.token-card-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-primary {
    flex: 2;
    background: #4ade80;
    /* Neon Green */
    color: #000;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.1em;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.3);
    border: 1px solid #22c55e;
}

.btn-primary:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.5);
}

.secondary-actions {
    display: flex;
    gap: 8px;
    flex: 1;
}

.btn-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(140, 219, 199, 0.1);
    border: 1px solid rgba(140, 219, 199, 0.2);
    border-radius: 8px;
    color: rgba(140, 219, 199, 0.7);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-icon:hover {
    background: rgba(140, 219, 199, 0.2);
    color: #8cdbc7;
    border-color: rgba(140, 219, 199, 0.4);
}

.token-card-footer {
    border-top: 1px solid rgba(140, 219, 199, 0.1);
    padding-top: 12px;
}

.ca-input-container {
    position: relative;
    width: 100%;
}

#schizo-ca-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(140, 219, 199, 0.2);
    color: rgba(140, 219, 199, 0.7);
    padding: 10px;
    font-family: monospace;
    font-size: 0.9em;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

#schizo-ca-input:hover,
#schizo-ca-input:focus {
    border-color: rgba(140, 219, 199, 0.5);
    color: #8cdbc7;
    background: rgba(0, 0, 0, 0.5);
}

.copy-hint {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6em;
    color: rgba(140, 219, 199, 0.4);
    pointer-events: none;
}

h2 {
    color: #8cdbc7;
    margin-bottom: 15px;
    font-size: 1.2em;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Stats Section */
#stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat {
    background: rgba(13, 25, 25, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(140, 219, 199, 0.15);
    padding: 20px 15px;
    text-align: center;
    border-radius: 16px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(140, 219, 199, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(140, 219, 199, 0.3), transparent);
}

.stat:hover {
    transform: translateY(-2px);
    border-color: rgba(140, 219, 199, 0.3);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(140, 219, 199, 0.1);
}

.stat label {
    display: block;
    color: rgba(140, 219, 199, 0.6);
    font-size: 0.75em;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat span {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #8cdbc7;
    text-shadow: 0 0 10px rgba(140, 219, 199, 0.3);
}

.status-connected {
    color: #8cdbc7 !important;
    text-shadow: 0 0 15px rgba(140, 219, 199, 0.5) !important;
}

.status-disconnected {
    color: #ff6b6b !important;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3) !important;
}

/* Main Panels - Side by Side Layout */
#main-panels {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* Token Stream Section */
#token-stream-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 280px;
}

/* Feed Section */
#feed-container {
    flex: 1.5;
    display: flex;
    flex-direction: column;
}

/* Unified Panel Box Styling */
#token-stream-box,
#feed-box,
#chat-box {
    display: flex;
    flex-direction: column;
    background: rgba(13, 25, 25, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(140, 219, 199, 0.15);
    border-radius: 16px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(140, 219, 199, 0.05);
    overflow: hidden;
    height: 450px;
}

/* Panel Header (unified for tokens, feed) */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    font-size: 1.1em;
    font-weight: bold;
    color: #8cdbc7;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(140, 219, 199, 0.1);
    background: rgba(140, 219, 199, 0.05);
}

.panel-header span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header button {
    padding: 6px 14px;
    font-size: 0.75em;
}

/* Buttons */
button {
    background: rgba(140, 219, 199, 0.1);
    color: #8cdbc7;
    border: 1px solid rgba(140, 219, 199, 0.3);
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85em;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}

button:hover {
    background: rgba(140, 219, 199, 0.2);
    border-color: rgba(140, 219, 199, 0.5);
    box-shadow: 0 0 20px rgba(140, 219, 199, 0.2);
    transform: translateY(-1px);
}

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

/* Feed Content Area */
#feed {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Token Stream Content Area */
#token-stream {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event {
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: rgba(140, 219, 199, 0.03);
    border-left: 2px solid rgba(140, 219, 199, 0.2);
    animation: slideIn 0.3s ease;
    transition: background 0.2s ease;
}

.event:hover {
    background: rgba(140, 219, 199, 0.06);
}

.event:last-child {
    margin-bottom: 0;
}

.event .timestamp {
    color: rgba(140, 219, 199, 0.5);
    font-size: 0.75em;
    margin-right: 10px;
}

.event.analysis {
    color: rgba(140, 219, 199, 0.8);
    border-left-color: rgba(140, 219, 199, 0.3);
}

.event.safety {
    color: #ff9f6b;
    border-left-color: rgba(255, 159, 107, 0.5);
    background: rgba(255, 159, 107, 0.05);
}

.event.decision {
    color: #8cdbc7;
    font-weight: bold;
    border-left-color: #8cdbc7;
}

.event.trade {
    color: #8cdbc7;
    font-weight: bold;
    border-left-color: #8cdbc7;
    background: rgba(140, 219, 199, 0.08);
    text-shadow: 0 0 5px rgba(140, 219, 199, 0.3);
}

.event.buyback {
    color: #ff9f6b;
    font-weight: bold;
    border-left-color: #ff9f6b;
    background: rgba(255, 159, 107, 0.08);
}

.event.error {
    color: #ff6b6b;
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.event.stop-loss {
    color: #ff6b6b;
    font-weight: bold;
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
}

.event.take-profit {
    color: #8cdbc7;
    font-weight: bold;
    border-left-color: #8cdbc7;
    background: rgba(140, 219, 199, 0.1);
    text-shadow: 0 0 8px rgba(140, 219, 199, 0.4);
}

/* Live Analysis Thoughts */
.event.analysis-scanning {
    color: #b8a9ff;
    border-left-color: rgba(184, 169, 255, 0.6);
    background: rgba(184, 169, 255, 0.06);
    font-style: italic;
}

.event.analysis-safety {
    color: #ffb86b;
    border-left-color: rgba(255, 184, 107, 0.6);
    background: rgba(255, 184, 107, 0.06);
    font-style: italic;
}

.event.analysis-smart_money {
    color: #6bcfff;
    border-left-color: rgba(107, 207, 255, 0.6);
    background: rgba(107, 207, 255, 0.06);
    font-style: italic;
}

.event.analysis-decision {
    color: #8cdbc7;
    font-weight: bold;
    border-left-color: #8cdbc7;
    background: rgba(140, 219, 199, 0.1);
    text-shadow: 0 0 5px rgba(140, 219, 199, 0.3);
    font-style: normal;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

/* Chat Section */
#chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

#chat-header {
    padding: 15px 18px;
    font-size: 1.1em;
    font-weight: bold;
    color: #8cdbc7;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(140, 219, 199, 0.1);
    background: rgba(140, 219, 199, 0.05);
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

#chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    border-top: 1px solid rgba(140, 219, 199, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.chat-msg {
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

.chat-msg:last-child {
    margin-bottom: 0;
}

.chat-msg .timestamp {
    color: rgba(140, 219, 199, 0.5);
    font-size: 0.75em;
    margin-right: 10px;
}

.chat-msg.user-message {
    color: rgba(170, 170, 170, 0.9);
    background: rgba(100, 100, 100, 0.1);
    border-left: 2px solid rgba(170, 170, 170, 0.3);
}

.chat-msg.schizo-response {
    color: #8cdbc7;
    font-weight: bold;
    background: rgba(140, 219, 199, 0.1);
    border-left: 2px solid #8cdbc7;
}

/* Typing indicator */
.chat-msg.typing-indicator {
    color: rgba(140, 219, 199, 0.6);
    font-style: italic;
    background: transparent;
    border-left: 2px solid rgba(140, 219, 199, 0.3);
}

.typing-dots span {
    animation: typingDot 1.4s infinite;
    animation-fill-mode: both;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

    0%,
    80%,
    100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

#chatInput {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    color: #8cdbc7;
    border: 1px solid rgba(140, 219, 199, 0.2);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9em;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

#chatInput:focus {
    border-color: rgba(140, 219, 199, 0.4);
    box-shadow: 0 0 15px rgba(140, 219, 199, 0.1);
}

#chatInput::placeholder {
    color: rgba(140, 219, 199, 0.4);
}

#sendBtn {
    min-width: 80px;
}

/* Trades Table */
#trades-container {
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(13, 25, 25, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(140, 219, 199, 0.15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(140, 219, 199, 0.1);
}

th {
    background: rgba(140, 219, 199, 0.08);
    color: rgba(140, 219, 199, 0.8);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 1px;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(140, 219, 199, 0.05);
}

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

.trade-buy {
    color: #8cdbc7;
    font-weight: bold;
}

.trade-sell {
    color: #ff9f6b;
    font-weight: bold;
}

td a {
    color: rgba(140, 219, 199, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

td a:hover {
    color: #8cdbc7;
    text-decoration: underline;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(13, 20, 20, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(140, 219, 199, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(140, 219, 199, 0.5);
}

/* AI Personality Events */
.event.schizo-speaks {
    color: #ff9f6b;
    font-weight: bold;
    background: rgba(255, 159, 107, 0.08);
    border-left-color: #ff9f6b;
}

.event.commentary {
    color: rgba(140, 219, 199, 0.85);
    font-style: italic;
    border-left-color: rgba(140, 219, 199, 0.3);
}

.event.learning {
    color: #ffcc00;
    font-weight: bold;
    border-left-color: #ffcc00;
    background: rgba(255, 204, 0, 0.08);
}

.event.chat-message {
    color: #aaa;
    border-left-color: rgba(170, 170, 170, 0.3);
}

.event.chat-response {
    color: #8cdbc7;
    font-weight: bold;
    background: rgba(140, 219, 199, 0.08);
    border-left-color: #8cdbc7;
}

/* Responsive */
@media (max-width: 1200px) {
    #stats {
        grid-template-columns: repeat(2, 1fr);
    }

    #main-panels {
        flex-wrap: wrap;
    }

    #token-stream-section,
    #feed-container {
        flex: 1 1 45%;
    }

    #chat-container {
        flex: 1 1 100%;
        order: 3;
        margin-top: 0;
    }

    #token-stream-box,
    #feed-box,
    #chat-box {
        height: 350px;
    }
}

@media (max-width: 900px) {
    body {
        padding: 20px;
    }

    #schizo-token-card {
        position: relative;
        min-width: unset;
        width: 100%;
        margin-top: 20px;
    }

    .header-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .header-left,
    .header-center,
    .header-right {
        justify-content: center;
    }

    #schizo-token-card {
        width: 100%;
        max-width: 400px;
    }

    #terminal-window {
        max-width: 400px;
    }

    #token-stream-box,
    #feed-box,
    #chat-box {
        height: 300px;
    }

    #chat-header,
    .panel-header {
        padding: 12px 15px;
        font-size: 1em;
    }

    #stats {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 500px) {
    #stats {
        grid-template-columns: 1fr;
    }

    .stat span {
        font-size: 1.5em;
    }
}

/* Current Token Card */
#current-token {
    margin-bottom: 20px;
}

.token-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(13, 25, 25, 0.6);
    border: 1px solid rgba(140, 219, 199, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.token-card:hover {
    border-color: rgba(140, 219, 199, 0.5);
    box-shadow: 0 0 20px rgba(140, 219, 199, 0.15);
    transform: translateY(-2px);
}

.token-card.empty {
    cursor: default;
    opacity: 0.6;
}

.token-card.empty:hover {
    transform: none;
    box-shadow: none;
}

.token-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(140, 219, 199, 0.3);
}

.token-img-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(140, 219, 199, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8cdbc7;
    font-size: 1.5em;
    border: 2px solid rgba(140, 219, 199, 0.3);
}

.token-info {
    flex: 1;
}

.token-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.token-symbol {
    font-size: 1.3em;
    font-weight: bold;
    color: #8cdbc7;
}

.token-age {
    font-size: 0.8em;
    color: rgba(140, 219, 199, 0.6);
    background: rgba(140, 219, 199, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.token-name {
    font-size: 0.85em;
    color: rgba(140, 219, 199, 0.7);
    margin-bottom: 6px;
}

.token-price {
    font-size: 1.1em;
    font-weight: bold;
    color: #8cdbc7;
}

.token-change {
    font-size: 0.9em;
    font-weight: bold;
}

.token-change.price-up {
    color: #4ade80;
}

.token-change.price-down {
    color: #f87171;
}

.token-stats {
    display: flex;
    gap: 15px;
    margin-top: 6px;
    font-size: 0.85em;
    color: rgba(140, 219, 199, 0.7);
}

.token-txns {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    font-size: 0.85em;
}

.token-txns .buys {
    color: #4ade80;
}

.token-txns .sells {
    color: #f87171;
}

.chart-hint {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75em;
    color: rgba(140, 219, 199, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.token-card:hover .chart-hint {
    opacity: 1;
}

/* Chart Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-overlay.visible {
    display: flex;
}

.popup-content {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: #0d1414;
    border: 1px solid rgba(140, 219, 199, 0.3);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(140, 219, 199, 0.2);
    border: 1px solid rgba(140, 219, 199, 0.3);
    border-radius: 50%;
    color: #8cdbc7;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.popup-close:hover {
    background: rgba(140, 219, 199, 0.4);
}

#chart-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Token Stream Items */

.token-stream-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 20, 20, 0.6);
    border: 1px solid rgba(140, 219, 199, 0.15);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.token-stream-item:hover {
    border-color: rgba(140, 219, 199, 0.4);
    background: rgba(15, 30, 30, 0.7);
}

.token-stream-item.token-new {
    animation: tokenFlash 2s ease-out;
}

@keyframes tokenFlash {
    0% {
        background: rgba(140, 219, 199, 0.3);
        border-color: rgba(140, 219, 199, 0.6);
    }

    100% {
        background: rgba(10, 20, 20, 0.6);
        border-color: rgba(140, 219, 199, 0.15);
    }
}

.token-stream-item.token-commented {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.token-stream-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-stream-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(140, 219, 199, 0.2);
}

.token-stream-img-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(140, 219, 199, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8cdbc7;
    font-size: 0.9em;
    border: 1px solid rgba(140, 219, 199, 0.2);
}

.token-stream-info {
    display: flex;
    flex-direction: column;
}

.token-stream-symbol {
    font-weight: bold;
    color: #8cdbc7;
    font-size: 0.95em;
}

.token-stream-name {
    font-size: 0.75em;
    color: rgba(140, 219, 199, 0.6);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-stream-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
}

.token-stream-price {
    color: #8cdbc7;
    font-weight: bold;
}

.token-stream-mcap {
    color: rgba(140, 219, 199, 0.7);
}

.token-stream-change {
    font-weight: bold;
    min-width: 55px;
    text-align: right;
}

.token-stream-change.price-up {
    color: #4ade80;
}

.token-stream-change.price-down {
    color: #f87171;
}

/* Analyzing state */
.token-stream-item.analyzing {
    flex-wrap: wrap;
    border-color: rgba(255, 159, 107, 0.3);
    background: rgba(255, 159, 107, 0.05);
}

.token-stream-item.analyzing:hover {
    border-color: rgba(255, 159, 107, 0.5);
    background: rgba(255, 159, 107, 0.1);
}

.analyzing-pulse {
    animation: eyePulse 1.5s ease-in-out infinite;
    font-size: 1.2em !important;
}

@keyframes eyePulse {

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

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* SCHIZO's thought bubble */
.analysis-thought {
    width: 100%;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(255, 159, 107, 0.1);
    border-left: 2px solid rgba(255, 159, 107, 0.5);
    border-radius: 4px;
    font-size: 0.8em;
    color: rgba(255, 159, 107, 0.9);
    font-style: italic;
    line-height: 1.3;
}

/* Token commentary bubble */
.token-commentary-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(245, 158, 11, 0.9);
    color: #000;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8em;
    max-width: 300px;
    white-space: normal;
    z-index: 10;
    animation: bubbleFadeIn 0.3s ease-out;
    margin-bottom: 5px;
}

.token-commentary-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(245, 158, 11, 0.9);
}

@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   SCHIZO 3D CHARACTER STYLES
   ============================================ */

/* 3D Container - In header left area */
#schizo-3d-container {
    width: 100%;
    height: 250px;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

#schizo-3d-canvas {
    flex: 1;
    background: transparent;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

#schizo-3d-canvas canvas {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
}

/* Responsive */
@media (max-width: 900px) {
    #schizo-3d-container {
        height: 200px;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ============================================
   CLICK TO COPY CA STYLES
   ============================================ */

.clickable-ca {
    cursor: pointer;
    color: rgba(140, 219, 199, 0.7);
    font-family: monospace;
    font-size: 0.85em;
    padding: 2px 6px;
    background: rgba(140, 219, 199, 0.08);
    border: 1px solid rgba(140, 219, 199, 0.15);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

.clickable-ca:hover {
    color: #8cdbc7;
    background: rgba(140, 219, 199, 0.15);
    border-color: rgba(140, 219, 199, 0.4);
    box-shadow: 0 0 10px rgba(140, 219, 199, 0.2);
}

.clickable-ca.copy-success {
    color: #4ade80 !important;
    background: rgba(74, 222, 128, 0.2) !important;
    border-color: rgba(74, 222, 128, 0.5) !important;
}

/* Token stream CA styling */
.token-stream-ca {
    margin-top: 2px;
}

/* Copy toast notification */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(74, 222, 128, 0.95);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.9em;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.4);
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Fixed About Button - Bottom Right */
.about-btn-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(20, 30, 30, 0.9);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    z-index: 1000;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.about-btn-fixed:hover {
    background: rgba(30, 45, 45, 0.95);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 255, 205, 0.2);
}

.about-btn-fixed svg {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .about-btn-fixed span {
        display: none;
    }

    .about-btn-fixed {
        padding: 10px;
        border-radius: 50%;
    }
}