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

@font-face {
    font-family: 'Matrix';
    src: local('Consolas'), local('Monaco'), local('Courier New');
}

body {
    background: #000;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    overflow: hidden;
}

#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

.terminal-container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 900px;
    height: 600px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #00ff00;
    border-radius: 8px;
    box-shadow:
        0 0 10px #00ff00,
        0 0 20px #00ff0080,
        0 0 30px #00ff0040,
        inset 0 0 50px rgba(0, 255, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background: linear-gradient(180deg, #001a00 0%, #000d00 100%);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00ff0050;
}

.terminal-title {
    color: #00ff00;
    font-size: 14px;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 2px;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.minimize { background: #ffbd2e; }
.btn.maximize { background: #28c940; }
.btn.close { background: #ff5f56; }

.btn:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px currentColor;
}

.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #001a00;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #00ff0050;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #00ff0080;
}

.output {
    flex: 1;
    color: #00ff00;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-line {
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease;
}

.output-line.command {
    color: #00ff00;
}

.output-line.response {
    color: #00cc00;
    padding-left: 10px;
}

.output-line.error {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

.output-line.success {
    color: #00ff00;
    text-shadow: 0 0 15px #00ff00;
}

.output-line.system {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.output-line.warning {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

/* Terminal links - clickable URLs */
.terminal-link {
    color: #00ffff;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-link:hover {
    color: #ffffff;
    text-shadow: 0 0 15px #00ffff;
}

.pro-mode .terminal-link {
    color: #ff6666;
}

.pro-mode .terminal-link:hover {
    color: #ffffff;
    text-shadow: 0 0 15px #ff6666;
}

/* Solscan links in copy trade notifications */
.solscan-link {
    color: #00ff00;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.2s ease;
}

.solscan-link:hover {
    color: #ffffff;
    text-shadow: 0 0 15px #00ff00;
}

/* Copy button styling */
.copy-btn {
    background: transparent;
    border: 1px solid #00ffff;
    color: #00ffff;
    font-family: inherit;
    font-size: 12px;
    padding: 2px 8px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #00ffff;
    color: #000;
    text-shadow: none;
}

.pro-mode .copy-btn {
    border-color: #ff6666;
    color: #ff6666;
}

.pro-mode .copy-btn:hover {
    background: #ff6666;
    color: #000;
}

.wallet-address {
    color: #00ff00;
    font-family: monospace;
}

.pro-mode .wallet-address {
    color: #ff0000;
}

/* Copy address button styling */
.copy-address {
    color: #00ff00;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.copy-address:hover {
    color: #ffffff;
    text-shadow: 0 0 15px #00ff00;
}

.input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.prompt {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    margin-right: 10px;
    white-space: nowrap;
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff00;
    font-family: inherit;
    font-size: 14px;
    caret-color: transparent;
    text-shadow: 0 0 5px #00ff00;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: #00ff00;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px #00ff00;
}

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

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

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.glitch {
    animation: glitch 0.3s ease;
}

/* ASCII Art styling */
.ascii-art {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    font-size: 12px;
    line-height: 1.2;
}

/* Typing effect */
.typing {
    overflow: hidden;
    border-right: 2px solid #00ff00;
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #00ff00; }
}

/* Scanline effect */
.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 100;
}

/* CRT flicker effect */
.terminal-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 255, 0, 0.03);
    opacity: 0;
    pointer-events: none;
    animation: flicker 0.15s infinite;
    z-index: 101;
}

@keyframes flicker {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.01; }
}

/* Logo container */
.logo-container {
    text-align: center;
    margin-bottom: 10px;
    transition: opacity 0.15s ease;
}

.logo-line {
    line-height: 1.1;
    margin-bottom: 0;
}

/* System info styling */
.output-line.system-info {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

/* Dim text for secondary info */
.output-line.dim {
    color: #006600;
    text-shadow: none;
}

/* Command prompt styling */
.output-line.command {
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
    margin-top: 10px;
}

/* Response styling - no padding for cleaner look */
.output-line.response {
    color: #00cc00;
    padding-left: 0;
    white-space: pre-wrap;
}

/* Wallet Status in header */
.wallet-status {
    color: #00ff00;
    font-size: 11px;
    opacity: 0.8;
    letter-spacing: 1px;
}

.wallet-status.connected {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

/* Wallet Connect Button */
.wallet-connect-btn {
    background: linear-gradient(180deg, #002200 0%, #001100 100%);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 15px 40px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    margin: 20px auto;
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px #00ff0040;
}

.wallet-connect-btn:hover {
    background: linear-gradient(180deg, #003300 0%, #001a00 100%);
    box-shadow: 0 0 30px #00ff0080, inset 0 0 20px #00ff0020;
    transform: scale(1.05);
    text-shadow: 0 0 10px #00ff00;
}

.wallet-connect-btn:active {
    transform: scale(0.98);
}

.wallet-connect-btn.connecting {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px #00ff0040; }
    50% { box-shadow: 0 0 40px #00ff0080; }
}

/* Skull Overlay */
.skull-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.skull-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.skull-ascii {
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00, 0 0 60px #00ff00;
    font-size: 8px;
    line-height: 1;
    transform: scale(0.5);
    animation: skullZoom 2s ease-out forwards;
    white-space: pre;
    text-align: center;
}

@keyframes skullZoom {
    0% {
        transform: scale(0.3) translateZ(-500px);
        opacity: 0;
        filter: blur(10px);
    }
    30% {
        opacity: 1;
        filter: blur(5px);
    }
    50% {
        transform: scale(1.5) translateZ(0);
        filter: blur(0);
    }
    70% {
        transform: scale(2) translateZ(100px);
        text-shadow: 0 0 30px #00ff00, 0 0 60px #00ff00, 0 0 100px #ff0000;
    }
    100% {
        transform: scale(15) translateZ(500px);
        opacity: 0;
        filter: blur(20px);
    }
}

/* Pro Mode styling */
.output-line.pro-header {
    color: #ff0000;
    text-shadow: 0 0 15px #ff0000, 0 0 30px #ff0000;
}

.output-line.pro-command {
    color: #ff3333;
    text-shadow: 0 0 10px #ff3333;
}

/* Red accent for pro mode */
.pro-mode .terminal-container {
    border-color: #ff0000;
    box-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff000080,
        0 0 30px #ff000040,
        inset 0 0 50px rgba(255, 0, 0, 0.05);
}

.pro-mode .terminal-title {
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
}

.pro-mode .prompt {
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
}

.pro-mode #command-input {
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.pro-mode .cursor {
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000;
}

.pro-mode .ascii-art,
.pro-mode .logo-line {
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
}

.pro-mode .output-line.system-info {
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.pro-mode .output-line.response {
    color: #cc0000;
}

.pro-mode #matrix-rain {
    filter: hue-rotate(120deg);
}

/* Disconnect Button */
.disconnect-btn {
    background: transparent;
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 5px 15px;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: 15px;
}

.disconnect-btn:hover {
    background: #ff000020;
    box-shadow: 0 0 15px #ff000060;
    text-shadow: 0 0 10px #ff0000;
}

.disconnect-btn.hidden {
    display: none;
}

/* ==========================================
   MOBILE RESPONSIVE STYLES
   ========================================== */

/* Tablets and smaller laptops */
@media (max-width: 900px) {
    .terminal-container {
        width: 95%;
        height: 90vh;
        max-height: none;
    }
}

/* Mobile logo - text replacement for ASCII art */
.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 15px;
}

.mobile-logo-text {
    font-size: 28px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 20px #00ff00, 0 0 40px #00ff00;
    letter-spacing: 8px;
}

.mobile-logo-sub {
    font-size: 10px;
    color: #00ff00;
    opacity: 0.7;
    letter-spacing: 4px;
    margin-top: 5px;
}

.pro-mode .mobile-logo-text,
.pro-mode .mobile-logo-sub {
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
}

/* Mobile devices */
@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 10px;
    }

    .terminal-container {
        width: 100%;
        height: calc(100vh - 20px);
        border-radius: 4px;
    }

    .terminal-header {
        padding: 8px 10px;
        flex-wrap: wrap;
        gap: 5px;
    }

    .terminal-title {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .wallet-status {
        font-size: 9px;
        order: 3;
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }

    .disconnect-btn {
        font-size: 8px;
        padding: 3px 10px;
        margin-right: 10px;
    }

    .terminal-buttons {
        gap: 5px;
    }

    .btn {
        width: 10px;
        height: 10px;
    }

    .terminal-body {
        padding: 10px;
    }

    .output {
        font-size: 11px;
        line-height: 1.4;
    }

    /* Hide ASCII logo, show mobile text logo */
    .logo-container {
        display: none !important;
    }

    .mobile-logo {
        display: block !important;
    }

    .input-line {
        margin-top: 5px;
    }

    .prompt {
        font-size: 14px;
        margin-right: 5px;
    }

    #command-input {
        font-size: 14px;
    }

    .cursor {
        width: 8px;
        height: 16px;
    }

    /* Wallet modal on mobile */
    .wallet-modal {
        min-width: 90%;
        padding: 20px;
    }

    .wallet-modal h2 {
        font-size: 14px;
    }

    .wallet-option {
        padding: 12px 15px;
    }

    .wallet-option img {
        width: 24px;
        height: 24px;
    }

    .wallet-option span {
        font-size: 14px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .terminal-container {
        border-radius: 0;
        height: 100vh;
    }

    body {
        padding: 0;
    }

    .terminal-body {
        padding: 8px;
    }

    .output {
        font-size: 10px;
    }

    .mobile-logo-text {
        font-size: 24px;
        letter-spacing: 6px;
    }

    .terminal-header {
        padding: 6px 8px;
    }

    .terminal-title {
        font-size: 11px;
    }

    .output-line.response {
        font-size: 10px;
    }
}
