/* Custom styles */
body {
    font-family: 'JetBrains Mono', monospace;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .console-output {
        font-size: 12px;
        line-height: 1.3;
    }
    
    /* Improve touch targets */
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Make scrollbars more mobile-friendly */
    ::-webkit-scrollbar {
        width: 12px;
    }
}

/* Text selection improvements */
.select-text {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Prevent text selection from disappearing on copy */
.console-output {
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Touch-friendly scrollbar on mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 12px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #6b7280;
        border-radius: 6px;
    }
}

/* Cyberpunk glow effects */
.glow-cyan {
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.glow-green {
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* Animation for loading states */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(34, 211, 238, 0.5);
    }
    50% {
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.8);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Console styling */
.console-output {
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

/* Module panel styling */
.module-card {
    transition: all 0.2s ease;
}

.module-card:hover {
    transform: translateY(-1px);
}

/* Input styling */
input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}

textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.3);
}

/* Glass morphism effect */
.glass {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Status indicator animation */
@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-generating {
    animation: status-pulse 1s ease-in-out infinite;
}

/* Mobile drawer animation */
@keyframes slide-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slide-out-right {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.slide-in-right {
    animation: slide-in-right 0.3s ease-out;
}

.slide-out-right {
    animation: slide-out-right 0.3s ease-out;
}

/* Mobile-friendly modal */
@media (max-width: 768px) {
    .mobile-modal {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        max-height: none;
    }
}

/* Iframe styling */
iframe {
    border: 1px solid;
    border-color: inherit;
    background: white;
}

/* Line clamp utility for long module prompts */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}