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

body {
    font-family: 'Courier New', 'Lucida Console', monospace;
    background: #000000;
    color: #0099ff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
}

#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 0, 0, 0.1) 0%,
        rgba(0, 255, 0, 0.1) 50%,
        rgba(0, 0, 255, 0.1) 100%
    );
    animation: glitchOverlay 10s infinite;
}

@keyframes glitchOverlay {
    0%, 90% { opacity: 0; }
    92% { opacity: 0.8; }
    93% { opacity: 0; }
    94% { opacity: 0.5; }
    95% { opacity: 0; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}


@keyframes unstableText {
    0%, 90% { transform: translate(0); }
    92% { transform: translate(-2px, 2px); }
    94% { transform: translate(2px, -2px); }
    96% { transform: translate(-1px, -1px); }
    98% { transform: translate(1px, 1px); }
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #0044ff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 94% { clip-path: inset(0 0 0 0); transform: translate(0); }
    95% { clip-path: inset(33% 0 0 0); transform: translate(-2px); }
    96% { clip-path: inset(0 0 75% 0); transform: translate(2px); }
    97% { clip-path: inset(0 0 0 0); transform: translate(0); }
}

@keyframes glitch-2 {
    0%, 94% { clip-path: inset(0 0 0 0); transform: translate(0); }
    95% { clip-path: inset(0 0 43% 0); transform: translate(2px); }
    96% { clip-path: inset(65% 0 0 0); transform: translate(-2px); }
    97% { clip-path: inset(0 0 0 0); transform: translate(0); }
}

.status-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 150, 255, 0.1);
    border: 2px solid #0099ff;
    padding: 15px;
    margin: 20px 0;
    font-size: 1.2rem;
    animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
    0%, 100% { border-color: #0099ff; }
    50% { border-color: #0044ff; }
}

.mood-value {
    color: #ffff00;
    animation: flicker 1s infinite;
}

.stability-value {
    color: #00ccff;
    font-weight: bold;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-container {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0099ff;
    min-height: 400px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

#chat-output {
    padding: 20px;
    min-height: 350px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

.ai-message {
    margin: 15px 0;
    padding: 10px;
    border-left: 3px solid #0099ff;
    animation: messageGlitch 5s infinite;
}

@keyframes messageGlitch {
    0%, 95% { transform: skew(0deg); }
    96% { transform: skew(1deg); }
    97% { transform: skew(-1deg); }
    98% { transform: skew(0deg); }
}

.user-message {
    margin: 15px 0;
    padding: 10px;
    border-left: 3px solid #00ccff;
    opacity: 0.8;
}

.error-message {
    color: #ff0000;
    font-weight: bold;
    animation: errorBlink 0.5s infinite;
}

@keyframes errorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.corrupted {
    font-family: 'Wingdings', 'Webdings', monospace;
    color: #ff00ff;
}

.input-container {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: rgba(0, 150, 255, 0.05);
    border-top: 2px solid #0099ff;
}

#user-input {
    flex: 1;
    padding: 10px;
    background: #000;
    border: 1px solid #0099ff;
    color: #0099ff;
    font-family: inherit;
    font-size: 1.1rem;
}

#user-input:focus {
    outline: none;
    box-shadow: 0 0 10px #0099ff;
}

button {
    padding: 10px 20px;
    background: rgba(0, 150, 255, 0.2);
    border: 2px solid #0099ff;
    color: #0099ff;
    font-family: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: rgba(0, 150, 255, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 15px #0099ff;
}

.danger-btn {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
    animation: dangerPulse 2s infinite;
}

@keyframes dangerPulse {
    0%, 100% { box-shadow: 0 0 5px #ff0000; }
    50% { box-shadow: 0 0 20px #ff0000; }
}

.danger-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    box-shadow: 0 0 30px #ff0000;
}

.warning-panel {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #ff0000;
    padding: 20px;
    margin: 20px 0;
    animation: warningFlash 3s infinite;
}

@keyframes warningFlash {
    0%, 95% { opacity: 1; }
    96%, 98% { opacity: 0.3; }
}

.warning-text {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    color: #ff0000;
    margin-bottom: 10px;
}

#error-log {
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #ff9900;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.control-panel {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.control-btn {
    padding: 15px 30px;
    font-weight: bold;
    text-transform: uppercase;
}

#reboot-btn {
    background: rgba(0, 100, 255, 0.2);
    border-color: #0099ff;
    color: #0099ff;
}

#chaos-btn {
    background: rgba(255, 0, 255, 0.2);
    border-color: #ff00ff;
    color: #ff00ff;
}

