/*
Code Assistant Bot Styles
Author: RSK World (https://rskworld.in)
Founder: Molla Samser
Designer & Tester: Rima Khatun
Contact: help@rskworld.in, +91 93305 39277
Year: 2026
*/

/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --rsk-blue: #0066cc;
    --rsk-green: #28a745;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-weight: 600;
}

header .text-muted {
    font-size: 0.9rem;
}

/* Main Content */
main {
    flex: 1;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

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

.card-header {
    font-weight: 600;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

/* Form Controls */
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

/* Code Input and Output Areas */
.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

#codeInput {
    resize: vertical;
    min-height: 200px;
}

#outputContent {
    max-height: 500px;
    overflow-y: auto;
}

#outputCode {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* GitHub Results */
.github-result-card {
    border: 1px solid #e1e4e8;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: white;
    transition: all 0.2s ease-in-out;
}

.github-result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.github-result-card h6 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.github-result-card .badge {
    font-size: 0.75rem;
}

.github-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.github-stats small {
    color: var(--secondary-color);
}

/* Welcome Message */
#welcomeMessage {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

#welcomeMessage h5 {
    color: white;
}

#welcomeMessage .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 0.5rem;
    background: white;
    transition: all 0.3s ease-in-out;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: all 0.3s ease-in-out;
}

.feature-card:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
}

footer h6 {
    color: white;
    font-weight: 600;
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

footer a:hover {
    color: var(--primary-color);
}

/* Toast Notifications */
.toast {
    background-color: white;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-header {
    background-color: var(--light-color);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Syntax Highlighting Overrides */
pre[class*="language-"] {
    margin: 0;
    padding: 1rem;
    background-color: #2d2d2d;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

code[class*="language-"] {
    color: #f8f8f2;
    text-shadow: 0 1px rgba(0,0,0,0.3);
    font-family: 'Courier New', Courier, monospace;
}

/* Character Counter */
.form-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .github-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    header .text-md-end {
        text-align: left !important;
        margin-top: 1rem;
    }
    
    footer .text-md-end {
        text-align: left !important;
        margin-top: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.5s ease-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Code Line Numbers */
.line-numbers .line-numbers-rows {
    border-right: 1px solid #999;
}

.line-numbers-rows > span:before {
    color: #999;
}

/* Error Highlighting */
.error-highlight {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--danger-color);
    padding-left: 0.5rem;
}

/* Success Highlighting */
.success-highlight {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--success-color);
    padding-left: 0.5rem;
}

/* Warning Highlighting */
.warning-highlight {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--warning-color);
    padding-left: 0.5rem;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 0.375rem;
}

/* Copy Button Animation */
.copy-success {
    animation: copySuccess 1s ease-in-out;
}

@keyframes copySuccess {
    0% { background-color: var(--success-color); }
    100% { background-color: var(--primary-color); }
}

/* GitHub Language Colors */
.language-python { color: #3572A5; }
.language-javascript { color: #f1e05a; }
.language-typescript { color: #2b7489; }
.language-java { color: #b07219; }
.language-cpp { color: #f34b7d; }
.language-c { color: #555555; }
.language-csharp { color: #239120; }
.language-php { color: #4F5D95; }
.language-ruby { color: #701516; }
.language-go { color: #00ADD8; }
.language-rust { color: #dea584; }
.language-html { color: #e34c26; }
.language-css { color: #563d7c; }

/* New Feature Colors */
.text-purple { color: #6f42c1; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header,
    footer,
    .btn,
    #githubSearchInput,
    #githubSearchBtn,
    #clearGithubBtn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background-color: white;
    }
}
