/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red-primary: #ff0000;
    --red-dark: #cc0000;
    --green-primary: #00ff00;
    --green-bright: #00ff88;
    --green-dark: #00cc00;
    --black: #000000;
    --gray-dark: #111111;
    --gray-medium: #333333;
    --white: #ffffff;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--red-primary);
    color: var(--white);
    cursor: none;
    overflow-x: hidden;
    min-height: 200vh;
    transition: background 0.1s ease;
}

/* ===== CROSSHAIR CURSOR ===== */
.crosshair-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.crosshair-horizontal,
.crosshair-vertical {
    position: absolute;
    background: var(--green-primary);
    box-shadow: 0 0 10px var(--green-primary);
}

.crosshair-horizontal {
    width: 40px;
    height: 2px;
    top: -1px;
    left: -20px;
}

.crosshair-vertical {
    width: 2px;
    height: 40px;
    top: -20px;
    left: -1px;
}

/* ===== PRICE TICKER ===== */
.price-ticker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid var(--green-primary);
    z-index: 1000;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    color: var(--green-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 4rem;
    text-shadow: 0 0 5px var(--green-primary);
}

.ticker-item .positive {
    color: var(--green-primary);
    text-shadow: 0 0 5px var(--green-primary);
}

.ticker-item .negative {
    color: var(--red-primary);
    text-shadow: 0 0 5px var(--red-primary);
}

