/* Improved UI styles for CryptoNews */

:root {
  --primary-color: #4e44ce;
  --primary-light: #6c63ff;
  --primary-dark: #3832a8;
  --secondary-color: #ff9800;
  --text-primary: #333;
  --text-secondary: #666;
  --bg-light: #f8f9fa;
  --bg-dark: #222;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --border-color: #dee2e6;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --header-height: 70px;
  --sidebar-width: 260px;
  --container-max-width: 1280px;
}

/* Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  color: #333;
  line-height: 1.5;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

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

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

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

.btn-outline:hover {
  background-color: var(--bg-light);
}

.container {
  max-width: 1280px;
  padding: 0 15px;
}

/* Header and Navigation */
.crypto-ticker {
  background-color: var(--primary-dark);
  color: white;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  overflow: hidden;
}

.crypto-price {
  margin-right: 1.5rem;
  white-space: nowrap;
}

.price-up {
  color: #2ecc71;
}

.price-down {
  color: #e74c3c;
}

.header {
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-item {
  margin: 0 0.8rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

/* Main content area */
.sidebar {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 80px;
}

.user-section {
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eaecef;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  font-size: 1.5rem;
}

.upgrade-pro {
  background-color: #f1f3f4;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.upgrade-pro h6 {
  color: #343a40;
  margin-bottom: 0.25rem;
}

.upgrade-pro p {
  color: #6c757d;
}

.upgrade-pro .fa-xmark {
  font-size: 0.85rem;
  cursor: pointer;
}

.nav-menu {
  margin-bottom: 1.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  color: #495057;
  text-decoration: none;
  padding: 0.5rem 0;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  background-color: #f8f9fa;
  padding-left: 0.5rem;
}

.nav-link i {
  margin-right: 0.75rem;
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
}

.filters-section {
  margin-bottom: 1.5rem;
}

.filter-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6c757d;
  margin: 1rem 0 0.5rem;
}

.filter-group {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 0.5rem;
}

.filter-checkbox {
  display: block;
  padding: 0.25rem 0;
  color: #495057;
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-checkbox input {
  margin-right: 0.5rem;
}

.market-overview {
  margin-top: 1.5rem;
}

.crypto-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.crypto-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.dark .crypto-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.crypto-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #f1f5f9;
  border-radius: 50%;
  font-weight: bold;
  font-size: 12px;
  margin-right: 10px;
  color: #3b82f6;
}

.dark .crypto-icon {
  background-color: #1e293b;
  color: #60a5fa;
}

.crypto-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.dark .crypto-name {
  color: #e5e7eb;
}

.crypto-price-container {
  text-align: right;
}

.crypto-price {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.dark .crypto-price {
  color: #f9fafb;
}

.crypto-change {
  font-size: 12px;
  font-weight: 500;
}

.price-up {
  color: #10b981;
}

.price-down {
  color: #ef4444;
}

.fear-greed-container {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.fear-greed-score {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
}

.fear-greed-score #fear-greed-value {
  font-size: 3rem;
  font-weight: 700;
  margin-right: 10px;
}

.fear-greed-bar {
  height: 12px;
  background-color: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
}

.fear-greed-progress {
  height: 100%;
  transition: width 0.5s ease;
}

/* Fear & Greed Index Colors */
.fear-greed-progress.extreme-fear {
  background-color: #e53935;
}

.fear-greed-progress.fear {
  background-color: #ff9800;
}

.fear-greed-progress.neutral {
  background-color: #4fc3f7;
}

.fear-greed-progress.greed {
  background-color: #4caf50;
}

.fear-greed-progress.extreme-greed {
  background-color: #2e7d32;
}

/* Dark Mode Support */
.dark-mode .fear-greed-container {
  background-color: #2a2a2a;
}

.dark-mode .fear-greed-bar {
  background-color: #3a3a3a;
}

/* Ensure text has good contrast in dark mode */
.dark-mode .fear-greed-container h2,
.dark-mode .fear-greed-container p,
.dark-mode .fear-greed-container #fear-greed-value {
  color: #e0e0e0;
}

/* Animation for data refresh */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.refresh-animation {
  animation: pulse 1s infinite;
}

/* Loading animation */
.fear-greed-loading {
  text-align: center;
  padding: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .fear-greed-score #fear-greed-value {
    font-size: 2.5rem;
  }
}

