/* BotSpeak Custom Styles */

:root {
    --bs-primary: #2563eb;
    --bs-success: #16a34a;
    --bs-info: #0891b2;
    --bs-warning: #d97706;
    --bs-danger: #dc2626;
    --bs-dark: #1f2937;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    --gradient-info: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8fafc;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="25" r="0.5" fill="rgba(255,255,255,0.03)"/><circle cx="25" cy="75" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.25);
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-radius: 0;
    border-bottom: none;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* Statistics Boxes */
.stat-box {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature Boxes */
.feature-box {
    text-align: center;
    padding: 1.5rem;
    height: 100%;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-width: 2px;
}

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

.btn-success {
    background: var(--gradient-success);
    border-color: #16a34a;
}

.btn-info {
    background: var(--gradient-info);
    border-color: #0891b2;
}

.btn-warning {
    background: var(--gradient-warning);
    border-color: #d97706;
}

.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--bs-primary);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dictionary Search Results */
.search-result-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    border-color: var(--bs-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.code-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    font-size: 0.875rem;
}

.code-badge.numeric {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.code-badge.alphanumeric {
    background: rgba(8, 145, 178, 0.1);
    color: #0e7490;
    border: 1px solid rgba(8, 145, 178, 0.2);
}

.code-badge.four-digit {
    background: rgba(217, 119, 6, 0.1);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

/* Example Demo */
.example-demo {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    border-top: 1px solid #374151;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Success/Error Messages */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    border-left: 4px solid #16a34a;
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: #b45309;
    border-left: 4px solid #d97706;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    border-left: 4px solid #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .stat-box {
        margin-bottom: 1rem;
    }
    
    .feature-box {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Section Spacing */
section {
    scroll-margin-top: 100px;
}

/* Copy Feedback */
.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #16a34a;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1050;
    animation: fadeIn 0.3s ease-out;
}

/* Unknown codes styling */
.unknown-code {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    margin: 0.25rem;
    display: inline-block;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
