/* Reset & Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background 0.3s ease, color 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  min-height: 100vh;
  padding: 20px;
  color: #2d2d2d;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: #fdfdfd;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Header */
.header {
  background: linear-gradient(45deg, #ff8a5c, #ff5e62);
  color: white;
  padding: 30px;
  text-align: center;
}

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

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Content */
.content {
  padding: 30px;
}

/* API Setup */
.api-setup {
  background: #f8f9fb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
  border-left: 4px solid #ff8a5c;
}

.api-setup h3 {
  color: #ff8a5c;
  margin-bottom: 15px;
}

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

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #d0d7dd;
  border-radius: 8px;
  font-size: 16px;
  background: white;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #ff8a5c;
}

/* Buttons */
.btn {
  background: linear-gradient(45deg, #ff8a5c, #ff5e62);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  margin: 5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
  background: linear-gradient(45deg, #00c6ff, #0072ff);
}

.btn-danger {
  background: linear-gradient(45deg, #ff4b2b, #ff416c);
}

.btn-success {
  background: linear-gradient(45deg, #32e0c4, #0abde3);
}

/* Contacts */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.contact-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #e6e6e6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 15px;
  display: block;
  border: 3px solid #ff8a5c;
}

.contact-name {
  font-size: 1.3rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

.contact-details {
  margin-bottom: 15px;
}

.contact-details p {
  margin-bottom: 5px;
  color: #666;
}

.contact-actions {
  text-align: center;
}

/* States */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.2rem;
}

.error {
  background: #ffe6e6;
  color: #cc0000;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #cc0000;
}

.success {
  background: #e6ffe6;
  color: #006600;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #006600;
}

.hidden {
  display: none;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.back-btn {
  margin-bottom: 20px;
}

/* Footer */
footer h3,
footer p {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  padding-top: 20px;
  width: 100%;
}

.footerBtn{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

footer a {
  text-decoration: none;
  cursor: pointer;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    margin: 10px;
  }

  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .content {
    padding: 20px;
  }

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

/* ===================== */
/* DARK MODE STYLES */
/* ===================== */
body.dark-mode {
  background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
  color: #eeeeee;
}

.dark-mode .container {
  background: #1f1f2e;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

.dark-mode .header {
  background: linear-gradient(45deg, #00f2fe, #4facfe);
  color: #ffffff;
}

.dark-mode .api-setup {
  background: #29293d;
  border-left: 4px solid #00f2fe;
}

.dark-mode .form-group label {
  color: #f0f0f0;
}

.dark-mode .form-group input,
.dark-mode .form-group select {
  background: #333345;
  color: #f1f1f1;
  border-color: #555;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group select:focus {
  border-color: #00f2fe;
}

.dark-mode .contact-card {
  background: #2a2a3d;
  border-color: #3a3a4a;
}

.dark-mode .contact-name {
  color: #eeeeee;
}

.dark-mode .contact-details p {
  color: #c0c0c0;
}

.dark-mode .loading {
  color: #bbb;
}

.dark-mode .error {
  background: #330000;
  color: #ffb3b3;
  border-left-color: #ff4d4d;
}

.dark-mode .success {
  background: #003300;
  color: #a5f0a5;
  border-left-color: #22c55e;
}

.dark-mode footer h3,
.dark-mode footer p {
  color: #ddd;
}

.dark-mode footer a {
  color: #aaa;
}
