/* RealPlayer 1999 Enhanced Global Edition Styling */

body {
  margin: 0;
  padding: 20px;
  background: #008080;
  font-family: 'MS Sans Serif', sans-serif;
  font-size: 11px;
  overflow: hidden;
}

.realplayer-window {
  width: 680px;
  height: 520px;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  position: relative;
}

/* Window Chrome */
.window-titlebar {
  height: 18px;
  background: linear-gradient(90deg, #0040c0 0%, #4080ff 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
  font-weight: bold;
  font-size: 11px;
}

.window-title {
  display: flex;
  align-items: center;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-button {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  font-size: 8px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.window-button:active {
  border: 1px inset #c0c0c0;
}

/* Enhanced Menu Bar */
.menu-bar {
  height: 20px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-size: 11px;
  position: relative;
}

.menu-container {
  position: relative;
}

.menu-item {
  padding: 4px 8px;
  cursor: pointer;
  position: relative;
}

.menu-item:hover,
.menu-item.active {
  background: #316ac5;
  color: white;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  min-width: 180px;
  z-index: 1000;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.menu-dropdown-item {
  padding: 4px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.menu-dropdown-item:hover {
  background: #316ac5;
  color: white;
}

.menu-separator {
  height: 1px;
  background: #808080;
  margin: 2px 8px;
}

.menu-check {
  font-size: 10px;
}

.menu-arrow {
  font-size: 8px;
}

/* Country Selection Bar */
.country-bar {
  height: 28px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  font-size: 10px;
}

.country-search {
  width: 150px;
  height: 18px;
  border: 1px inset #c0c0c0;
  padding: 1px 4px;
  font-size: 10px;
}

.country-dropdown {
  width: 200px;
  height: 20px;
  border: 1px inset #c0c0c0;
  background: white;
  font-size: 10px;
}

.refresh-button {
  padding: 2px 8px;
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.refresh-button:active {
  border: 1px inset #c0c0c0;
}

.station-count {
  color: #666;
  font-size: 9px;
}

/* Transport Controls */
.transport-controls {
  height: 40px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
}

.transport-button {
  width: 32px;
  height: 24px;
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-button:active {
  border: 2px inset #c0c0c0;
}

.transport-button:disabled {
  color: #808080;
  cursor: not-allowed;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-slider {
  width: 60px;
  height: 4px;
  background: #808080;
  border: 1px inset #c0c0c0;
  appearance: none;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 12px;
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  cursor: pointer;
}

.progress-area {
  flex: 1;
  height: 20px;
  background: #008080;
  border: 1px inset #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.buffer-indicator {
  width: 100%;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    #008080 0px,
    #008080 10px,
    #40a0a0 10px,
    #40a0a0 20px
  );
  animation: scroll 2s linear infinite;
}

@keyframes scroll {
  from { background-position: 0px 0px; }
  to { background-position: 20px 0px; }
}

.real-logo {
  position: absolute;
  color: white;
  font-weight: bold;
  background: #0040c0;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 10px;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  background: #c0c0c0;
}

/* Enhanced Channels Panel */
.channels-panel {
  width: 240px;
  background: #c0c0c0;
  border-right: 1px solid #808080;
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: bold;
  margin-bottom: 8px;
}

.folder-icon {
  width: 16px;
  height: 16px;
}

.search-input {
  width: 100%;
  height: 20px;
  background: white;
  border: 1px inset #c0c0c0;
  padding: 2px 4px;
  font-size: 11px;
  margin-bottom: 8px;
}

.channel-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.channel-button {
  padding: 4px 8px;
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  font-size: 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
}

.channel-button:active {
  border: 1px inset #c0c0c0;
}

.channel-button.active {
  background: #316ac5;
  color: white;
}

.station-list {
  flex: 1;
  overflow-y: auto;
  border: 1px inset #c0c0c0;
  background: white;
  max-height: 280px;
}

.station-item {
  padding: 6px 8px;
  cursor: pointer;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.station-item:hover {
  background: #e0e0e0;
}

.station-item.active {
  background: #316ac5;
  color: white;
}

.station-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.station-info-container {
  flex: 1;
  min-width: 0;
}

.station-name {
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-meta {
  display: flex;
  gap: 8px;
  font-size: 9px;
  color: #666;
  margin-top: 2px;
}

.station-item.active .station-meta {
  color: #ccc;
}

.station-state {
  font-weight: bold;
}

.station-tags {
  font-style: italic;
}

.favorite-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  margin-left: 4px;
  flex-shrink: 0;
}

.loading-message {
  padding: 20px;
  text-align: center;
  color: #666;
  font-style: italic;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-info {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #666;
}

.refresh-icon {
  width: 12px;
  height: 12px;
}

/* Enhanced Media Display */
.media-display {
  flex: 1;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  padding: 20px;
}

.realplayer-logo {
  text-align: center;
  position: relative;
}

.logo-oval {
  width: 140px;
  height: 90px;
  border: 3px solid #0040c0;
  border-radius: 50%;
  background: radial-gradient(circle, #4080ff 0%, #0040c0 100%);
  margin: 0 auto 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

.logo-text {
  font-size: 28px;
  font-weight: bold;
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.logo-subtitle {
  font-size: 12px;
  color: #ccc;
  margin-top: 8px;
}

.now-playing {
  text-align: center;
  padding: 20px;
  max-width: 100%;
}

.playing-station-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
}

.station-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #4080ff;
}

.station-location {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 6px;
}

.station-genres {
  font-size: 11px;
  color: #999;
  margin-bottom: 8px;
}

.station-homepage {
  color: #4080ff;
  text-decoration: underline;
  font-size: 11px;
  margin-bottom: 20px;
  display: inline-block;
}

.station-homepage:hover {
  color: #6090ff;
}

.audio-visualizer {
  display: flex;
  justify-content: center;
  gap: 4px;
  height: 40px;
  align-items: end;
}

.vis-bar {
  width: 8px;
  background: #008080;
  border-radius: 2px;
  animation: visualize 1s ease-in-out infinite;
}

.vis-bar:nth-child(1) { animation-delay: 0s; }
.vis-bar:nth-child(2) { animation-delay: 0.1s; }
.vis-bar:nth-child(3) { animation-delay: 0.2s; }
.vis-bar:nth-child(4) { animation-delay: 0.3s; }
.vis-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes visualize {
  0%, 100% { height: 8px; }
  50% { height: 32px; }
}

/* Enhanced Status Bar */
.status-bar {
  height: 24px;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 10px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bitrate {
  background: black;
  color: #00ff00;
  padding: 2px 6px;
  font-family: monospace;
}

.play-indicator {
  color: #00ff00;
  font-size: 8px;
}

.status-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connection-quality {
  font-size: 10px;
  color: #666;
}

.buffering {
  color: #ff0000;
  animation: blink 1s infinite;
  margin-left: 8px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.country-info {
  font-size: 9px;
  color: #666;
}

.time-display {
  background: black;
  color: #00ff00;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 9px;
}

/* Dialog System */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.dialog-window {
  background: #c0c0c0;
  border: 2px outset #c0c0c0;
  padding: 16px;
  min-width: 300px;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.3);
}

.dialog-window h3 {
  margin: 0 0 12px 0;
  font-size: 12px;
  font-weight: bold;
}

.dialog-input {
  width: 100%;
  height: 20px;
  border: 1px inset #c0c0c0;
  padding: 2px 4px;
  margin-bottom: 8px;
  font-size: 11px;
}

.dialog-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.dialog-button {
  padding: 4px 16px;
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  font-size: 11px;
  cursor: pointer;
}

.dialog-button:active {
  border: 1px inset #c0c0c0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 1px inset #c0c0c0;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
}

::-webkit-scrollbar-button {
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  height: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .realplayer-window {
    width: 100%;
    height: 100vh;
    margin: 0;
  }
  
  .channels-panel {
    width: 200px;
  }
  
  .country-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 4px 8px;
  }
  
  .country-dropdown {
    width: 160px;
  }
  
  .station-name {
    font-size: 9px;
  }
}