
* {
  box-sizing: border-box;
}

body {
  background: #2563eb; /* Dropbox blue */
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.main-content {
  flex: 1;
  padding: 24px 16px 48px 16px; /* Responsive padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100vw;
}

.container {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 400px;
  margin: 0 auto 24px auto;
  padding: 32px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.description-box {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 32px auto;
  padding: 32px 24px;
  background: #2563eb;
  border-radius: 3px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 400;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-align: left;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  color: #2563eb;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -1px;
  text-align: center;
  word-wrap: break-word;
}

h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  word-wrap: break-word;
}

.desc-title {
  color: #fff !important;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.desc-lead {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.desc-body {
  font-size: 1rem;
  line-height: 1.6;
}

form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  margin-top: 24px;
}

input[type="email"] {
  width: 100%;
  padding: 12px;
  border-radius: 3px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
  font-size: 1rem;
  box-sizing: border-box;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.3;
}

button[type="submit"]:hover {
  background: #174ea6;
}

#message {
  margin-top: 14px;
  font-size: 1rem;
  color: #2563eb;
  text-align: center;
  word-wrap: break-word;
}

.analytics {
  margin-top: 28px;
  text-align: center;
  color: #23272A;
  font-size: 1.15rem;
  font-weight: 500;
  background: #f2f3f5;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* Admin Panel Styles */
.admin-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 90vw;
  max-width: 340px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  z-index: 9999;
  padding: 18px;
  font-family: inherit;
  border: 2px solid #2563eb;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #2563eb;
}

#close-admin-panel {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #5865F2;
  cursor: pointer;
  padding: 0;
  min-width: 24px;
}

#admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-card {
  background: #f2f3f5;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  color: #23272A;
  box-shadow: 0 2px 8px rgba(88,101,242,0.04);
  font-size: 0.9rem;
  word-wrap: break-word;
}

#admin-area {
  display: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#admin-area.visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

#admin-area button,
.admin-panel button {
  background: #5865F2;
  color: #fff;
  margin: 10px 0;
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
  word-wrap: break-word;
}

#admin-area button:hover,
.admin-panel button:hover {
  background: #4752C4;
}

#view-emails {
  background: #28a745 !important;
}

#view-emails:hover {
  background: #218838 !important;
}

#admin-msg {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 500;
  word-wrap: break-word;
}

#admin-msg.success { 
  color: #43b581; 
}

#admin-msg.error { 
  color: #f04747; 
}

#email-list {
  background: #f8f9fa;
  border-radius: 5px;
  padding: 10px;
  border: 1px solid #dee2e6;
  margin-top: 15px;
  max-height: 200px;
  overflow-y: auto;
}

#email-content {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Footer styles */
footer {
  background: #5865F2;
  color: #fff;
  text-align: center;
  padding: 1em 16px;
  margin-top: auto;
  width: 100%;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border-top: 1px solid #e5e7eb;
  word-wrap: break-word;
  box-sizing: border-box;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding: 16px 12px 32px 12px;
  }
  
  .container {
    max-width: 100%;
    margin: 0 auto 16px auto;
    padding: 24px 20px 20px 20px;
  }
  
  .description-box {
    padding: 24px 20px;
    font-size: 1rem;
    margin-bottom: 24px;
  }
  
  h1 {
    font-size: 1.75rem;
    margin-bottom: 12px;
  }
  
  h2 {
    font-size: 1rem;
  }
  
  .desc-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }
  
  .desc-lead {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }
  
  .desc-body {
    font-size: 0.95rem;
  }
  
  button[type="submit"] {
    font-size: 0.95rem;
    padding: 14px 12px;
  }
  
  .admin-panel {
    top: 8px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }
  
  #admin-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .admin-card {
    font-size: 0.85rem;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px 8px 24px 8px;
  }
  
  .container {
    padding: 20px 16px 16px 16px;
  }
  
  .description-box {
    padding: 20px 16px;
    font-size: 0.95rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 0.95rem;
  }
  
  .desc-title {
    font-size: 1.2rem;
  }
  
  .desc-lead {
    font-size: 1rem;
  }
  
  .desc-body {
    font-size: 0.9rem;
  }
  
  button[type="submit"] {
    font-size: 0.9rem;
    padding: 12px 10px;
  }
  
  footer {
    font-size: 0.9rem;
    padding: 0.8em 12px;
  }
}
