/* Bull.mn Professional Stylesheet */
:root {
    --primary-color: #0066FF;
    --primary-dark: #0052CC;
    --secondary-color: #1a1a1a;
    --success-color: #00C851;
    --danger-color: #FF3547;
    --warning-color: #FFA900;
    --light-bg: #F7F9FC;
    --white: #FFFFFF;
    --gray-50: #FAFBFC;
    --gray-100: #F4F5F7;
    --gray-200: #E1E4E8;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --border-color: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bull-color: #10B981;
    --bear-color: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 { font-size: 24px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.4; }
h4 { font-size: 16px; font-weight: 600; line-height: 1.4; }
h5 { font-size: 14px; font-weight: 600; line-height: 1.5; }
h6 { font-size: 13px; font-weight: 600; line-height: 1.5; }

/* Navbar */
.navbar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container-fluid {
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

.navbar-brand i {
    font-size: 20px;
}

/* Search Box */
.search-box {
    position: relative;
    width: 320px;
    margin: 0 20px;
}

.search-input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    background: var(--gray-50);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

#search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1001;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: var(--gray-50);
}

.search-result-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Navigation */
.nav-link {
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--gray-50);
}

.nav-link i {
    font-size: 16px;
    margin-right: 6px;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--gray-200);
}

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

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
}

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

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background-color: var(--gray-50);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 14px;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-body {
    padding: 16px;
}

.card-header {
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 14px;
}

/* Post Card */
.post-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.15s;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.post-info {
    flex: 1;
}

.post-username {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
}

.post-username:hover {
    text-decoration: underline;
}

.post-time {
    color: var(--text-muted);
    font-size: 12px;
}

.post-content {
    margin-bottom: 12px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.ticker-tag {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 13px;
}

.ticker-tag:hover {
    text-decoration: underline;
}

.post-actions {
    display: flex;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s;
    font-size: 13px;
}

.post-action:hover {
    color: var(--text-secondary);
}

.post-action.liked {
    color: var(--danger-color);
}

.post-action i {
    font-size: 16px;
}

/* Post Box */
.post-box {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.post-textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 14px;
    padding: 0;
    outline: none;
    min-height: 80px;
    font-family: var(--font-sans);
    line-height: 1.6;
}

.post-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    margin-top: 12px;
}

.char-counter {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.char-counter.warning {
    color: var(--warning-color);
}

.char-counter.danger {
    color: var(--danger-color);
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.sidebar-card h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-card h5 i {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Trending Items */
.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}

.trending-item:last-child {
    border-bottom: none;
}

.ticker-symbol {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 13px;
}

.ticker-symbol:hover {
    color: var(--primary-color);
}

.ticker-price {
    text-align: right;
    font-family: var(--font-mono);
}

.ticker-price div {
    font-size: 13px;
    font-weight: 500;
}

.ticker-price small {
    font-size: 11px;
    font-weight: 600;
}

.price-up {
    color: var(--bull-color);
}

.price-down {
    color: var(--bear-color);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background-color: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* Sentiment Tags */
.sentiment-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.sentiment-bullish {
    background-color: #D1FAE5;
    color: var(--bull-color);
}

.sentiment-bearish {
    background-color: #FEE2E2;
    color: var(--bear-color);
}

.sentiment-neutral {
    background-color: var(--gray-100);
    color: var(--text-secondary);
}

/* Tables */
.table {
    width: 100%;
    font-size: 13px;
}

.table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--gray-50);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Progress */
.progress {
    height: 6px;
    background-color: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s;
}

.progress-bar.bg-success {
    background-color: var(--bull-color);
}

.progress-bar.bg-danger {
    background-color: var(--bear-color);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 1000;
    right: 0;
    top: calc(100% + 4px);
    padding: 4px;
}

.dropdown.show .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: var(--text-primary);
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.dropdown-item:hover {
    background-color: var(--gray-50);
}

.dropdown-divider {
    height: 1px;
    margin: 4px 0;
    background-color: var(--border-color);
}

/* Loading Spinner */
.spinner {
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Upload Button */
.upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.upload-btn input[type=file] {
    position: absolute;
    left: -9999px;
}

/* Image Preview */
.image-preview {
    max-width: 100%;
    margin-top: 12px;
    border-radius: 8px;
}

/* List Group */
.list-group {
    list-style: none;
    padding: 0;
}

.list-group-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: background-color 0.15s;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background-color: var(--gray-50);
}

.list-group-item i {
    color: var(--text-secondary);
    width: 16px;
}

/* Nav Tabs */
.nav-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.nav-tabs .nav-link {
    padding: 8px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: 40px;
    font-size: 13px;
    color: var(--text-secondary);
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 12px;
    }
    
    .navbar .container-fluid {
        padding: 0 12px;
    }
    
    .search-box {
        width: 100%;
        margin: 12px 0;
    }
    
    .sidebar-left, .sidebar-right {
        display: none;
    }
    
    .main-feed {
        width: 100%;
    }
    
    .post-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 8px;
    }
    
    .post-actions {
        gap: 16px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-white { color: white; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }
.fw-normal { font-weight: 400; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }

.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 24px; }

.w-100 { width: 100%; }
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }