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

html, body {
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  height: 100%;
}

body {
  overscroll-behavior: none;
}

/* Loading Container */
.loading-container {
  width: 100vw;
  height: 100vh;
  background: #1a1a2e;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 300;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 30px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* TV Container */
.tv-container {
  width: 100%;
  min-height: 100vh;
  background: #1a1a2e;
  color: white;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
}

/* Audio Enable Banner */
.audio-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  z-index: 999;
  cursor: pointer;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.audio-banner:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Adhan Notification Toast */
.adhan-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(76, 175, 80, 0.4);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 300px;
  animation: toastSlideIn 0.4s ease-out;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.adhan-toast-icon {
  font-size: 40px;
  line-height: 1;
}

.adhan-toast-content {
  flex: 1;
}

.adhan-toast-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.adhan-toast-prayer {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.adhan-toast-time {
  font-size: 18px;
  font-family: 'Monaco', 'Courier New', monospace;
  opacity: 0.95;
}

.adhan-toast-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.adhan-toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* City Selector Modal */
.city-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 40px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Top Bar - Single Line */
.top-bar {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.date-time-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 18px;
  font-weight: 300;
}

.gregorian-date-inline,
.hijri-date-inline,
.location-name,
.settings-info {
  opacity: 0.9;
}

.current-time-inline {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 20px;
  font-weight: 400;
}

.location-name,
.settings-info {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.95;
}

.separator {
  opacity: 0.4;
  margin: 0 5px;
}

/* Main Layout - Left Sidebar + Center Image */
.main-layout {
  display: flex;
  flex: 1;
  gap: 30px;
  padding: 10px;
  overflow: visible;
  min-height: 0;
}

/* Left Sidebar */
.left-sidebar {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Next Prayer Box */
.next-prayer-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 10px;
  text-align: center;
}

.next-prayer-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
  margin-bottom: 10px;
}

.next-prayer-name {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 8px;
}

.next-prayer-time-large {
  font-size: 48px;
  font-weight: 200;
  font-family: 'Monaco', 'Courier New', monospace;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.countdown-timer {
  font-size: 24px;
  font-weight: 300;
  font-family: 'Monaco', 'Courier New', monospace;
  opacity: 0.7;
  letter-spacing: 1px;
}

/* Prayer List */
.prayer-list {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  padding-bottom: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: none;
}

.prayer-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.prayer-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.prayer-list-item.active {
  background: rgba(76, 175, 80, 0.2);
  border-left: 3px solid #4CAF50;
  padding-left: 13px;
}

.prayer-list-name {
  font-size: 16px;
  font-weight: 400;
}

.prayer-list-time {
  font-size: 18px;
  font-weight: 300;
  font-family: 'Monaco', 'Courier New', monospace;
  opacity: 0.9;
}

/* Settings Button */
.settings-btn {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 20px;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 400;
  margin-top: -15px;
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hero Container - Center Image */
.hero-container {
  flex: 1;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #0f0f1e;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  min-height: 400px;
  max-height: 800px;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-text {
  font-size: 120px;
  font-weight: 100;
  letter-spacing: 20px;
  opacity: 0.3;
  text-transform: uppercase;
  user-select: none;
}

/* Slider Dots */
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.dot.active {
  background: white;
  width: 30px;
  border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-layout {
    flex-direction: column;
    gap: 20px;
  }
  
  .left-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .next-prayer-box,
  .prayer-list {
    flex: 1;
    min-width: 280px;
  }
  
  .hero-container {
    min-height: 350px;
  }
  
  .hero-text {
    font-size: 80px;
  }
  
  .top-bar {
    padding: 15px 20px;
  }
  
  .date-time-bar {
    font-size: 16px;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .tv-container {
    min-height: 100vh;
  }
  
  .audio-banner {
    font-size: 13px;
    padding: 10px 15px;
  }
  
  .adhan-toast {
    top: 60px;
    right: 10px;
    left: 10px;
    min-width: auto;
    padding: 15px;
  }
  
  .adhan-toast-icon {
    font-size: 32px;
  }
  
  .adhan-toast-prayer {
    font-size: 20px;
  }
  
  .adhan-toast-time {
    font-size: 16px;
  }
  
  .main-layout {
    padding: 15px;
    gap: 15px;
  }
  
  .left-sidebar {
    flex-direction: column;
    width: 100%;
  }
  
  .top-bar {
    padding: 12px 15px;
  }
  
  .date-time-bar {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    text-align: center;
  }
  
  .gregorian-date-inline,
  .hijri-date-inline {
    width: 100%;
  }
  
  .current-time-inline {
    font-size: 18px;
  }
  
  .location-name,
  .settings-info,
  .timezone-info {
    font-size: 13px;
  }
  
  .separator {
    display: none;
  }
  
  .next-prayer-box {
    padding: 20px;
  }
  
  .next-prayer-name {
    font-size: 24px;
  }
  
  .next-prayer-time-large {
    font-size: 40px;
  }
  
  .countdown-timer {
    font-size: 20px;
  }
  
  .prayer-list {
    padding: 15px;
  }
  
  .prayer-list-item {
    padding: 10px 12px;
  }
  
  .prayer-list-name {
    font-size: 14px;
  }
  
  .prayer-list-time {
    font-size: 16px;
  }
  
  .hero-container {
    min-height: 300px;
    max-height: 400px;
  }
  
  .hero-text {
    font-size: 48px;
    letter-spacing: 8px;
  }
  
  .settings-btn {
    padding: 12px 18px;
    font-size: 14px;
  }
  
  .modal-content {
    padding: 20px;
    max-width: 95vw;
    max-height: 85vh;
  }
}

@media (max-width: 480px) {
  .audio-banner {
    font-size: 12px;
    padding: 8px 10px;
  }
  
  .adhan-toast {
    top: 50px;
    padding: 12px;
    gap: 10px;
  }
  
  .adhan-toast-icon {
    font-size: 28px;
  }
  
  .adhan-toast-title {
    font-size: 10px;
  }
  
  .adhan-toast-prayer {
    font-size: 18px;
  }
  
  .adhan-toast-time {
    font-size: 14px;
  }
  
  .adhan-toast-close {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  
  .top-bar {
    padding: 10px;
  }
  
  .date-time-bar {
    font-size: 11px;
    gap: 5px;
  }
  
  .current-time-inline {
    font-size: 16px;
  }
  
  .location-name,
  .settings-info,
  .timezone-info {
    font-size: 11px;
  }
  
  .main-layout {
    padding: 10px;
    gap: 10px;
  }
  
  .next-prayer-box {
    padding: 15px;
  }
  
  .next-prayer-label {
    font-size: 10px;
  }
  
  .next-prayer-name {
    font-size: 20px;
  }
  
  .next-prayer-time-large {
    font-size: 32px;
  }
  
  .countdown-timer {
    font-size: 18px;
  }
  
  .prayer-list {
    padding: 12px;
    gap: 8px;
  }
  
  .prayer-list-item {
    padding: 8px 10px;
  }
  
  .prayer-list-name {
    font-size: 13px;
  }
  
  .prayer-list-time {
    font-size: 14px;
  }
  
  .hero-container {
    min-height: 250px;
    max-height: 300px;
    border-radius: 12px;
  }
  
  .hero-text {
    font-size: 36px;
    letter-spacing: 5px;
  }
  
  .slider-dots {
    bottom: 15px;
    gap: 8px;
  }
  
  .dot {
    width: 8px;
    height: 8px;
  }
  
  .dot.active {
    width: 20px;
  }
  
  .settings-btn {
    padding: 10px 15px;
    font-size: 13px;
    margin-top: -10px;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

body {
  scroll-behavior: smooth;
}

.tv-container {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
body::-webkit-scrollbar,
.tv-container::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track,
.tv-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

body::-webkit-scrollbar-thumb,
.tv-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover,
.tv-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Smooth Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tv-container > * {
  animation: fadeIn 0.6s ease-out;
}
