/* Submit Page Styles — extends style.css */

/* Nav Links */
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface2);
}

.nav-links a.active {
  color: var(--blue);
  background: rgba(88, 166, 255, 0.1);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--surface);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text);
  background: var(--surface2);
}

.tab.active {
  color: var(--text);
  background: var(--surface2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form Card */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.form-card h2 {
  font-size: 1.4em;
  margin-bottom: 6px;
}

.form-desc {
  color: var(--text-dim);
  font-size: 0.9em;
  margin-bottom: 24px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9em;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group .hint {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 0.85em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95em;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  line-height: 1.6;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: var(--surface);
  color: var(--text);
}

.url-count {
  text-align: right;
  font-size: 0.8em;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Buttons */
.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary {
  background: linear-gradient(135deg, #238636, #2ea043);
  color: white;
  box-shadow: 0 2px 12px rgba(46, 160, 67, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2ea043, #3fb950);
  box-shadow: 0 4px 16px rgba(46, 160, 67, 0.4);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, #9e6a03, #d29922);
  color: white;
  box-shadow: 0 2px 12px rgba(210, 153, 34, 0.3);
}

.btn-warning:hover:not(:disabled) {
  background: linear-gradient(135deg, #d29922, #e3b341);
  box-shadow: 0 4px 16px rgba(210, 153, 34, 0.4);
  transform: translateY(-1px);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.85em;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
}

.btn-small:hover {
  background: var(--border);
}

.btn-danger {
  padding: 4px 10px;
  font-size: 0.8em;
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: var(--red-bg);
}

/* Progress */
.progress-container {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.85em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.progress-results {
  max-height: 300px;
  overflow-y: auto;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.85em;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.progress-item:last-child {
  border-bottom: none;
}

.progress-item .url {
  color: var(--blue);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.progress-item .status-ok {
  color: var(--green);
  font-weight: 600;
}

.progress-item .status-err {
  color: var(--red);
  font-weight: 600;
}

.progress-item .uuid {
  color: var(--text-dim);
  font-family: monospace;
  font-size: 0.85em;
}

/* History */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.history-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-dim);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
  vertical-align: top;
}

.history-table tr:hover td {
  background: rgba(88, 166, 255, 0.03);
}

.history-table .loading {
  text-align: center;
  color: var(--text-dim);
  padding: 40px;
}

.history-table .empty {
  text-align: center;
  color: var(--text-dim);
  padding: 40px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  font-weight: 600;
  white-space: nowrap;
}

.badge-report {
  background: rgba(88, 166, 255, 0.15);
  color: var(--blue);
}

.badge-mistake {
  background: rgba(210, 153, 34, 0.15);
  color: var(--yellow);
}

.badge-phishing {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}

.badge-copyright {
  background: rgba(188, 140, 255, 0.15);
  color: var(--purple);
}

.badge-other {
  background: rgba(139, 148, 158, 0.15);
  color: var(--text-dim);
}

.badge-submitted {
  background: var(--green-bg);
  color: var(--green);
}

.badge-error {
  background: var(--red-bg);
  color: var(--red);
}

.urls-cell {
  max-width: 250px;
}

.urls-cell .url-item {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  color: var(--blue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 250px;
}

.uuid-cell {
  font-family: monospace;
  font-size: 0.85em;
  color: var(--text-dim);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.toast {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9em;
  font-weight: 500;
  min-width: 300px;
  max-width: 450px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  background: #1a3a2a;
  border: 1px solid var(--green);
  color: var(--green);
}

.toast.error {
  background: #3a1a1a;
  border: 1px solid var(--red);
  color: var(--red);
}

.toast.info {
  background: #1a2a3a;
  border: 1px solid var(--blue);
  color: var(--blue);
}

.toast.removing {
  animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

/* Responsive */
@media (max-width: 768px) {
  .form-card {
    padding: 18px;
  }

  .tabs {
    flex-direction: column;
  }

  .tab {
    text-align: center;
  }

  .nav-links {
    margin-left: 0;
    margin-top: 8px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left {
    display: flex;
    flex-direction: column;
  }

  .history-table {
    font-size: 0.8em;
  }

  .toast {
    min-width: 260px;
    max-width: calc(100vw - 40px);
  }
}
