.resources-hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  opacity: 0;
  animation: fadeIn 1s ease-in-out 1.5s forwards;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInDown 1s ease-in-out 2.5s forwards;
}

.resources-tagline {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease-in-out 3s forwards;
}

.resources-hero .hero-background {
  position: absolute;
  top: 0rem;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../assets/background/stfx_bg_8.jpg") no-repeat center
    center/cover;
  z-index: -1;
  opacity: 0.5;
  background-attachment: fixed;
}

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

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

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

/* Layout Container */
.resource-container {
  display: flex;
  flex-direction: row;
  max-width: 1800px;
  margin: 0 auto;
  gap: 1rem;
}

/* Main Content */
.resource-content {
  flex: 1;
  min-width: 0; /* Prevent flex overflow */
}

/* Sidebar */
.resources-sidebar {
  width: 350px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Section Cards */
.section-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  /* box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3); */
  padding: 24px;
  margin-bottom: 1rem;
  background: #303030;
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--primary-color);
}

.live-badge {
  background-color: var(--danger-color);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 8px;
}

/* Chart Section */
.market-chart-section {
  position: relative;
  background: #2a2a2a;
  box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
}

.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.timeframe-selector {
  display: flex;
  gap: 8px;
}

.timeframe-btn {
  padding: 6px 12px;
  border: 1px solid;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

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

.pair-selector select {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid;
  background-color: white;
  font-size: 0.9rem;
}

.tradingview-widget-container {
  margin-top: 15px;
  background: #587552;
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.current-price {
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 0;
  width: 50%;
}

.price-change-indicator {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.price-up .price-change-indicator {
  border-bottom: 5px solid var(--accent-color);
}

.price-down .price-change-indicator {
  border-top: 5px solid var(--danger-color);
}

.market-stats {
  display: flex;
  gap: 20px;
  padding: 0 0.5rem;
  width: 45%;
}

.stat-item {
  display: flex;
  gap: 5px;
  font-size: 0.9rem;
}

.stat-label {
  color: var(--text-light);
}

/* News Section */
.news-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

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

.news-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.news-article {
  border: 1px solid;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
}

.news-article:hover {
  transform: translateY(-3px);
}

.article-image {
  height: 160px;
  background-color: #eee;
  background-size: cover;
  background-position: center;
}

.article-content {
  padding: 15px;
}

.article-title {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.article-category {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.category-markets {
  background-color: #bbdefb;
  color: #0d47a1;
}

.category-security {
  background-color: #ffcdd2;
  color: #c62828;
}

.category-regulation {
  background-color: #c8e6c9;
  color: #2e7d32;
}

.category-technology {
  background-color: #d1c4e9;
  color: #4527a0;
}

.load-more-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.load-more-btn:hover {
  background-color: var(--secondary-color);
}

/* Analysis Section */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.analysis-title {
  font-size: 1rem;
  margin-bottom: 10px;
}

.analysis-meta {
  font-size: 0.8rem;
  color: #0f8;
  margin-bottom: 10px;
}

.analysis-summary {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Security Section */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.security-alert {
  border: 1px solid;
  border-radius: 10px;
  padding: 15px;
  transition: transform 0.2s;
}

.security-alert:hover {
  transform: translateY(-3px);
}

.alert-critical {
  border-left: 4px solid var(--danger-color);
}

.alert-high {
  border-left: 4px solid var(--warning-color);
}

.alert-medium {
  border-left: 4px solid #ff9100;
}

.alert-low {
  border-left: 4px solid #00ff88;
}

.alert-title {
  font-size: 1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.alert-description {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Sidebar Widgets */
.sidebar-widget {
  background-color: #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
  padding: 20px;
  margin: 0 0 1.2rem;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f8;
}

.sidebar-widget h3 i {
  color: var(--primary-color);
}

/* Market Widget */
.crypto-tickers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid;
}

.ticker-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.ticker-symbol {
  color: var(--text-light);
  font-size: 0.8rem;
}

.ticker-price {
  font-weight: 500;
}

.ticker-change {
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.ticker-change.positive {
  background-color: rgba(0, 200, 83, 0.1);
  color: var(--accent-color);
}

.ticker-change.negative {
  background-color: rgba(255, 61, 0, 0.1);
  color: var(--danger-color);
}

/* Trending Widget */
.trending-topic {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid;
}

.trending-rank {
  font-weight: bold;
  color: var(--primary-color);
  width: 20px;
}

.trending-text {
  flex: 1;
}

.trending-count {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Education Widget */
.education-resources {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edu-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 0.5rem;
  background: #514f52;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.edu-card:hover {
  box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
}

.edu-icon {
  font-size: 1.5rem;
}

.edu-card:hover .edu-icon {
  color: #00ff88;
}

.edu-card:hover small {
  text-decoration: underline;
  color: #01fa1e;
}

/* External Links */
.external-fallback {
  margin-top: 15px;
  font-size: 0.75rem;
  color: #00ff88;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-more:hover {
  text-decoration: underline;
}

/* Loaders */
.loader-spinner {
  border: 3px solid #f8fafc;
  border-radius: 50%;
  border-top: 3px solid #00ff88;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

.loader-spinner.small {
  width: 20px;
  height: 20px;
  border-width: 2px;
  margin: 10px auto;
}

.news-loader,
.analysis-loader,
.security-loader {
  text-align: center;
  padding: 30px 0;
}

.news-loader p,
.analysis-loader p,
.security-loader p {
  margin-top: 10px;
  color: var(--text-light);
}

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

.trending-list {
  list-style-type: none;
}

.trending-list li {
  margin: 0.8rem 0;
}

.trending-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trending-name {
  width: 75%;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .resource-container {
    flex-direction: column;
  }

  .resources-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-widget {
    flex: 1 1 300px;
  }
}

@media (max-width: 768px) {
  :root {
    --gap: 15px;
  }

  .section-card {
    padding: 15px;
  }

  .market-stats {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .news-articles,
  .analysis-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .resources-sidebar {
    flex-direction: column;
  }

  .chart-controls {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 10px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  /* .current-price {
    font-size: 1.2rem;
  } */

  .timeframe-selector {
    flex-wrap: wrap;
  }
}

.analysis-card {
  background: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.analysis-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.analysis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.analysis-content h3,
.security-header h3,
.security-card h3 {
  font-size: 1.1rem;
  color: #0f8;
  margin: 0.8rem auto;
}

.analysis-excerpt {
  font-size: 0.9rem;
  margin: 1rem auto;
}

.coin-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.security-card p {
  font-size: 0.9rem;
  margin: 1rem auto;
}

.coin-info img {
  width: 24px;
  height: 24px;
}

.coin-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.symbol {
  color: #64748b;
  font-size: 0.9rem;
}

.analysis-type {
  background: #3b82f6;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.analysis-content {
  padding: 16px;
}

.analysis-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.analysis-description {
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
}

.analysis-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.metric-tag {
  background: #e2e8f0;
  color: #334155;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.analysis-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: gray;
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

.analysis-link:hover {
  color: #00ff88;
}

.analysis-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 255, 136, 0.3);
}

.security-card {
  background: #2a2a2a;
  border-radius: 10px;
  padding: 1rem;
}

.critical .security-alert-level {
  color: #ffa500;
}

.high .security-alert-level {
  color: #f00;
}

.medium .security-alert-level {
  color: #9dff00;
}

.security-link {
  color: gray;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.security-link:hover {
  color: #00ff88;
  text-decoration: underline;
}
