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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #1a202c;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.main-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.header {
  background: linear-gradient(135deg, #1a365d 0%, #2b77cb 50%, #3182ce 100%);
  color: white;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.header-content {
  position: relative;
  z-index: 1;
}

.header h1 {
  font-size: 3.5em;
  margin-bottom: 15px;
  font-weight: 800;
  letter-spacing: -2px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.header .subtitle {
  font-size: 1.4em;
  opacity: 0.95;
  font-weight: 300;
  margin-bottom: 20px;
}

.header .version-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.95em;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.content {
  padding: 50px;
}

.section {
  margin-bottom: 50px;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #3182ce 0%, #2b77cb 100%);
}

.section h2 {
  color: #1a365d;
  margin-bottom: 30px;
  font-size: 2.2em;
  font-weight: 700;
  display: flex;
  align-items: center;
  letter-spacing: -1px;
}

.section h2 .icon {
  margin-right: 15px;
  font-size: 1.1em;
}

.api-explorer {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #2d3748;
  font-size: 1.05em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f7fafc;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3182ce;
  background: white;
  box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1);
  transform: translateY(-1px);
}

/* Professional Checkbox Styling */
.checkbox-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e2e8f0;
}

.checkbox-group {
  margin-bottom: 35px;
}

.checkbox-group-label {
  display: block;
  margin-bottom: 20px;
  font-weight: 700;
  color: #1a365d;
  font-size: 1.2em;
  letter-spacing: -0.5px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
}

.periods-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.single-checkbox {
  grid-template-columns: 1fr;
  max-width: 200px;
}

.checkbox-card {
  position: relative;
  display: block;
  cursor: pointer;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.checkbox-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(49, 130, 206, 0.1) 0%,
    rgba(43, 119, 203, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.checkbox-card:hover {
  transform: translateY(-2px);
  border-color: #3182ce;
  box-shadow: 0 8px 20px rgba(49, 130, 206, 0.15);
}

.checkbox-card:hover::before {
  opacity: 1;
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-content {
  position: relative;
  z-index: 1;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  min-height: 80px;
}

.checkbox-icon {
  font-size: 1.5em;
  margin-bottom: 8px;
  display: block;
}

.checkbox-text {
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95em;
  letter-spacing: 0.3px;
}

/* Period Cards Special Styling */
.period-card .checkbox-content {
  flex-direction: column;
  gap: 4px;
}

.period-number {
  font-size: 1.8em;
  font-weight: 800;
  color: #1a365d;
  line-height: 1;
}

.period-unit {
  font-size: 0.85em;
  font-weight: 500;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Checked State */
.checkbox-card input[type="checkbox"]:checked + .checkbox-content {
  background: linear-gradient(135deg, #3182ce 0%, #2b77cb 100%);
  color: white;
}

.checkbox-card
  input[type="checkbox"]:checked
  + .checkbox-content
  .checkbox-text,
.checkbox-card
  input[type="checkbox"]:checked
  + .checkbox-content
  .period-number,
.checkbox-card input[type="checkbox"]:checked + .checkbox-content .period-unit {
  color: white;
}

.checkbox-card input[type="checkbox"]:checked ~ .checkbox-card {
  border-color: #3182ce;
  background: linear-gradient(135deg, #3182ce 0%, #2b77cb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(49, 130, 206, 0.3);
}

/* Disabled State */
.checkbox-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f7fafc;
  border-color: #e2e8f0;
}

.checkbox-card.disabled:hover {
  transform: none;
  border-color: #e2e8f0;
  box-shadow: none;
}

.checkbox-card.disabled .checkbox-content {
  color: #a0aec0;
  cursor: not-allowed;
}

.checkbox-card.disabled .checkbox-icon {
  opacity: 0.6;
}

/* Button Styling */
.btn-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 40px;
}

.btn {
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #3182ce 0%, #2b77cb 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(49, 130, 206, 0.4);
  background: linear-gradient(135deg, #2b77cb 0%, #2c5aa0 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(113, 128, 150, 0.4);
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.btn-success {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
  padding: 12px 20px;
  font-size: 14px;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
}

/* Link Preview */
.link-preview {
  margin-top: 30px;
  padding: 25px;
  background: linear-gradient(145deg, #f7fafc 0%, #edf2f7 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: none;
}

.link-preview h4 {
  margin: 0 0 15px 0;
  color: #2d3748;
  font-weight: 600;
}

.link-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.link-container input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #cbd5e0;
  border-radius: 8px;
  font-family: "Monaco", monospace;
  font-size: 13px;
  cursor: pointer;
  background: white;
}

/* Result Container */
.result-container {
  margin-top: 30px;
  padding: 25px;
  background: #1a202c;
  border-radius: 12px;
  border: 1px solid #2d3748;
  display: none;
}

.result-container h4 {
  margin: 0 0 15px 0;
  color: #e2e8f0;
  font-weight: 600;
}

.result-container pre {
  color: #e2e8f0;
  font-family: "Monaco", "Menlo", "Consolas", monospace;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Endpoints Section */
.endpoints-section {
  margin-top: 20px;
}

.endpoint {
  background: white;
  margin: 20px 0;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.endpoint::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(49, 130, 206, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.endpoint:hover::before {
  left: 100%;
}

.endpoint:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(49, 130, 206, 0.15);
  border-color: #3182ce;
}

.endpoint-method {
  display: inline-block;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.85em;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

.endpoint-desc {
  color: #4a5568;
  line-height: 1.6;
  font-size: 1.05em;
}

.endpoint-desc small {
  color: #718096;
  font-style: italic;
  display: block;
  margin-top: 12px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  border-left: 3px solid #cbd5e0;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 0.9em;
}

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

  .header {
    padding: 40px 20px;
  }

  .header h1 {
    font-size: 2.5em;
  }

  .content {
    padding: 30px 20px;
  }

  .section {
    padding: 25px 20px;
  }

  .api-explorer {
    padding: 25px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .checkbox-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .periods-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .link-container {
    flex-direction: column;
    gap: 10px;
  }

  .link-container input {
    width: 100%;
  }
}
