:root {
  --bg-color: #0d0f12;
  --panel-bg: rgba(25, 28, 36, 0.6);
  --primary: #00ffcc;
  --primary-glow: rgba(0, 255, 204, 0.4);
  --text-main: #ffffff;
  --text-muted: #a0a5b1;
  --border: rgba(255, 255, 255, 0.1);
  --success: #39ff14;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top, #1a1e27 0%, var(--bg-color) 100%);
}

.app-container {
  width: 100%;
  max-width: 500px;
  padding: 2rem;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  text-align: center;
}

header {
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 3rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: rgba(0, 255, 204, 0.05);
  box-shadow: 0 0 15px var(--primary-glow);
}

.drop-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.drop-text {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.drop-subtext {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.upload-status {
  margin-top: 2rem;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  transition: width 0.2s ease;
}

.result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid var(--primary-glow);
}

.result-box h3 {
  color: var(--success);
  margin-bottom: 0.5rem;
}

.result-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.link-container {
  display: flex;
  gap: 0.5rem;
}

.link-container input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid var(--border);
  background: #000;
  color: #fff;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
}

.link-container button {
  padding: 0 1.5rem;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.link-container button:hover {
  background: #00e6b8;
  transform: translateY(-1px);
}

/* Audio Preview */
.audio-preview {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 8px;
  outline: none;
}

/* History Section */
.history-section {
  margin-top: 2rem;
  text-align: left;
}

.history-section h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Scrollbar for history */
.history-list::-webkit-scrollbar {
  width: 6px;
}
.history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2); 
  border-radius: 4px;
}
.history-list::-webkit-scrollbar-thumb {
  background: var(--border); 
  border-radius: 4px;
}
.history-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-glow); 
}

.history-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.history-item:hover {
  transform: translateX(4px);
  border-color: var(--primary-glow);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-name {
  font-weight: 500;
  color: var(--text-main);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.history-actions input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  background: #000;
  color: var(--text-muted);
  border-radius: 4px;
  font-size: 0.8rem;
}

.history-actions button {
  padding: 0.4rem 0.8rem;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.history-actions button:hover {
  background: var(--primary);
  color: #000;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  transform: translateX(120%);
  animation: slideIn 0.3s forwards ease-out;
}

.toast.toast-error {
  border-left: 4px solid #ff3366;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-info {
  border-left: 4px solid var(--primary);
}

.toast.fade-out {
  animation: slideOut 0.3s forwards ease-in;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

@keyframes slideOut {
  to { transform: translateX(120%); opacity: 0; }
}

/* Queue Section */
.queue-section {
  margin-top: 2rem;
  text-align: left;
}

.queue-section h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.queue-list::-webkit-scrollbar {
  width: 6px;
}
.queue-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.queue-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.queue-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-item-name-input {
  width: 100%;
  padding: 0.5rem;
  background: #000;
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 4px;
  font-family: inherit;
}

.queue-remove-btn {
  background: transparent;
  color: #ff3366;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

.upload-all-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.upload-all-btn:hover {
  background: #00e6b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.upload-all-btn:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.delete-btn {
  padding: 0.4rem 0.6rem;
  background: rgba(255, 51, 102, 0.1);
  color: #ff3366 !important;
  border: 1px solid #ff3366 !important;
  border-radius: 4px;
  font-size: 1.2rem !important;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-btn:hover {
  background: #ff3366 !important;
  color: #fff !important;
}
