/* Linear.ai inspired styles */
:root {
    --shadow-soft: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in-delayed {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile slide-in animations */
@media (max-width: 1023px) {
    .fade-in {
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInMobile 0.6s ease-out forwards;
    }
    
    .fade-in-delayed {
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInMobile 0.6s ease-out 0.3s forwards;
    }
    
    @keyframes slideInMobile {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Shadow utilities */
.shadow-soft {
    box-shadow: var(--shadow-soft);
}

.shadow-medium {
    box-shadow: var(--shadow-medium);
}

/* Input field styles */
.input-field {
    @apply px-0 py-3 bg-transparent border-0 border-b border-gray-300 focus:border-blue-500 focus:outline-none focus:ring-0 transition-colors duration-200;
    font-family: 'Inter', sans-serif;
}

.input-field:focus {
    box-shadow: 0 2px 0 0 #3b82f6;
}

/* Dark theme input field styles */
.input-field-dark {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.input-field-dark:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-field-dark::placeholder {
    color: #6b7280;
}

.input-field-dark option {
    background: #1a1a1a;
    color: #ffffff;
}

/* Button styles for dark theme */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #a0a0a0;
    border: 1px solid #2a2a2a;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    border-color: #667eea;
    color: white;
}

/* Terminal styles */
.cursor-blink {
    animation: blink 1s infinite;
}

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

/* Terminal typewriter effect */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 0.8s steps(40, end);
}

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

/* Custom scrollbar for terminal */
.bg-gray-900::-webkit-scrollbar {
    width: 6px;
}

.bg-gray-900::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
}

.bg-gray-900::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

.bg-gray-900::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

/* Focus states for accessibility */
.input-field:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Chat bubble animations */
.chat-bubble-enter {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    animation: bubbleEnter 0.5s ease-out forwards;
}

@keyframes bubbleEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Status indicator pulse */
.status-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Enhanced hover effects */
.card-hover {
    transition: var(--transition-smooth);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
    font-feature-settings: 'kern' 1, 'liga' 1, 'clig' 1, 'calt' 1;
}

/* Selection color */
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.9) translateY(30px);
    transition: all 0.3s ease;
}

.modal-dark {
    background: #161616;
    border: 1px solid #2a2a2a;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: #6b7280;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-content {
    padding: 48px 32px 32px;
}

/* Modal responsive adjustments */
@media (max-width: 640px) {
    .modal-container {
        width: 95%;
        margin: 0 10px;
    }
    
    .modal-content {
        padding: 40px 24px 24px;
    }
}

/* Enhanced textarea styling */
textarea.input-field {
    min-height: 100px;
    resize: vertical;
}

::selection {
    background-color: #3b82f6;
    color: white;
}

::-moz-selection {
    background-color: #3b82f6;
    color: white;
}
