/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #ffc527;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

/* CA Address Box */
.ca-address {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid #ffc527;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #ffc527;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

/* Loading screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.4s ease;
}

.glitch-text {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffc527;
    margin-bottom: 1em;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 5px #ffc527;
    }
    50% {
        text-shadow: 0 0 20px #ffc527;
    }
}

.progress-container {
    width: 80%;
    max-width: 400px;
    height: 2px;
    background-color: #001100;
    margin-bottom: 0.5em;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: #ffc527;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px #ffc527;
}

.loading-status {
    font-size: 1em;
    color: #ffc527;
    text-align: center;
    text-shadow: 0 0 5px #ffc527;
    margin-top: 0.5em;
}

/* Social and Audio Controls */
.twitter-container {
    position: fixed;
    top: 50px;
    left: 20px;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.audio-container {
    position: fixed;
    top: 50px;
    right: 20px;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.twitter-container.hidden,
.audio-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.twitter-x {
    width: 24px;
    height: 24px;
    fill: #ffc527;
    cursor: pointer;
    transition: filter 0.3s ease;
}

.twitter-x:hover {
    filter: brightness(1.5) drop-shadow(0 0 5px #ffc527);
}

.audio-control {
    width: 32px;
    height: 32px;
    background: none;
    border: 2px solid #ffc527;
    border-radius: 50%;
    color: #ffc527;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    outline: none;
    padding: 0;
    text-shadow: 0 0 10px #ffc527;
}

.audio-control:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 10px #ffc527;
    transform: scale(1.1);
}

.audio-control.muted {
    opacity: 0.5;
    text-decoration: line-through;
    transform: scale(0.95);
}

.audio-control.muted:hover {
    opacity: 0.8;
    transform: scale(1);
}

/* Terminal container */
.container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.container.visible {
    opacity: 1;
}

/* Terminal styling */
#terminal {
    width: 90%;
    height: 85%;
    max-width: 1000px;
    max-height: 700px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffc527;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.2),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
    position: relative;
    z-index: 1;
    font-size: 16px;
    line-height: 1.2;
    margin-top: 30px;
}

#terminal::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid #ffc527;
    animation: borderGlow 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px #ffc527;
    }
    50% {
        box-shadow: 0 0 15px #ffc527;
    }
}

.terminal {
    --color: #ffc527;
    --background: transparent;
    --size: 1.5;
    --animation: terminal-glow;
}

.terminal-output div span {
    color: #ffc527 !important;
}

/* Custom terminal prompt styling */
.terminal .prompt {
    color: #ffc527 !important;
    font-weight: bold;
}

.terminal .cmd {
    color: #ffc527 !important;
}

/* Enhanced cursor styling */
.terminal .cmd .cursor.blink {
    background: #ffc527;
    color: black;
    width: 10px !important;
    height: 18px !important;
    margin-left: 1px;
    margin-right: 1px;
    position: relative;
    opacity: 1;
    animation: terminal-blink 1s infinite, cursor-pulse 2s infinite;
}

.terminal .cmd .cursor.blink::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid #ffc527;
    box-shadow: 0 0 8px #ffc527;
    animation: cursor-glow 2s ease-in-out infinite;
}

@keyframes terminal-blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

@keyframes cursor-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes cursor-glow {
    0%, 100% {
        box-shadow: 0 0 8px #ffc527;
    }
    50% {
        box-shadow: 0 0 16px #ffc527;
    }
}

/* Agent viewer */
#agent-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

#agent-viewer.visible {
    opacity: 1;
}

#agent-canvas {
    width: 100%;
    height: 100%;
}

.viewer-controls {
    position: absolute;
    top: 50px;
    right: 20px;
    z-index: 101;
}

.close-viewer {
    background: none;
    border: 2px solid #ffc527;
    color: #ffc527;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
}

.close-viewer:hover {
    background-color: #ffc527;
    color: #000;
    box-shadow: 0 0 10px #ffc527;
}

.agent-info {
    position: absolute;
    top: 50px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border: 1px solid #ffc527;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    color: #ffc527;
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
    max-width: calc(100% - 40px);
    overflow: auto;
}

.agent-info h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
    text-shadow: 0 0 5px #ffc527;
}

.agent-info p {
    margin: 5px 0;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Matrix rain background */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #001100;
}

::-webkit-scrollbar-thumb {
    background: #ffc527;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Terminal glow effect */
@keyframes terminal-glow {
    0%, 100% {
        text-shadow: 0 0 8px #ffc527;
    }
    50% {
        text-shadow: 0 0 16px #ffc527;
    }
}

/* Waitlist button */
.waitlist-button {
    background: none;
    border: 2px solid #ffc527;
    color: #ffc527;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    font-size: 14px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.waitlist-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 0, 0.2),
        transparent
    );
    transition: 0.5s;
}

.waitlist-button:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px #ffc527;
}

.waitlist-button:hover:before {
    left: 100%;
}

.waitlist-button:active {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px #ffc527;
    transform: scale(0.98);
}

.waitlist-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Notification */
.matrix-notification {
    position: fixed;
    top: 50px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 20px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    z-index: 2000;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s ease;
}

.matrix-notification.success {
    color: #ffc527;
    border: 1px solid #ffc527;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.matrix-notification.error {
    color: #ffc527;
    border: 1px solid #ffc527;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.matrix-notification.show {
    opacity: 1;
    transform: translateX(0);
}
