/* Main styles for Coticker.com */

/* Body and Layout */
body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
.logo {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    opacity: 0.9;
}

/* Search Card */
.search-card {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Analysis Options */
.analysis-options {
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-label {
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-check-input:checked + .form-check-label {
    color: #0d6efd;
    font-weight: 600;
}

/* Cards */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #2a5298, #1e3c72);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
    background: linear-gradient(45deg, #1e3c72, #2a5298);
}

/* Analysis Content */
.analysis-content {
    line-height: 1.7;
    font-size: 1.05rem;
}

.analysis-content h3 {
    color: #0d6efd;
    margin: 25px 0 15px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.analysis-content strong {
    color: #495057;
}

/* Recommendation Badges */
.recommendation {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    margin: 5px 5px 5px 0;
}

.recommendation.buy, 
.badge.bg-success {
    background-color: #198754 !important;
    color: white;
}

.recommendation.hold, 
.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000;
}

.recommendation.sell, 
.badge.bg-danger {
    background-color: #dc3545 !important;
    color: white;
}

/* Analysis Type Badges */
.analysis-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin: 2px 0;
}

.analysis-badge.forum {
    background-color: #e3f2fd;
    color: #1976d2;
}

.analysis-badge.technical {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.analysis-badge.combined {
    background-color: #e8f5e8;
    color: #388e3c;
}

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

/* Input Groups */
.input-group-text {
    border: none;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem !important;
    }
    
    .analysis-options .row {
        gap: 1rem;
    }
    
    .analysis-options .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

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

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2a5298, #1e3c72);
}

/* Autocomplete Styles */
.autocomplete-dropdown {
    top: 100%;
    left: 0;
    margin-top: 5px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.autocomplete-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.autocomplete-item:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.ticker-confirmation {
    font-size: 0.9rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

/* Enhanced input focus state */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Loading state for autocomplete */
.autocomplete-loading {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
}

.autocomplete-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Ticker badge styles */
.ticker-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
}

/* Popular tickers section */
.popular-tickers {
    margin-top: 1rem;
}

.popular-ticker-item {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.popular-ticker-item:hover {
    background: #e9ecef;
    border-color: #0d6efd;
    transform: translateY(-1px);
}

/* Responsive autocomplete */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        font-size: 0.9rem;
    }
    
    .autocomplete-item {
        padding: 0.75rem;
    }
    
    .ticker-confirmation {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}