html {
  font-size: 14px;
  height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

body > .container main {
  flex: 1;
}

.flex-grow {
  flex: 1;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Developer-Focused Styling */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-section .display-3 {
  font-weight: 700;
  letter-spacing: -1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section .lead {
  font-size: 1.5rem;
  opacity: 0.95;
}

/* Tool Cards */
.tool-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.tool-card:hover {
  border-color: #667eea;
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-icon svg {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.tool-card h3 {
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.tool-card .btn {
  width: 100%;
  margin-top: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tool-card .btn:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Form Styling */
.form-control, .form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: 'Courier New', monospace;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

textarea.form-control {
  font-family: 'Courier New', monospace;
  background-color: #f8f9fa;
  resize: vertical;
  min-height: 150px;
}

textarea.font-monospace {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Badge Styling */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Card Styling */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
  border-radius: 10px 10px 0 0 !important;
  font-weight: 600;
  border: none;
}

.card-body {
  padding: 1.5rem;
}

/* Alert Styling */
.alert {
  border: none;
  border-radius: 8px;
  border-left: 4px solid;
}

.alert-danger {
  border-left-color: #dc3545;
  background-color: #f8d7da;
  color: #721c24;
}

.alert-success {
  border-left-color: #28a745;
  background-color: #d4edda;
  color: #155724;
}

/* Button Group */
.btn-group {
  gap: 0.5rem;
}

.btn-group .btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-group .btn-check:checked + .btn {
  background-color: #667eea;
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* List Group */
.list-group-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  background-color: #f8f9fa;
  padding: 1rem;
}

.list-group-item:hover {
  background-color: #e7f3ff;
  border-color: #667eea;
}

.list-group-item code {
  color: #667eea;
  background-color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

/* Table Styling */
.table {
  font-family: 'Courier New', monospace;
}

.table thead {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #2d3748;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #e7f3ff;
}

.table td {
  vertical-align: middle;
  padding: 0.75rem;
  border: 1px solid #e9ecef;
}

.table code {
  color: #667eea;
  background-color: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-top: none;
  padding: 2rem 0;
  margin-top: auto;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: white;
}

/* Navbar Enhancement */
.navbar {
  background: white !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: 2px solid #e9ecef;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 600;
  margin: 0 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #667eea !important;
  background-color: #f0f4ff;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  transition: all 0.2s ease;
  font-weight: 500;
}

.dropdown-item:hover {
  background-color: #667eea;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1.5rem;
  }

  .hero-section .display-3 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1.1rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Utility Classes */
.text-primary-gradient {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-sm-elevated {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.border-start-primary {
  border-left: 4px solid #667eea !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}