#stabilize-btn {
    background: rgba(0, 200, 255, 0.3);
    border-color: #00ccff;
    color: #00ccff;
}

.system-crash {
    animation: systemCrash 0.1s infinite;
}

@keyframes systemCrash {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    25% { transform: translate(-5px, 5px); filter: hue-rotate(90deg); }
    50% { transform: translate(5px, -5px); filter: hue-rotate(180deg); }
    75% { transform: translate(-5px, -5px); filter: hue-rotate(270deg); }
    100% { transform: translate(5px, 5px); filter: hue-rotate(360deg); }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
    border: 1px solid #0099ff;
}

::-webkit-scrollbar-thumb {
    background: #0099ff;
}

::-webkit-scrollbar-thumb:hover {
    background: #0066cc;
}

/* Initialization Screen Styles */
.init-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.init-container {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.init-title {
    font-size: 3.5rem;
    margin-bottom: 40px;
    color: #0099ff;
    text-shadow: 
        2px 2px 0 #0044ff,
        -2px -2px 0 #00ccff;
    animation: titleGlitch 1.5s infinite;
}

@keyframes titleGlitch {
    0%, 90% { 
        transform: translate(0); 
        color: #0099ff;
        text-shadow: 
            2px 2px 0 #0044ff,
            -2px -2px 0 #00ccff;
    }
    91% { 
        transform: translate(-3px, 2px); 
        color: #ff0066;
        text-shadow: 
            3px 3px 0 #0044ff,
            -3px -3px 0 #00ccff;
    }
    92% { 
        transform: translate(3px, -2px); 
        color: #00ccff;
        text-shadow: 
            -2px 2px 0 #ff0066,
            2px -2px 0 #0044ff;
    }
    93% { 
        transform: translate(-2px, -1px); 
        color: #0099ff;
        text-shadow: 
            4px 1px 0 #ff0066,
            -4px -1px 0 #00ccff;
    }
    94% { 
        transform: translate(1px, 2px); 
        color: #ff0066;
        text-shadow: 
            1px 1px 0 #0044ff,
            -1px -1px 0 #00ccff;
    }
    95% { 
        transform: translate(-1px, -2px); 
        color: #00ccff;
        text-shadow: 
            2px -2px 0 #ff0066,
            -2px 2px 0 #0044ff;
    }
    96% { 
        transform: translate(2px, 1px); 
        color: #0099ff;
    }
    97% { 
        transform: translate(-1px, -1px); 
        color: #ff0066;
    }
    98% { 
        transform: translate(0); 
        color: #0099ff;
    }
}

.init-status {
    background: rgba(0, 150, 255, 0.1);
    border: 2px solid #0099ff;
    padding: 30px;
    margin: 30px 0;
    text-align: left;
}

.init-line {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin: 10px 0;
    color: #0099ff;
    opacity: 0.3;
    transition: all 0.3s;
    position: relative;
}

.init-line.active {
    animation: terminalGlitch 0.1s infinite;
}

@keyframes terminalGlitch {
    0% { transform: translateX(0); }
    10% { transform: translateX(-1px); }
    20% { transform: translateX(1px); }
    30% { transform: translateX(-1px); }
    40% { transform: translateX(1px); }
    50% { transform: translateX(-2px); }
    60% { transform: translateX(2px); }
    70% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    90% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

.init-line.active {
    opacity: 1;
    color: #00ccff;
    text-shadow: 0 0 5px #00ccff;
    animation: terminalGlitch 0.1s infinite;
}

.init-line.completed {
    color: #0099ff;
    text-shadow: 0 0 5px #0099ff;
    animation: none;
}

.percentage {
    color: #00ccff;
    font-weight: bold;
    min-width: 30px;
    display: inline-block;
}

@keyframes typewriter {
    0%, 90% { color: #0099ff; }
    95% { color: #00ccff; }
}

.crypto-info {
    background: rgba(0, 200, 255, 0.1);
    border: 2px solid #00ccff;
    padding: 30px;
    margin: 30px 0;
    animation: cryptoPulse 3s infinite;
}

@keyframes cryptoPulse {
    0%, 100% { border-color: #00ccff; }
    50% { border-color: #0099ff; }
}

.crypto-info h2 {
    color: #00ccff;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ccff;
}

.token-details {
    text-align: left;
}

.token-item {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #0099ff;
}

.token-item .label {
    font-weight: bold;
    color: #00ccff;
}

.token-item .value {
    color: #0099ff;
    font-family: 'Courier New', monospace;
}

.error-text {
    color: #ff0000 !important;
    font-weight: bold;
    animation: errorBlink 0.5s infinite;
}

.enter-btn {
    font-size: 1.3rem;
    padding: 20px 40px;
    background: rgba(255, 0, 0, 0.2);
    border: 3px solid #ff0000;
    color: #ff0000;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    margin: 30px auto 0 auto;
    display: block;
    transition: all 0.3s;
    animation: dangerPulse 2s infinite;
}

.enter-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 30px #ff0000;
}

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

/* Error Popups */
.error-popup {
    position: fixed;
    top: 50px;
    right: 20px;
    background: rgba(255, 0, 0, 0.9);
    border: 2px solid #ff0000;
    color: #ffffff;
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    z-index: 9999;
    border-radius: 5px;
    box-shadow: 0 0 20px #ff0000;
    animation: popupSlide 0.5s ease-out;
    max-width: 350px;
    cursor: pointer;
}

.error-popup::before {
    content: "⚠️ SYSTEM ERROR ⚠️";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
    border-bottom: 1px solid #ffffff;
    padding-bottom: 5px;
}

@keyframes popupSlide {
    0% { 
        transform: translateX(400px);
        opacity: 0;
    }
    100% { 
        transform: translateX(0);
        opacity: 1;
    }
}

.error-popup.closing {
    animation: popupSlideOut 0.3s ease-in forwards;
}

@keyframes popupSlideOut {
    0% { 
        transform: translateX(0);
        opacity: 1;
    }
    100% { 
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Typing Animation */
.typing::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* TERMINAL STYLES */
.terminal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    color: #0099ff;
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', monospace;
}

.terminal-header {
    background: #1a1a1a;
    border-bottom: 1px solid #0099ff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.terminal-title {
    color: #00ccff;
    font-weight: bold;
    text-shadow: 0 0 5px #00ccff;
}

.terminal-status {
    color: #ffff00;
    font-size: 0.8rem;
}

.terminal-screen {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #000000;
    position: relative;
}

#terminal-output {
    min-height: calc(100vh - 180px);
    padding-bottom: 20px;
}

.terminal-line {
    margin: 5px 0;
    line-height: 1.4;
    word-wrap: break-word;
}

.terminal-prompt-line::before {
    content: "retard@unstable:~$ ";
    color: #00ccff;
    font-weight: bold;
}

.terminal-ai-line {
    color: #ff6600;
    margin-left: 0;
}

.terminal-error-line {
    color: #ff0000;
    font-weight: bold;
    animation: errorBlink 0.5s infinite;
}

.terminal-success-line {
    color: #0099ff;
}

.terminal-warning-line {
    color: #ffff00;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid #333333;
    padding: 15px 0;
    background: rgba(0, 50, 0, 0.1);
}

.terminal-prompt {
    color: #00ccff;
    font-weight: bold;
    margin-right: 5px;
    user-select: none;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #0099ff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    caret-color: transparent;
}

.terminal-cursor {
    color: #0099ff;
    font-weight: bold;
    animation: terminalBlink 1s infinite;
    margin-left: 2px;
}

@keyframes terminalBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-footer {
    background: #1a1a1a;
    border-top: 1px solid #0099ff;
    padding: 8px 20px;
    font-size: 0.8rem;
    color: #888888;
    text-align: center;
}

/* Terminal specific animations */
.terminal-line.typing::after {
    content: '_';
    animation: terminalBlink 0.5s infinite;
    color: #0099ff;
}

/* Scrollbar for terminal */
.terminal-screen::-webkit-scrollbar {
    width: 12px;
}

.terminal-screen::-webkit-scrollbar-track {
    background: #000000;
    border-left: 1px solid #0099ff;
}

.terminal-screen::-webkit-scrollbar-thumb {
    background: #0099ff;
    border: 1px solid #000000;
}

.terminal-screen::-webkit-scrollbar-thumb:hover {
    background: #0066cc;
}

/* Boot sequence styles */
.boot-line {
    color: #888888;
    font-size: 0.9rem;
    margin: 2px 0;
}

.boot-ok {
    color: #0099ff;
    font-weight: bold;
}

.boot-fail {
    color: #ff0000;
    font-weight: bold;
}

.boot-warn {
    color: #ffff00;
}