/* --- UNIFIED TICKER SYSTEM --- */
.news-ticker {
  position: fixed;
  bottom: 15px;
  left: 20px;
  right: 20px;
  height: 90px; /* Expanded for 2 rows */
  background: rgba(10, 11, 20, 0.9);
  backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: white;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column; /* Stack rows */
  font-family: 'Outfit', sans-serif;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.6),
    0 0 30px var(--portal-main-color, rgba(79, 140, 255, 0.15));
  transition: all 1s ease;
  -webkit-box-reflect: below 2px linear-gradient(transparent, rgba(0,0,0,0.05));
}

.news-ticker::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    pointer-events: none;
    animation: holographic-scan 4s linear infinite;
}

@keyframes holographic-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ticker-row-1, .ticker-row-2 {
  display: flex !important;
  width: 100%;
  height: 50%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  align-items: center;
}

.ticker-row-2 {
  border-bottom: none;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.75rem;
}

.ticker-row-title {
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 100px;
}

.news-title {
  padding: 0 20px !important;
  min-width: 140px;
  background: linear-gradient(135deg, #ff3e3e, #c0392b);
  color: white;
  font-weight: 800;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  position: relative;
  z-index: 10;
  box-shadow: 10px 0 20px rgba(0,0,0,0.5);
}

.news-title::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  background-image: url('https://cdn-icons-png.flaticon.com/512/2115/2115916.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.news-scroll {
  white-space: nowrap;
  display: flex !important;
  align-items: center;
  height: 100%;
  font-size: 0.85rem;
  color: #fff;
  font-weight: 600;
  animation: ticker-scrolling var(--ticker-duration, 40s) linear infinite; /* Optimized speed for continuous flow */
  letter-spacing: 0.8px;
  width: max-content; /* Ensure container is as wide as content */
}

@keyframes ticker-scrolling {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.news-scroll:hover {
    animation-play-state: paused;
}

/* Badge Styles */
.ticker-block-item {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  margin: 0 4px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  height: 34px;
  line-height: 1;
  gap: 12px;
}

.ticker-portal-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  background: white;
  padding: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.ticker-capsule {
  display: inline-flex;
  align-items: center;
  padding: 2px 16px 2px 4px;
  margin: 0 12px;
  border-radius: 20px;
  background: var(--capsule-bg, rgba(0, 0, 0, 0.45)) !important;
  border: 1px solid var(--capsule-border, rgba(255, 255, 255, 0.2)) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.ticker-capsule:hover {
    transform: scale(1.05) translateY(-2px);
    background: var(--capsule-bg, rgba(255, 255, 255, 0.1)) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8), 0 0 15px var(--capsule-border);
    z-index: 100;
}

.ticker-neon-glow {
  color: var(--glow-color, #00ff00) !important;
  text-shadow: 
    0 0 2px rgba(0, 0, 0, 0.8),
    0 0 8px var(--glow-color),
    0 0 15px var(--glow-color) !important;
  font-weight: 900;
  letter-spacing: 1.2px;
  filter: brightness(1.4) contrast(1.2);
}

.ticker-ai-btn {
    background: linear-gradient(135deg, #4f8cff, #9d4edd);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s;
    z-index: 20;
}
.ticker-ai-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 15px rgba(79, 140, 255, 0.5);
}
.ticker-ai-btn:active { transform: scale(0.95); }

.ticker-controls {
    display: flex;
    align-items: center;
    padding-right: 15px;
    z-index: 20;
    gap: 15px;
}

/* News Item Structure */
.news-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 40px; /* Spacer between items */
}

.news-portal-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    background: rgba(255,255,255,0.1);
}

.news-category-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    background: var(--accent);
    color: #fff;
    white-space: nowrap;
}

.news-time-badge {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-left: 2px;
}

/* Category Colors */
.cat-hirek { background: #3b82f6; } /* Blue */
.cat-sport { background: #10b981; } /* Green */
.cat-gazdasag { background: #f59e0b; } /* Amber */
.cat-politika { background: #ef4444; } /* Red */
.cat-bulvar { background: #ec4899; } /* Pink */
.cat-technika { background: #8b5cf6; } /* Violet */
.cat-helyi { background: #64748b; } /* Slate */

.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-control span {
    font-size: 14px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

#news-speed-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

#news-speed-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #4f8cff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(79, 140, 255, 0.8);
    border: 2px solid white;
}

/* weather icon animations */
.weather-icon-anim {
    display: inline-block;
    animation: weather-bounce 3s ease-in-out infinite;
    font-size: 1.2rem;
    margin: 0 10px;
    filter: drop-shadow(0 0 5px currentColor);
}

@keyframes weather-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(5deg); }
}

/* Meteogram Styles */
.meteo-sparkline {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    margin: 0 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 2px;
}
.spark-bar {
    width: 4px;
    background: var(--accent-radio);
    border-radius: 2px 2px 0 0;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.spark-bar:hover { opacity: 1; }

/* Finance Badge */
.finance-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 0 5px;
}
.trend-up { color: #2ecc71; text-shadow: 0 0 10px rgba(46, 204, 113, 0.5); }
.trend-down { color: #e74c3c; text-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }

/* Bento Hub Grid */
.news-hub-grid.bento {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 200px;
    gap: 20px;
}

.bento-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item-wide {
    grid-column: span 2;
}

.stream-card.glass {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    overflow: hidden;
}

.stream-card.glass:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 5;
}

/* Layout adjustment */
.main-content, #app, #main {
  padding-bottom: 50px !important;
}

/* Hologram Modal (Phase 92) */
.hologram-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: modal-fade 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes modal-fade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.hmodal-content {
    width: 600px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 50px rgba(79, 140, 255, 0.3), inset 0 0 20px rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
}

.hmodal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}
.hmodal-close:hover { opacity: 1; transform: rotate(90deg); }

.hmodal-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    height: 150px;
    margin: 30px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hmodal-bar {
    width: 30px;
    background: linear-gradient(to top, var(--accent-radio, #4f8cff), var(--accent-tv, #9d4edd));
    border-radius: 5px 5px 0 0;
    transition: 0.5s ease;
    box-shadow: 0 0 10px rgba(79, 140, 255, 0.5);
}

.hmodal-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.hstat {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hmodal-btn {
    background: linear-gradient(135deg, #4f8cff, #9d4edd);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: 0.3s;
}
.hmodal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
