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

body {
  background: #0f1015;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1rem;
}

.container {
  width: 100%;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* BOXES */
.box {
  background: #171821;
  border: 1px solid #272a38;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.box:focus-within {
  border-color: #3b4259;
}

.box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: #1c1e2a;
  border-bottom: 1px solid #272a38;
}

.box-header label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.actions {
  display: flex;
  gap: 0.4rem;
}

/* BUTTONS */
.btn {
  background: #242736;
  color: #e2e8f0;
  border: 1px solid #33384c;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover {
  background: #31364b;
  border-color: #434a66;
  color: #ffffff;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #ffffff;
  color: #0f1015;
  border-color: #ffffff;
  font-weight: 600;
}

.btn-primary:hover {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #0f1015;
}

/* TEXTAREA */
textarea {
  width: 100%;
  min-height: 220px;
  background: #12131a;
  color: #f1f5f9;
  border: none;
  padding: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  white-space: pre-wrap;
  word-break: break-all;
}

textarea::placeholder {
  color: #475569;
}

/* DOWNLOADS VIEW */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.view-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.download-item {
  background: #171821;
  border: 1px solid #272a38;
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.download-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.platform-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.download-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.download-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.download-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.download-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  background: #242736;
  border: 1px solid #33384c;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.download-url {
  font-size: 0.78rem;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #ffffff;
  color: #0f1015;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 600px) {
  body {
    padding: 1.25rem 0.75rem;
  }
  
  .download-item {
    flex-direction: column;
    align-items: stretch;
  }

  .download-actions {
    justify-content: stretch;
  }

  .download-actions .btn {
    flex: 1;
  }
}
