/* Base Variables */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #4cc9f0;
    --success: #4ade80;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
  }
  
  /* Global Reset */
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--dark);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
  }
  
  /* Dark Mode Overrides */
  body.dark-mode {
    background-color: var(--gray-100-dark, #1e293b);
    color: var(--light);
  }
  
  .dark-mode {
    --primary: #5a8dee;
    --primary-dark: #5077c4;
    --secondary: #4cc9f0;
    --success: #4ade80;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --dark: #f8fafc;
    --light: #1e293b;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
  }
  
  /* App Container */
  .app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* Header */
  .header {
    background: var(--primary);
    padding: 1rem;
    color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
  }
  
  .logo i {
    font-size: 1.5rem;
  }
  
  .header-actions {
    display: flex;
    gap: 1rem;
  }
  
  /* Main Content */
  .main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
  }
  
  /* Footer */
  .footer {
    background: white;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--gray-200);
  }
  
  /* Ad Banner */
  .ad-banner {
    background-color: var(--gray-200);
    text-align: center;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    border-radius: var(--border-radius);
    margin: 1rem 0;
  }
  
  /* Workflow and Cards */
  .workflow {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s;
  }
  
  .card:hover {
    box-shadow: var(--shadow-lg);
  }
  
  .card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  
  /* Stepper Navigation */
  .stepper {
    display: flex;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 0 1rem;
  }
  
  .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 1rem;
    transition: transform 0.3s;
  }
  
  .step:hover {
    transform: scale(1.05);
  }
  
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background-color: var(--gray-300);
    z-index: 0;
  }
  
  .step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--gray-300);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    z-index: 1;
    transition: background-color 0.3s;
  }
  
  .step.active .step-number {
    background-color: var(--primary);
  }
  
  .step.completed .step-number {
    background-color: var(--success);
  }
  
  .step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-400);
  }
  
  .step.active .step-label {
    color: var(--dark);
    font-weight: 600;
  }
  
  /* Form Elements */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
  }
  
  .form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    transition: border-color 0.2s;
  }
  
  .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  }
  
  textarea.form-control {
    resize: vertical;
    min-height: 100px;
  }
  
  /* Input Group */
  .input-group {
    display: flex;
    gap: 0.5rem;
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
  }
  
  .btn-primary {
    background-color: var(--primary);
    color: white;
  }
  
  .btn-primary:hover {
    background-color: var(--primary-dark);
  }
  
  .btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-300);
    color: var(--dark);
  }
  
  .btn-outline:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
  }
  
  .btn-success {
    background-color: var(--success);
    color: white;
  }
  
  .btn-success:hover {
    background-color: #3ecd71;
  }
  
  .btn-danger {
    background-color: var(--danger);
    color: white;
  }
  
  .btn-danger:hover {
    background-color: #e12d51;
  }
  
  .btn-info {
    background-color: var(--secondary);
    color: white;
  }
  
  .btn-info:hover {
    background-color: #3cbae0;
  }
  
  .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  /* Table Container */
  .table-container {
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
  }
  
  #example-table {
    width: 100%;
    min-height: 300px;
  }
  
  /* Terminal */
  .terminal {
    background: var(--dark);
    color: var(--success);
    font-family: 'Courier New', monospace;
    padding: 1rem;
    border-radius: var(--border-radius);
    height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
  }
  
  /* Modal */
  .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(3px);
  }
  
  .modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s;
  }
  
  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  
  /* Close Button for Modal */
  .close-modal {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--dark);
  }
  
  /* Tabs */
  .tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
  }
  
  .tab {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--gray-400);
  }
  
  .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
  
  .tab-content {
    display: none;
  }
  
  .tab-content.active {
    display: block;
  }
  
  /* Badge */
  .badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
  }
  
  .badge-primary {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary);
  }
  
  /* Donation Card */
  .donation-card {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: white;
    margin-top: 2rem;
  }
  
  .donation-card h3 {
    margin-bottom: 0.75rem;
  }
  
  .donation-card p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
  }
  
  /* Accordion */
  .accordion {
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
  }
  
  .accordion-item {
    border-bottom: 1px solid var(--gray-200);
  }
  
  .accordion-item:last-child {
    border-bottom: none;
  }
  
  .accordion-header {
    padding: 1rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
  }
  
  .accordion-body {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s;
  }
  
  .accordion-body.active {
    padding: 1.5rem;
    max-height: 1000px;
  }
  
  /* Tooltip */
  .tooltip {
    position: relative;
    display: inline-block;
  }
  
  .tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark);
    color: white;
    text-align: center;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
  }
  
  .tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }
  
  /* Status Messages */
  .status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    background-color: var(--gray-100);
  }
  
  .status.success {
    background-color: rgba(74, 222, 128, 0.1);
    color: var(--success);
  }
  
  .status.error {
    background-color: rgba(244, 63, 94, 0.1);
    color: var(--danger);
  }
  
  .status.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
  }
  
  .status.info {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--secondary);
  }
  
  /* Input with Icon for API Key */
  .input-with-icon {
    position: relative;
  }
  
  .input-with-icon input {
    padding-right: 2.5rem;
  }
  
  .toggle-visibility {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .header-content {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
    .header-actions {
      width: 100%;
      justify-content: space-between;
    }
    .stepper {
      flex-wrap: wrap;
    }
    .step {
      flex: 0 0 50%;
      margin-bottom: 1rem;
    }
    .step:not(:last-child)::after {
      display: none;
    }
    .input-group {
      flex-direction: column;
    }
  }
  