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

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    min-height: 100vh;
    overflow: hidden;
}

/* Animated background glows */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    animation: float 12s ease-in-out infinite;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: #6c3ce0;
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: #e03c8a;
    bottom: -10%;
    left: -5%;
    animation-delay: -4s;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: #3c8ae0;
    top: 40%;
    left: 50%;
    animation-delay: -8s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.header-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #22c55e;
    text-transform: uppercase;
}

/* Main display area */
.display {
    flex: 1;
    overflow-y: auto;
    padding: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-behavior: smooth;
}

.display::-webkit-scrollbar {
    width: 4px;
}

.display::-webkit-scrollbar-track {
    background: transparent;
}

.display::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Welcome state */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 16px;
    opacity: 0.5;
}

.welcome-emoji {
    font-size: 64px;
    animation: float-gentle 4s ease-in-out infinite;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.welcome-text {
    font-size: 28px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.welcome-sub {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
}

/* Messages */
.message {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px 36px;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(30px) scale(0.97);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.message-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.message-enter {
    animation: glow-border 2s ease-out;
}

@keyframes glow-border {
    0% { border-color: rgba(108, 60, 224, 0.6); box-shadow: 0 0 30px rgba(108, 60, 224, 0.15); }
    100% { border-color: rgba(255, 255, 255, 0.06); box-shadow: none; }
}

.message-text {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #f0abfc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.message-meta {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 14px;
    letter-spacing: 0.5px;
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.footer-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-text.connected {
    color: #22c55e;
}

.footer-text.disconnected {
    color: #ef4444;
}

.message-count {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px 20px;
    }

    .message {
        padding: 20px 24px;
    }

    .message-text {
        font-size: 28px;
    }

    .welcome-text {
        font-size: 20px;
    }

    .welcome-emoji {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .message-text {
        font-size: 22px;
    }
}
