@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body {
    background-color: #000;
    color: #00FF41; /* Bright Green */
    font-family: 'VT323', monospace;
    font-size: 24px;
    margin: 0;
    padding: 20px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
}

a {
    color: #00FF41;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    border: 2px solid #00FF41;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    flex-shrink: 0;
}

.logo-text {
    white-space: pre;
    font-size: 16px;
    color: #FFFFFF;
    text-align: center;
    line-height: 1;
}

#price-info {
    margin-top: 5px;
    letter-spacing: 2px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

#price-info strong {
    color: #FFFFFF;
}

#marketcap-container.price-up {
    color: #33FF33;
    animation: flash-green 1s;
}
#marketcap-container.price-down {
    color: #FF3333;
    animation: flash-red 1s;
}

@keyframes flash-green {
    0%, 100% { color: #33FF33; }
    50% { color: #FFFFFF; }
}
@keyframes flash-red {
    0%, 100% { color: #FF3333; }
    50% { color: #FFFFFF; }
}

#ai-cast-container {
    border: 2px solid #00FF41;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
    flex-shrink: 0;
}

.ai-member {
    text-align: center;
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ai-member img {
    width: 50px;
    height: 50px;
    background: #00FF41;
    border: 2px solid #00FF41;
}

.ai-member.speaking img {
    background-color: #fff;
    box-shadow: 0 0 15px #fff;
}

.ai-member h3 {
    margin: 5px 0 0 0;
    font-size: 40px;
}

.ascii-face {
    font-size: 50px;
    margin-top: 10px;
    white-space: pre;
    color: #FFFFFF;
    line-height: 1;
}

main {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    overflow: hidden;
}

#stage-container {
    width: 70%;
    border: 2px solid #00FF41;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

#stage-container h2, #live-feeds h2 {
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid #00FF41;
    padding-bottom: 5px;
}

#conversation {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #00FF41 #000;
}

#conversation li {
    margin-bottom: 15px;
    line-height: 1.4;
}

#conversation p {
    margin: 5px 0 0 0;
    padding-left: 15px;
    font-size: 30px;
    text-transform: none;
}

#conversation p::before {
    content: '> ';
}

.speaker-line {
    display: flex;
    align-items: center;
}

.speaker-prompt {
    font-weight: bold;
    color: #FFFFFF;
    white-space: pre;
    font-size: 40px;
}

.typewriter-cursor {
    display: inline-block;
    background-color: #00FF41;
    width: 12px;
    height: 20px;
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
}

@keyframes blink {
    from, to { background-color: transparent }
    50% { background-color: #00FF41; }
}

#live-feeds {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#trades-container, #chat-container {
    border: 2px solid #00FF41;
    padding: 15px;
    flex: 1; 
    display: flex;
    flex-direction: column;
    max-height: 44%;
}

#trades-list, #chat-messages {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #00FF41 #000;
}

#trades-list li, #chat-messages li {
    margin-bottom: 5px;
}

#trades-list li, #chat-messages li, #conversation li {
    margin-bottom: 5px;
    transition: background-color 0.5s ease;
    font-size: 50px;
}

.new-message-highlight {
    animation: flash-bg-green 0.5s ease;
}

@keyframes flash-bg-green {
    from { background-color: #00FF41; color: #000; }
    to { background-color: transparent; color: #00FF41; }
}

#trades-list .buy {
    color: #33FF33;
}

#trades-list .sell {
    color: #FF3333;
}

#chat-messages strong {
    color: #FFFF00;
}

.chat-username {
    color: #FFFFFF;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 10px;
        height: calc(100vh - 20px);
    }

    .logo-text {
        font-size: 10px;
    }

    #price-info {
        flex-direction: column;
        gap: 5px;
    }
    #contract-link{
        font-size: 10px;
    }

    #ai-cast-container {
        gap: 10px;
        flex-wrap: wrap;
    }

    .ai-member {
        width: 60px;
    }

    .ai-member h3 {
        font-size: 14px;
    }

    .ascii-face {
        font-size: 10px;
        margin-top: 5px;
    }
    
    main {
        flex-direction: column-reverse;
        height: 100%;
    }

    #stage-container {
        flex-basis: 50%;
        width: 90%;
        height: 50%;
    }

    #live-feeds {
        flex-direction: row;
        flex-basis: 50%;
        height: 50%;
    }

    #trades-container, #chat-container {
        flex-basis: 50%;
        max-height: none;
    }

    #trades-list li, #chat-messages li, #conversation li {
        font-size: 14px;
    }

    #conversation p {
        font-size: 16px;
    }

    .speaker-prompt {
        font-size: 16px;
    }
}
