* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background-color: #000;
    color: #0ff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        linear-gradient(0deg, transparent 24%, #0ff05 25%, #0ff05 26%, transparent 27%, transparent 74%, #0ff05 75%, #0ff05 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, #0ff05 25%, #0ff05 26%, transparent 27%, transparent 74%, #0ff05 75%, #0ff05 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #000c 100%);
    pointer-events: none;
    z-index: 1;
}

.container {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    position: relative;
    z-index: 2;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

h1 {
    font-size: 3.5em;
    text-shadow: 0 0 10px #0ff, 0 0 20px #0ff, 0 0 30px #0ff;
    letter-spacing: 3px;
    animation: medical-scan 4s infinite;
    position: relative;
    display: inline-block;
}

h1::before {
    content: 'CRITICAL CONDITION';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.3em;
    color: #f00;
    animation: blink 1s infinite;
    text-shadow: 0 0 10px #f00;
}

.tagline {
    color: #0ff;
    opacity: 0.7;
    margin-top: 10px;
    font-style: italic;
    text-shadow: 0 0 5px #0ff;
}

.crypto-prices {
    margin-top: 15px;
    padding: 10px;
    background-color: #111;
    border: 1px solid #0ff;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    color: #0ff;
    position: relative;
    overflow: hidden;
}

.crypto-prices::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #0ff3, transparent);
    animation: scan-line 3s linear infinite;
}

.token-price {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    background-color: #0f01;
}

.token-price.alert {
    background-color: #300;
    border: 2px solid #f00;
    animation: warning-pulse 1s infinite;
    padding: 15px;
    font-size: 1.2em;
    text-shadow: 0 0 10px #f00;
    position: relative;
    display: block;
}

.token-price.alert::before {
    content: '⚠ EMERGENCY ⚠';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    padding: 0 10px;
    font-size: 0.8em;
    color: #f00;
    animation: blink 0.5s infinite;
}

.price-change {
    margin-left: 8px;
    font-weight: bold;
}

.price-change.positive {
    color: #0f0;
}

.price-change.negative {
    color: #f00;
}

@keyframes pulse {
    0% { border-color: #0f0; }
    50% { border-color: #0a0; }
    100% { border-color: #0f0; }
}

@keyframes pulse-red {
    0% { border-color: #f00; background-color: #300; }
    50% { border-color: #900; background-color: #200; }
    100% { border-color: #f00; background-color: #300; }
}

.chat-container {
    background-color: #000;
    border: 2px solid #0ff;
    border-radius: 10px;
    box-shadow: 0 0 20px #0ff5;
    overflow: hidden;
    position: relative;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0ff;
    animation: scan-line 2s linear infinite;
}

.chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(180deg, #0001, #0004);
}

.message {
    margin: 10px 0;
    padding: 15px;
    border-radius: 5px;
    max-width: 80%;
    position: relative;
    animation: message-appear 0.3s ease-out;
}

.system {
    background-color: #011;
    border-left: 3px solid #0ff;
    margin-right: auto;
    box-shadow: 0 0 10px #0ff3;
}

.system.typing {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #0ff;
    border-radius: 50%;
    opacity: 0;
    animation: typing-dot 1s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

.system p {
    margin: 0;
    opacity: 0;
    overflow: hidden;
    white-space: pre-wrap;
    animation: typing 0.05s steps(1) forwards;
}

@keyframes typing {
    to { opacity: 1; }
}

.user {
    background-color: #001;
    border-right: 3px solid #0ff;
    margin-left: auto;
    color: #0ff;
    box-shadow: 0 0 10px #0ff3;
}

.input-area {
    display: flex;
    padding: 20px;
    background-color: #001;
    border-top: 2px solid #0ff;
    position: relative;
}

input {
    flex: 1;
    padding: 15px;
    background-color: #000;
    border: 1px solid #0ff;
    color: #0ff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

input:focus {
    box-shadow: 0 0 15px #0ff5;
}

button {
    padding: 15px 25px;
    margin-left: 10px;
    background-color: #0ff;
    color: #000;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: #0aa;
    box-shadow: 0 0 20px #0ff;
}

button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, #fff3, transparent);
    transform: rotate(45deg);
    animation: button-shine 2s infinite;
}

@keyframes medical-scan {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); text-shadow: 0 0 20px #0ff, 0 0 30px #0ff, 0 0 40px #0ff; }
    100% { transform: translateY(0); }
}

@keyframes warning-pulse {
    0% { background-color: #300; }
    50% { background-color: #500; }
    100% { background-color: #300; }
}

@keyframes scan-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes message-appear {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes button-shine {
    0% { left: -50%; }
    100% { left: 100%; }
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #0ff;
    box-shadow: 0 0 10px #0ff;
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
    body {
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 10px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    header {
        margin-bottom: 15px;
        flex-shrink: 0;
    }

    .chat-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .chat-box {
        flex: 1;
        height: auto;
        min-height: 60vh;
        max-height: calc(100vh - 300px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    h1 {
        font-size: 2em;
    }

    h1::before {
        font-size: 0.4em;
        top: -15px;
    }

    .message {
        max-width: 90%;
        padding: 12px;
        font-size: 16px;
    }

    .input-area {
        padding: 15px;
    }

    input {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    button {
        padding: 12px 20px;
        font-size: 16px;
    }

    .token-price.alert {
        padding: 10px;
        font-size: 1em;
    }

    /* Improve touch targets */
    button, input {
        min-height: 44px; /* iOS minimum touch target size */
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .tagline {
        font-size: 0.9em;
    }

    /* Make messages more readable on mobile */
    .system, .user {
        font-size: 1em;
        line-height: 1.4;
    }
}

/* Additional fixes for very small screens */
@media screen and (max-width: 380px) {
    h1 {
        font-size: 1.8em;
    }

    .message {
        max-width: 95%;
    }

    .input-area {
        padding: 10px;
    }
}

.social-links {
    text-align: center;
    padding: 15px;
    margin-top: 10px;
}

.social-links a {
    color: #0ff;
    text-decoration: none;
    font-size: 0.9em;
    opacity: 0.8;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.social-links a:hover {
    opacity: 1;
    text-shadow: 0 0 10px #0ff;
} 