/* ============================================
   ONLINE PITCH CHANGER - FINAL v3.0.0
   COMPLETE WORKING VERSION
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =============== CONTAINER =============== */
.opc-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.opc-tool {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.opc-tool-header {
  background: linear-gradient(135deg, #0066cc 0%, #003d99 100%);
  color: #ffffff;
  padding: 2rem;
  text-align: center;
}

.opc-tool-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.opc-tool-header p {
  font-size: 1rem;
  margin: 0;
  opacity: 0.95;
}

.opc-tool-content {
  padding: 2rem;
}

/* =============== UPLOAD SECTION =============== */
.opc-section {
  margin-bottom: 2rem;
}

.opc-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #0066cc;
}

.opc-upload-area {
  border: 3px dashed #0066cc;
  border-radius: 10px;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #e6f2ff 100%);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.opc-upload-area:hover {
  background: linear-gradient(135deg, #e6f2ff 0%, #d0e5ff 100%);
  border-color: #003d99;
  box-shadow: 0 8px 24px rgba(0, 102, 204, 0.15);
  transform: translateY(-2px);
}

.opc-upload-area.drag-over {
  background: linear-gradient(135deg, #d0e5ff 0%, #c0deff 100%);
  border-color: #003d99;
  box-shadow: 0 12px 32px rgba(0, 102, 204, 0.25);
}

.opc-upload-area input {
  display: none;
}

.opc-upload-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.opc-upload-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 0.5rem;
}

.opc-upload-hint {
  font-size: 0.9rem;
  color: #999999;
}

/* =============== FILE INFO =============== */
.opc-file-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9ff;
  border-radius: 8px;
  border-left: 4px solid #0066cc;
}

.opc-info-item {
  text-align: center;
}

.opc-info-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  display: block;
}

.opc-info-value {
  font-size: 1rem;
  font-weight: 700;
  color: #0066cc;
  font-family: monospace;
}

/* =============== CONTROLS =============== */
.opc-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.opc-control-group {
  background: #f8f9ff;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #0066cc;
}

.opc-control-label {
  font-size: 1rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.opc-control-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0066cc;
  font-family: monospace;
}

.opc-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #ff6b6b 0%, #ffd93d 50%, #4caf50 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.opc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0066cc;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.4);
  border: 2px solid #ffffff;
  transition: all 0.2s;
}

.opc-slider::-webkit-slider-thumb:hover {
  background: #003d99;
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.6);
}

.opc-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0066cc;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.4);
  transition: all 0.2s;
}

.opc-slider::-moz-range-thumb:hover {
  background: #003d99;
  transform: scale(1.2);
}

.opc-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.opc-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #999999;
  font-weight: 600;
}

/* =============== PLAYBACK =============== */
.opc-playback {
  background: #f8f9ff;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #0066cc;
}

.opc-playback-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.opc-btn {
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.opc-btn-icon {
  font-size: 1.5rem;
}

.opc-btn--primary {
  background: #0066cc;
  color: #ffffff;
}

.opc-btn--primary:hover:not(:disabled) {
  background: #003d99;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.opc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #cccccc;
  color: #666666;
}

.opc-progress-bar {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.opc-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #0066cc, #003d99);
  width: 0%;
}

.opc-time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #666666;
  font-family: monospace;
  font-weight: 600;
}

/* =============== DOWNLOAD =============== */
.opc-download-section {
  background: linear-gradient(135deg, #0066cc 0%, #003d99 100%);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  color: #ffffff;
  margin-bottom: 2rem;
}

.opc-btn--download {
  width: 100%;
  padding: 1rem;
  background: #ffffff;
  color: #0066cc;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.opc-btn--download:hover:not(:disabled) {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.opc-btn--download:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.opc-download-hint {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* =============== RESET =============== */
.opc-btn--reset {
  background: transparent;
  color: #0066cc;
  border: 2px solid #0066cc;
  width: 100%;
  padding: 0.75rem;
}

.opc-btn--reset:hover:not(:disabled) {
  background: #e6f2ff;
  border-color: #003d99;
  color: #003d99;
}

/* =============== MESSAGES =============== */
.opc-message {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: none;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.opc-message.show {
  display: block;
}

.opc-message--loading {
  background: #e6f2ff;
  border-left: 4px solid #0066cc;
  color: #333333;
}

.opc-message--success {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

.opc-message--error {
  background: #ffebee;
  border-left: 4px solid #f44336;
  color: #c62828;
}

.opc-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #e0e0e0;
  border-top-color: #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.75rem;
  vertical-align: middle;
}

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

/* =============== INFO BOXES =============== */
.opc-info-section {
  background: #f8f9ff;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #0066cc;
  margin-top: 1.5rem;
}

.opc-info-section h4 {
  font-size: 1rem;
  color: #333333;
  margin: 0 0 1rem 0;
}

.opc-info-section ul {
  margin: 0;
  padding-left: 1.5rem;
}

.opc-info-section li {
  color: #666666;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* =============== RESPONSIVE =============== */
@media (max-width: 899px) {
  .opc-controls {
    grid-template-columns: 1fr;
  }

  .opc-file-info {
    grid-template-columns: repeat(2, 1fr);
  }

  .opc-playback-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .opc-container {
    padding: 1rem;
  }

  .opc-tool-content {
    padding: 1rem;
  }

  .opc-tool-header {
    padding: 1.5rem 1rem;
  }

  .opc-tool-header h2 {
    font-size: 1.3rem;
  }

  .opc-file-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 1rem;
  }

  .opc-playback-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .opc-btn-icon {
    font-size: 1.2rem;
  }

  .opc-section {
    margin-bottom: 1.5rem;
  }

  .opc-btn {
    font-size: 0.8rem;
    padding: 0.6rem;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .opc-tool {
    background: #1a1a1a;
  }

  .opc-tool-content {
    background: #1a1a1a;
  }

  .opc-section-title {
    color: #ffffff;
  }

  .opc-upload-area {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  }

  .opc-control-group,
  .opc-file-info,
  .opc-playback,
  .opc-info-section {
    background: #0f0f0f;
  }

  .opc-control-label,
  .opc-section-title {
    color: #ffffff;
  }

  .opc-control-group {
    color: #cccccc;
  }
}
