/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* Auth Screen */
.auth-container {
  max-width: 400px;
  margin: 100px auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-container h1 {
  text-align: center;
  color: #667eea;
  margin-bottom: 10px;
  font-size: 2em;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 0.9em;
}

.auth-container h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5em;
}

.auth-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.auth-container input:focus {
  outline: none;
  border-color: #667eea;
}

.auth-container button {
  width: 100%;
  padding: 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.auth-container button:hover {
  background: #5568d3;
}

.switch-form {
  text-align: center;
  margin-top: 15px;
  color: #666;
}

.switch-form a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.switch-form a:hover {
  text-decoration: underline;
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 10px;
  border-radius: 6px;
  margin-top: 15px;
  display: none;
  text-align: center;
}

/* Main App Screen */
.navbar {
  background: white;
  padding: 15px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar h1 {
  color: #667eea;
  font-size: 1.5em;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-info span {
  color: #333;
  font-weight: 600;
}

/* Container */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.section {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.section h2 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.3em;
}

/* Input URL */
.input-url {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.input-url:focus {
  outline: none;
  border-color: #667eea;
}

/* Platform Grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.platform-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.platform-checkbox:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.platform-checkbox input {
  cursor: pointer;
}

.platform-checkbox span {
  font-size: 14px;
  font-weight: 600;
}

/* Buttons */
.btn-primary, .btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
  margin-left: 10px;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-large {
  padding: 15px 30px;
  font-size: 18px;
}

/* Progress */
.progress-container {
  margin-top: 15px;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  width: 0%;
  transition: width 0.5s ease;
  border-radius: 15px;
}

.status-text {
  text-align: center;
  color: #666;
  font-weight: 600;
}

/* Job History */
.job-history {
  max-height: 400px;
  overflow-y: auto;
}

.job-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.job-item:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.job-info strong {
  color: #333;
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.job-platforms {
  color: #666;
  font-size: 12px;
}

.job-meta {
  text-align: right;
}

.job-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 5px;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-success {
  background: #d4edda;
  color: #155724;
}

.status-error {
  background: #f8d7da;
  color: #721c24;
}

.job-date {
  color: #999;
  font-size: 12px;
}

.empty-message {
  text-align: center;
  color: #999;
  padding: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

.info-text {
  color: #666;
  margin: 15px 0;
  line-height: 1.6;
}

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

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .btn-secondary {
    margin-left: 0;
    margin-top: 10px;
  }

  .job-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-meta {
    text-align: left;
    margin-top: 10px;
  }
}
