/*
 * Styles for the Иммигранткаст Webamp site.
 * This stylesheet defines the layout for the Winamp player and the cassette
 * representations of podcast episodes. The design is light by default and
 * supports dark mode via prefers‑color‑scheme.
 */

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
}

header {
  background: #3d5a80;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
}

header h1 {
  margin: 0;
  font-size: 2.5rem;
}

header .tagline {
  margin-top: 0.5rem;
  font-size: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.section-title {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #293241;
  text-align: center;
}

/* Webamp wrapper: center the player on the page */
.webamp-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  margin-top: 1rem;
  position: relative;
}

/* Cassette area container */
.cassette-area {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem 0;
}

/* Cassette appearance */
.cassette {
  width: 180px;
  height: 120px;
  background: #f5eedf;
  border: 2px solid #3d3d3d;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s ease;
}

.cassette:active {
  cursor: grabbing;
}

/* Spools on a cassette */
.cassette .spool {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid #3d3d3d;
  border-radius: 50%;
  background: #e1dbcd;
  top: 36px;
}

.cassette .spool.left {
  left: 20px;
}

.cassette .spool.right {
  right: 20px;
}

/* Label area on cassette */
.cassette .label {
  position: absolute;
  top: 12px;
  left: 60px;
  right: 12px;
  height: 56px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  html, body {
    background: #1d1e26;
    color: #e5e7eb;
  }
  header {
    background: #141b33;
    color: #f0f4f8;
  }
  .section-title {
    color: #c4d5ef;
  }
  .cassette {
    background: #2b2b2f;
    border-color: #555;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  }
  .cassette .spool {
    background: #3b3f47;
    border-color: #777;
  }
  .cassette .label {
    background: #444a5a;
    border-color: #5a5e6f;
    color: #d1d5db;
  }
}

/* Responsive adjustments for small screens */
@media (max-width: 600px) {
  .cassette {
    width: 140px;
    height: 90px;
  }
  .cassette .spool {
    width: 24px;
    height: 24px;
    top: 28px;
  }
  .cassette .spool.left { left: 16px; }
  .cassette .spool.right { right: 16px; }
  .cassette .label {
    top: 8px;
    left: 48px;
    height: 44px;
    font-size: 0.55rem;
  }
}