@keyframes tickerScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== TERMINAL CONTAINER ===== */
.terminal-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 60px 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    border: 2px solid var(--green-primary);
    border-bottom: none;
    position: relative;
}

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

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background: #ff5f56; }
.control.yellow { background: #ffbd2e; }
.control.green { background: #27ca3f; }

.terminal-title {
    color: var(--green-primary);
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 0 5px var(--green-primary);
}

.terminal-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.terminal-time {
    color: var(--green-primary);
    font-size: 0.9rem;
}

.skip-button {
    background: none;
    color: var(--green-primary);
    border: none;
    padding: 4px 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.skip-button:hover {
    color: #22c55e;
    text-shadow: 0 0 5px var(--green-primary);
}

.terminal-content {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--green-primary);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 20px;
    min-height: 60vh;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 10px;
}

.terminal-line.startup {
    opacity: 1;
}

.prompt {
    color: var(--green-primary);
    font-weight: 700;
}

.command {
    color: var(--white);
    margin-left: 10px;
}

.output {
    color: var(--green-primary);
    margin-left: 20px;
}

.error {
    color: var(--red-primary);
    margin-left: 20px;
}

.success {
    color: var(--green-bright);
    margin-left: 20px;
    font-weight: 600;
}

.ascii-art {
    color: var(--green-primary);
    font-size: 0.8rem;
    line-height: 1.2;
    margin: 20px 0;
    text-align: center;
    white-space: pre;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: none;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
    perspective: 1000px;
}

.action-buttons.show {
    display: flex;
    animation: buttonsSlideUp 1s ease forwards;
}

.action-btn {
    position: relative;
    padding: 20px 40px;
    background: var(--black);
    border: 3px solid var(--green-primary);
    border-radius: 15px;
    color: var(--green-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    overflow: hidden;
    min-width: 200px;
    text-align: center;
    
    /* 3D Effect */
    transform-style: preserve-3d;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.action-btn::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: left 0.5s ease;
}

.action-btn:hover {
    transform: translateY(-10px) rotateX(15deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(0, 255, 0, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    color: var(--green-bright);
    text-shadow: 0 0 10px var(--green-primary);
    border-color: var(--green-bright);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:active {
    transform: translateY(-5px) rotateX(10deg);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--green-primary), transparent);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.action-btn:hover .btn-glow {
    width: 200px;
    height: 200px;
    opacity: 0.1;
}

/* ===== AI MODAL ===== */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.ai-modal.active {
    display: flex;
}

.ai-modal-content {
    background: var(--black);
    border: 3px solid var(--green-primary);
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.5);
}

.ai-header {
    background: var(--gray-dark);
    padding: 15px 20px;
    border-bottom: 2px solid var(--green-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-title {
    color: var(--green-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.close-btn {
    background: none;
    border: 2px solid var(--green-primary);
    color: var(--green-primary);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: none;
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--green-primary);
    color: var(--black);
}

.ai-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-message {
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 80%;
    animation: messageSlide 0.3s ease;
}

.ai-message.user {
    background: var(--gray-dark);
    color: var(--white);
    align-self: flex-end;
    border: 1px solid var(--green-primary);
}

.ai-message.ai {
    background: rgba(0, 255, 0, 0.1);
    color: var(--green-primary);
    align-self: flex-start;
    border: 1px solid var(--green-primary);
}

.ai-input-container {
    padding: 20px;
    border-top: 2px solid var(--green-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-prompt {
    color: var(--green-primary);
    font-weight: 700;
}

.ai-input-container input {
    flex: 1;
    background: var(--black);
    border: 2px solid var(--green-primary);
    border-radius: 5px;
    padding: 10px;
    color: var(--white);
    font-family: var(--font-mono);
    outline: none;
}

.ai-input-container input:focus {
    border-color: var(--green-bright);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.ai-input-container button {
    background: var(--green-primary);
    border: none;
    color: var(--black);
    padding: 10px 15px;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: none;
    transition: var(--transition);
}

.ai-input-container button:hover {
    background: var(--green-bright);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* ===== ANIMATIONS ===== */


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

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .terminal-container {
        padding: 60px 10px 20px;
    }
    
    .terminal-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .terminal-content {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        min-width: 250px;
        padding: 15px 30px;
    }
    
    .ticker-item {
        font-size: 0.8rem;
        margin-right: 2rem;
    }
    
    .crosshair-horizontal {
        width: 30px;
        left: -15px;
    }
    
    .crosshair-vertical {
        height: 30px;
        top: -15px;
    }
    
    /* AI Modal Tablet Responsive */
    .ai-modal-content {
        width: 90vw;
        height: 90vh;
        margin: 20px;
    }
    
    .ai-messages {
        max-height: calc(90vh - 120px);
    }
    
    .ai-message {
        max-width: 85%;
        font-size: 0.9rem;
    }
    
    .ai-input-container {
        padding: 15px 20px;
    }
    
    .ai-input-container input {
        font-size: 0.9rem;
    }
    
    .ai-input-container button {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .terminal-title {
        font-size: 0.9rem;
    }
    
    .terminal-content {
        font-size: 0.8rem;
        min-height: 50vh;
    }
    
    .action-btn {
        font-size: 1rem;
        padding: 12px 25px;
    }
    
    /* AI Modal Mobile Responsive */
    .ai-modal-content {
        height: 95vh;
        width: 95vw;
        margin: 10px;
        border-radius: 10px;
    }
    
    .ai-header {
        padding: 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .ai-title {
        font-size: 0.9rem;
    }
    
    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
        line-height: 30px;
    }
    
    .ai-messages {
        padding: 15px;
        max-height: calc(95vh - 140px);
    }
    
    .ai-message {
        padding: 8px 12px;
        max-width: 90%;
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .ai-input-container {
        padding: 15px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .ai-prompt {
        font-size: 0.8rem;
        min-width: 100%;
        margin-bottom: 5px;
    }
    
    .ai-input-container input {
        flex: 1;
        min-width: 0;
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .ai-input-container button {
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .ai-modal-content {
        height: 98vh;
        width: 98vw;
        margin: 5px;
    }
    
    .ai-messages {
        max-height: calc(98vh - 130px);
        padding: 10px;
    }
    
    .ai-message {
        padding: 6px 10px;
        font-size: 0.8rem;
        max-width: 95%;
    }
    
    .ai-input-container {
        padding: 10px;
        gap: 5px;
    }
    
    .ai-input-container input {
        padding: 6px;
        font-size: 0.8rem;
    }
    
    .ai-input-container button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Landscape mobile orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .ai-modal-content {
        height: 98vh;
        max-height: 98vh;
    }
    
    .ai-messages {
        max-height: calc(98vh - 100px);
    }
    
    .ai-header {
        padding: 10px 15px;
    }
    
    .ai-input-container {
        padding: 10px 15px;
    }
}