.newsletter-form input:focus {
  outline: none;
  border-color: #3b82f6;
}

.dark .newsletter-form input:focus {
  border-color: #60a5fa;
}

/* Success message for newsletter form */
.newsletter-success {
  display: none;
  padding: 12px;
  background-color: #d1fae5;
  border-radius: 8px;
  color: #047857;
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
}

.dark .newsletter-success {
  background-color: rgba(209, 250, 229, 0.1);
  color: #34d399;
}

/* News cards */
.news-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.news-card img.placeholder-image {
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Fix for images not displaying properly */
.news-card img[src*="placeholder.com"],
.news-card img[src=""],
.news-card img:not([src]) {
  height: 200px;
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #007bff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timestamp {
  font-size: 0.75rem;
  color: #6c757d;
}

.card-title {
  font-size: 1.1rem;
  margin: 0.75rem 0;
  line-height: 1.4;
  font-weight: 600;
}

.sentiment-bar {
  height: 4px;
  background-color: #eaecef;
  border-radius: 2px;
  margin: 1rem 0;
  overflow: hidden;
}

.sentiment-bar-fill {
  height: 100%;
  width: 50%;
  border-radius: 2px;
}

.sentiment-bar-fill.bullish {
  background-color: #10b981;
}

.sentiment-bar-fill.bearish {
  background-color: #ef4444;
}

.sentiment-bar-fill.neutral {
  background-color: #f59e0b;
}

.article-actions {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

.interaction-group {
  margin-right: 0.75rem;
}

.vote-btn, .like-btn, .bookmark-btn {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}

.vote-btn:hover, .like-btn:hover, .bookmark-btn:hover {
  color: #007bff;
}

.vote-btn i, .like-btn i, .bookmark-btn i {
  margin-right: 0.35rem;
}

.stats-counter {
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* Pagination */
.pagination {
  justify-content: center;
}

.page-item .page-link {
  color: #6c757d;
  border: none;
  margin: 0 0.2rem;
  border-radius: 5px;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page-item.active .page-link {
  background-color: #007bff;
  color: white;
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
  font-size: 0.85rem;
}

/* Dark mode */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

.dark-mode .header,
.dark-mode .sidebar,
.dark-mode .news-card,
.dark-mode .fear-greed-container,
.dark-mode .tweet,
.dark-mode .footer {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.dark-mode .nav-link,
.dark-mode .footer-link,
.dark-mode .tweet-action,
.dark-mode .text-secondary {
  color: #a0a0a0;
}

.dark-mode .border-top,
.dark-mode .user-section {
  border-color: #333;
}

.dark-mode .btn-outline {
  color: #e0e0e0;
  border-color: #333;
}

.dark-mode .category-badge {
  background-color: #333;
  color: #a0a0a0;
}

.dark-mode .pagination .page-link {
  background-color: #1e1e1e;
  border-color: #333;
  color: #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    margin-bottom: 1.5rem;
  }
  
  .nav-menu h6, .filters-section h6, .market-overview h6 {
    cursor: pointer;
  }
  
  .logo {
    font-size: 1.2rem;
  }
  
  .news-card {
    margin-bottom: 1.5rem;
  }
}

/* Move sidebar to the right side */
@media (min-width: 992px) {
  .col-lg-9.order-lg-1 {
    order: 1;
  }
  
  .col-lg-3.order-lg-2 {
    order: 2;
  }
}

/* Image placeholders and loading states */
.img-placeholder {
  background: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Fix display issues with long titles or content */
.card-title, .text-secondary {
  word-break: break-word;
}

/* Enhance the sentiment display */
.text-bullish {
  color: var(--success-color);
}

.text-bearish {
  color: var(--danger-color);
}

.text-neutral {
  color: var(--warning-color);
}

/* Remove default outline on focused elements */
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Global typography and spacing */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Header styles */
.site-header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.dark-mode .site-header {
  background-color: #1e1e1e;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: #333;
  text-decoration: none;
}

.dark-mode .site-brand {
  color: #f8f9fa;
}

.search-form {
  position: relative;
}

.search-form input {
  background-color: #f1f3f4;
  border: none;
  border-radius: 24px;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  width: 100%;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.dark-mode .search-form input {
  background-color: #333;
  color: #e0e0e0;
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

.dark-mode .search-icon {
  color: #a0a0a0;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: #6c757d;
  margin-left: 1.5rem;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.dark-mode .nav-links a {
  color: #b0b0b0;
}

.nav-links a:hover {
  color: #007bff;
}

.dark-mode .nav-links a:hover {
  color: #79b8ff;
}

.toggle-dark-mode {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #6c757d;
  transition: color 0.2s ease;
}

.dark-mode .toggle-dark-mode {
  color: #f8f9fa;
}

/* News card styles */
.news-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dark-mode .news-card {
  background-color: #252525;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

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

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.news-card img.placeholder-image {
  background-color: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dark-mode .news-card img.placeholder-image {
  background-color: #3a3a3a;
}

.card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #007bff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dark-mode .category-badge {
  color: #79b8ff;
}

.timestamp {
  font-size: 0.75rem;
  color: #6c757d;
}

.dark-mode .timestamp {
  color: #a0a0a0;
}

.card-title {
  font-size: 1.1rem;
  margin: 0.75rem 0;
  line-height: 1.4;
  font-weight: 600;
}

.dark-mode .card-title {
  color: #e0e0e0;
}

/* Sentiment bar */
.sentiment-bar {
  height: 4px;
  background-color: #eaecef;
  border-radius: 2px;
  margin: 1rem 0;
  overflow: hidden;
}

.dark-mode .sentiment-bar {
  background-color: #444;
}

.sentiment-bar-fill {
  height: 100%;
  width: 50%;
  border-radius: 2px;
}

.sentiment-bar-fill.bullish {
  background-color: #10b981;
}

.sentiment-bar-fill.bearish {
  background-color: #ef4444;
}

.sentiment-bar-fill.neutral {
  background-color: #f59e0b;
}

/* Article actions */
.article-actions {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

.interaction-group {
  margin-right: 0.75rem;
}

.vote-btn, .like-btn, .bookmark-btn {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}

.dark-mode .vote-btn, 
.dark-mode .like-btn, 
.dark-mode .bookmark-btn {
  color: #a0a0a0;
}

.vote-btn:hover, .like-btn:hover, .bookmark-btn:hover {
  color: #007bff;
}

.dark-mode .vote-btn:hover, 
.dark-mode .like-btn:hover, 
.dark-mode .bookmark-btn:hover {
  color: #79b8ff;
}

.vote-btn i, .like-btn i, .bookmark-btn i {
  margin-right: 0.35rem;
}

.stats-counter {
  font-size: 0.75rem;
  margin-left: 0.25rem;
}

/* Pagination styles */
.pagination {
  justify-content: center;
}

.page-item .page-link {
  color: #6c757d;
  border: none;
  margin: 0 0.2rem;
  border-radius: 5px;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dark-mode .page-item .page-link {
  background-color: #252525;
  color: #a0a0a0;
}

.page-item.active .page-link {
  background-color: #007bff;
  color: white;
}

.dark-mode .page-item.active .page-link {
  background-color: #1f6feb;
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
  font-size: 0.85rem;
}

/* Sidebar styles */
.sidebar {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  position: sticky;
  top: 80px;
}

.dark-mode .sidebar {
  background-color: #252525;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.user-section {
  text-align: center;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eaecef;
}

.dark-mode .user-section {
  border-bottom-color: #444;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  font-size: 1.5rem;
}

.dark-mode .user-avatar {
  background-color: #444 !important;
}

.upgrade-pro {
  background-color: #f1f3f4;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.dark-mode .upgrade-pro {
  background-color: #333;
}

.upgrade-pro h6 {
  color: #343a40;
  margin-bottom: 0.25rem;
}

.dark-mode .upgrade-pro h6 {
  color: #e0e0e0;
}

.upgrade-pro p {
  color: #6c757d;
}

.dark-mode .upgrade-pro p {
  color: #a0a0a0;
}

.upgrade-pro .fa-xmark {
  font-size: 0.85rem;
  cursor: pointer;
}

.nav-menu {
  margin-bottom: 1.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  color: #495057;
  text-decoration: none;
  padding: 0.5rem 0;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.dark-mode .nav-link {
  color: #b0b0b0;
}

.nav-link:hover {
  background-color: #f8f9fa;
  padding-left: 0.5rem;
}

.dark-mode .nav-link:hover {
  background-color: #333;
}

.nav-link i {
  margin-right: 0.75rem;
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
}

.filters-section {
  margin-bottom: 1.5rem;
}

.filter-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6c757d;
  margin: 1rem 0 0.5rem;
}

.dark-mode .filter-title {
  color: #a0a0a0;
}

.filter-group {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 0.5rem;
}

.filter-checkbox {
  display: block;
  padding: 0.25rem 0;
  color: #495057;
  font-size: 0.9rem;
  cursor: pointer;
}

.dark-mode .filter-checkbox {
  color: #b0b0b0;
}

.filter-checkbox input {
  margin-right: 0.5rem;
}

.market-overview {
  margin-top: 1.5rem;
}

.crypto-item {
  display: flex;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid #eaecef;
}

.dark-mode .crypto-item {
  border-bottom-color: #444;
}

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

.crypto-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin-right: 0.75rem;
  font-weight: 600;
}

.crypto-name {
  flex-grow: 1;
  font-size: 0.9rem;
  font-weight: 500;
}

.dark-mode .crypto-name {
  color: #e0e0e0;
}

.crypto-price-container {
  text-align: right;
  font-size: 0.9rem;
  font-weight: 500;
}

.dark-mode .crypto-price-container {
  color: #e0e0e0;
}

.price-up {
  color: #10b981;
}

.price-down {
  color: #ef4444;
}

/* Login & Register Pages */
.auth-card {
  transition: all 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.auth-card .card-header {
  border-bottom: none;
}

.auth-card .input-group-text {
  border: none;
}

.auth-card .form-control {
  border-left: none;
}

.auth-card .form-control:focus {
  box-shadow: none;
  border-color: var(--border-color);
}

.auth-card .input-group:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(78, 68, 206, 0.15);
  border-radius: 0.375rem;
}

.hover-text-primary:hover {
  color: var(--primary-color) !important;
}

.social-auth-btn {
  height: 40px;
  transition: all 0.3s ease;
}

.social-auth-btn:hover {
  transform: translateY(-2px);
}

/* Mobile responsiveness improvements */
@media (max-width: 767px) {
    /* Header adjustments */
    .header .logo {
        font-size: 1.1rem;
    }
    
    .header .logo small {
        font-size: 0.7rem;
    }
    
    /* Improve news cards on mobile */
    .news-card {
        margin-bottom: 20px;
    }
    
    .news-card .card-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .news-card img {
        height: 180px;
        object-fit: cover;
    }
    
    /* Simplify article actions on mobile */
    .article-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .article-actions .interaction-group {
        margin-right: 6px;
    }
    
    .article-actions .vote-btn span,
    .article-actions .like-btn span {
        display: none;
    }
    
    .article-actions .stats-counter {
        font-size: 0.7rem;
    }
    
    /* Improve crypto ticker display */
    .crypto-ticker {
        padding: 8px 0;
    }
    
    .crypto-price {
        padding: 0 10px;
        white-space: nowrap;
    }
    
    /* Adjust sidebar for mobile */
    .sidebar {
        margin-top: 20px;
    }
    
    /* Improve user section responsiveness */
    .user-section {
        padding: 15px;
    }
    
    .user-avatar {
        width: 50px;
        height: 50px;
    }
    
    /* Layout fixes */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .row {
        margin-left: -12px;
        margin-right: -12px;
    }
    
    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, 
    .col-sm, .col-md, .col-lg, .col-xl {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Reduce spacing */
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mt-4 {
        margin-top: 1rem !important;
    }
    
    /* Adjust footer on mobile */
    .footer {
        text-align: center;
    }
    
    .footer-title {
        margin-top: 1.5rem;
    }
    
    .footer .social-icons {
        justify-content: center;
        margin-bottom: 1rem;
    }
}

/* Tablet improvements */
@media (min-width: 768px) and (max-width: 991px) {
    /* Two columns for news grid on tablets */
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Keep the vote text visible on tablets */
    .article-actions .vote-btn span {
        display: inline;
    }
}

/* Dark mode improvements */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .card,
body.dark-mode .sidebar,
body.dark-mode .news-card {
    background-color: #1e1e1e;
    border-color: #333;
}

body.dark-mode .card-header {
    background-color: #2d2d2d;
    border-bottom-color: #333;
}

body.dark-mode .text-secondary {
    color: #aaaaaa !important;
}

body.dark-mode .btn-outline-primary {
    color: #81a4ff;
    border-color: #81a4ff;
}

body.dark-mode .btn-outline-primary:hover {
    background-color: #81a4ff;
    color: #121212;
}

body.dark-mode .text-muted {
    color: #888 !important;
}

body.dark-mode .navbar-light {
    background-color: #1e1e1e !important;
}

body.dark-mode .modal-content {
    background-color: #1e1e1e;
    border-color: #333;
}

/* Animation effects */
.bookmark-btn.animated,
.like-btn.animated,
.vote-btn.animated {
    animation: pulse 0.4s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Login and Authentication improvements */
.auth-card {
    max-width: 500px;
    margin: 0 auto;
}

.social-auth-btn {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile responsiveness fixes */
@media (max-width: 768px) {
    /* Logo improvements */
    .logo img {
        max-height: 70px !important;
    }
    
    /* News cards on mobile */
    .news-card {
        margin-bottom: 15px;
    }
    
    .news-card .card-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .article-actions {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .article-actions .interaction-group {
        margin-right: 5px;
    }
    
    /* Reduce padding/margins on mobile */
    .sentiment-bar {
        margin: 8px 0;
    }
    
    .card-content {
        padding: 10px;
    }
    
    /* Fix category filter buttons */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Fix for very small screens */
@media (max-width: 576px) {
    .col-md-3.d-flex.align-items-center {
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .article-actions .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .interaction-group button {
        padding: 2px 5px;
    }
    
    .stats-counter {
        font-size: 0.7rem;
    }
}

/* Improved mobile header styles */
@media (max-width: 768px) {
    /* Ensure the logo is visible but not too large on mobile */
    .logo img {
        max-height: 70px !important;
    }
    
    /* Make mobile menu full-width and styled properly */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1050;
        overflow-y: auto;
        padding-top: 20px;
    }
    
    .dark-mode .mobile-menu {
        background-color: rgba(33, 33, 33, 0.98);
    }
    
    /* Close button for mobile menu */
    .mobile-menu:before {
        content: "×";
        position: absolute;
        top: 10px;
        right: 20px;
        font-size: 30px;
        cursor: pointer;
        color: #333;
    }
    
    .dark-mode .mobile-menu:before {
        color: #fff;
    }
    
    /* Improve mobile menu spacing */
    .mobile-menu .container {
        padding-top: 25px;
    }
    
    /* Mobile menu toggle button styling */
    #mobileMenuBtn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    /* Better touch targets in mobile menu */
    .mobile-menu .list-group-item {
        padding: 12px 15px;
        border-radius: 8px;
        margin-bottom: 5px;
        border: none;
        background-color: #f8f9fa;
    }
    
    .dark-mode .mobile-menu .list-group-item {
        background-color: #333;
        color: #fff;
    }
    
    .mobile-menu .list-group-item.active {
        background-color: #4e44ce;
        color: white;
    }
    
    /* Fix any overlapping elements */
    .header {
        position: relative;
        z-index: 999;
    }
    
    /* Ensure buttons have enough space */
    .btn-sm {
        padding: 6px 12px;
    }
}

/* Very small devices */
@media (max-width: 576px) {
    .logo img {
        max-height: 60px !important;
    }
    
    .header .container {
        padding: 0 10px;
    }
}

/* Additional mobile news card improvements */
@media (max-width: 768px) {
    /* Make news cards more compact on mobile */
    .news-card {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .news-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .news-card .card-body {
        padding: 12px;
    }
    
    .news-card .card-title {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }
    
    .news-card p.text-secondary {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    /* Improve interaction buttons on mobile */
    .article-actions {
        flex-wrap: wrap;
    }
    
    .article-actions .interaction-group {
        margin-right: 3px;
    }
    
    .article-actions button,
    .article-actions .btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
    
    .article-actions i {
        font-size: 0.8rem;
    }
    
    .article-actions .stats-counter {
        font-size: 0.7rem;
    }
    
    /* Make category badge and timestamp smaller */
    .category-badge,
    .timestamp {
        font-size: 0.7rem;
    }
    
    /* Reduce margins and padding */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Better spacing for category filters */
    .category-filters {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap !important;
        padding-bottom: 5px;
        margin-top: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-filters::-webkit-scrollbar {
        height: 3px;
    }
    
    .category-filters::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.2);
        border-radius: 10px;
    }
    
    .category-filters .btn {
        flex-shrink: 0;
    }
} 