/* StrokeX Training Data Portal Styles */

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

:root {
  --primary-green: #4CAF50;
  --primary-dark: #388E3C;
  --bg-dark: #0d0d1a;
  --bg-card: rgba(26, 26, 46, 0.95);
  --bg-surface: rgba(40, 40, 60, 0.8);
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --border-color: rgba(76, 175, 80, 0.2);
  --error-color: #f44336;
  --warning-color: #ff9800;
  --info-color: #2196f3;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 50%, var(--bg-dark) 100%);
  min-height: 100vh;
  color: var(--text-primary);
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-svg {
  width: 48px;
  height: 48px;
}

.logo-section h1 {
  color: var(--primary-green);
  font-size: 24px;
  font-weight: 700;
}

.tagline {
  color: var(--text-secondary);
  font-size: 12px;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-email {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--primary-green);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(76, 175, 80, 0.1);
}

.btn-full {
  width: 100%;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background: #d32f2f;
}

.btn-danger:disabled {
  background: rgba(244, 67, 54, 0.5);
  cursor: not-allowed;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 100%;
  position: relative;
  border: 1px solid var(--border-color);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.modal-content h2 {
  color: var(--primary-green);
  margin-bottom: 8px;
}

.modal-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-green);
}

.form-error {
  color: var(--error-color);
  font-size: 12px;
  margin-bottom: 16px;
  min-height: 18px;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.empty-state h2 {
  color: var(--text-primary);
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
}

/* Table Section */
.table-section {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.table-header h2 {
  color: var(--text-primary);
  font-size: 18px;
}

.table-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.refresh-icon {
  margin-right: 6px;
}

.delete-icon {
  margin-right: 6px;
}

.table-container {
  overflow-x: auto;
}

.shots-table {
  width: 100%;
  border-collapse: collapse;
}

.shots-table th,
.shots-table td {
  padding: 16px 24px;
  text-align: left;
}

.shots-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.shots-table tr {
  border-bottom: 1px solid var(--border-color);
}

.shots-table tr:last-child {
  border-bottom: none;
}

.shots-table tr:hover {
  background: rgba(76, 175, 80, 0.05);
}

.shots-table td {
  font-size: 14px;
}

.shot-id {
  font-family: monospace;
  color: var(--primary-green);
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.loading-row td {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.empty-row td {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(76, 175, 80, 0.3);
  border-top-color: var(--primary-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 12px;
  vertical-align: middle;
}

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

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-content p {
  color: var(--text-secondary);
  font-size: 12px;
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary-green);
}

.footer-links .divider {
  color: var(--border-color);
  font-size: 12px;
}

/* Terms Checkbox */
.terms-checkbox {
  margin-top: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-green);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--primary-green);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
  z-index: 1001;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-content p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
  min-width: 250px;
}

.cookie-content a {
  color: var(--primary-green);
  text-decoration: none;
}

.cookie-content a:hover {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .table-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .shots-table th,
  .shots-table td {
    padding: 12px 16px;
  }

  .actions-cell {
    flex-direction: column;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

  .footer-content {
    gap: 8px;
  }

  .footer-links {
    gap: 6px;
  }
}
