/* Custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Smooth animations */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Slide up animation for modals */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Hide scrollbar on filter tags */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Code block styling */
.code-inline {
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8em;
}

/* Pulse animation for status indicators */
@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* Custom checkbox styling */
.custom-check {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #475569;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
.custom-check:checked {
    background: #10b981;
    border-color: #10b981;
}
.custom-check:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Solution step styling */
.solution-step {
    counter-increment: step;
}
.solution-step::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Port row hover */
.port-row {
    transition: background-color 0.15s;
}
.port-row:active {
    background-color: rgba(139, 92, 246, 0.1);
}

/* Prevent overscroll on iOS */
body {
    overscroll-behavior: none;
}