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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Header */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Dashboard Header */
.dashboard-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.dashboard-header h1 {
  font-size: 1.8rem;
}

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

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
}

/* Main Content */
.main-content {
  padding: 40px 20px;
}

.dashboard-main {
  padding: 30px 20px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 40px 20px;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #333;
}

.hero p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

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

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

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Feature Grid */
.features {
  margin: 60px 0;
}

.features h3 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 40px;
  color: #333;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  text-align: center;
  padding: 30px 20px;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: #667eea;
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-card h4 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #333;
}

.feature-card p {
  color: #666;
}

/* Info Section */
.info {
  margin: 60px 0;
  padding: 40px;
  background: #f8f9fa;
  border-radius: 8px;
}

.info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #333;
}

.steps {
  list-style: none;
  counter-reset: steps;
}

.steps li {
  counter-increment: steps;
  padding: 15px 0 15px 50px;
  position: relative;
  font-size: 1.1rem;
  color: #555;
}

.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 12px;
  width: 35px;
  height: 35px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Login Box */
.login-box {
  max-width: 400px;
  margin: 100px auto;
  padding: 40px;
  text-align: center;
}

.login-box h1 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #333;
}

.login-box p {
  color: #666;
  margin-bottom: 30px;
}

.login-footer {
  margin-top: 30px;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Card */
.card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
}

.card h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #333;
}

.card-subtitle {
  color: #666;
  margin-bottom: 25px;
}

.card-help {
  background: #f8f9fa;
  border-color: #dee2e6;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

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

.form-help {
  display: block;
  margin-top: 5px;
  font-size: 0.9rem;
  color: #666;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* API Key Display */
.api-key-display {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.api-key-code {
  flex: 1;
  background: #f8f9fa;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

.config-status {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  margin-top: 20px;
}

.config-status p {
  margin-bottom: 10px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

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

/* Setup Instructions */
.setup-steps {
  list-style: none;
  counter-reset: setup;
}

.setup-steps > li {
  counter-increment: setup;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
}

.setup-steps > li:last-child {
  border-bottom: none;
}

.setup-steps > li::before {
  content: counter(setup) ". ";
  font-weight: bold;
  color: #667eea;
}

.setup-steps ul {
  margin: 10px 0 10px 30px;
}

.setup-steps li li {
  list-style: disc;
  padding: 5px 0;
}

.setup-steps code {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.setup-steps pre {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin: 15px 0;
  overflow-x: auto;
}

.setup-steps pre code {
  background: none;
  padding: 0;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
  background: #f8f9fa;
  text-align: center;
  padding: 20px;
  color: #666;
  border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

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

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

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

  .form-actions .btn {
    width: 100%;
  }

  .api-key-display {
    flex-direction: column;
  }

  .api-key-display .btn {
    width: 100%;
  }
}
