@import url('normalize.css');
@import url('piano.css');
@import url('buttons.css');
@import url('pitch-detection.css');

:root {
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1200px;
  --breakpoint-desktop: 1980px;
  --breakpoint-desktop-large: 2800px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.container {
  max-width: var(--breakpoint-desktop-large);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer {
  width: 100%;
  margin-top: auto;
  padding: 16px 20px 0;
  font-size: 0.875rem;
  color: #666;
}

.privacy-policy {
  font-size: 12px;
}

.privacy-policy a {
  transition: color 0.3s ease;
}

.privacy-policy a:hover {
  color: #4caf50;
}

@media (max-width: 768px) {
  .footer {
    padding-top: 16px;
  }

  .controls {
    min-height: 110px;
  }
}

.footer-content {
  max-width: var(--breakpoint-desktop-large);
  margin: 0 auto;
}

.copyright {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.copyright a {
  color: #4caf50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.copyright a:hover {
  color: #45a049;
}

.credits {
  font-size: 10px;
  color: #888;
  margin-top: 8px;
}

.credits a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.credits a:hover {
  color: #4caf50;
}

.feedback-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 1000;
}

.feedback-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background: #45a049;
}

.feedback-icon {
  font-size: 1.2em;
}

.feedback-text {
  font-weight: 500;
}

@media (max-width: 768px) {
  .feedback-button {
    bottom: 20px;
    right: 20px;
    padding: 10px 16px;
  }

  .feedback-text {
    display: none;
  }

  .feedback-icon {
    font-size: 1.4em;
  }

  .credits {
    max-width: 250px;
  }
}

@media (max-width: 900px) {
  .credits {
    max-width: 300px;
  }
}

.octave-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.piano {
  display: flex;
  justify-content: center;
  width: 100%;
  background: #333;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile (default) - 1 octave */
@media (max-width: 768px) {
  .keys {
    height: 180px;
  }

  .key.light {
    width: 40px;
  }

  .key.dark {
    width: 24px;
  }

  .piano {
    padding: 10px;
  }

  .container {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    gap: 10px;
  }
}

/* Tablet - 3 octaves */
@media (min-width: var(--breakpoint-mobile)) and (max-width: var(--breakpoint-tablet)) {
  .piano {
    transform: scale(0.9) translateY(-25px);
    transform-origin: center;
  }
}

/* Desktop - 4 octaves */
@media (min-width: var(--breakpoint-tablet)) and (max-width: var(--breakpoint-desktop)) {
  .piano {
    transform: scale(0.95) translateY(-25px);
    transform-origin: center;
  }
}

/* 4K - all octaves */
@media (min-width: var(--breakpoint-desktop)) {
  .piano {
    transform: scale(1) translateY(-25px);
    transform-origin: center;
  }
}

.hidden {
  display: none;
}

.freq-slider-container {
  margin-top: 20px;
  width: 100%;
  padding: 0 20px;
}

#freq-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}

#freq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
}

#freq-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

@media screen and (max-width: 1000px) and (orientation: landscape) {
  /* Стили только для телефонов в альбомной ориентации */
  .container {
    padding: 0;
  }

  .start-button {
    margin-bottom: 0;
  }

  .octave-buttons {
    margin-bottom: 0;
  }

  .feedback-text {
    display: none;
  }
}
