* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      padding: 20px;
    }
    .container {
      max-width: 1400px;
      margin: 0 auto;
      background: rgba(255, 255, 255, 0.95);
      border-radius: 20px;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
      overflow: hidden;
    }
    .header {
      background: linear-gradient(45deg, #4f46e5, #7c3aed);
      color: white;
      padding: 30px;
      text-align: center;
    }
    .header h1 {
      font-size: 2.5em;
      margin-bottom: 10px;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    .header p {
      font-size: 1.1em;
      opacity: 0.9;
    }
    .tabs {
      display: flex;
      flex-direction: column;
      background: #f8fafc;
      border-right: 1px solid #e2e8f0;
      border-bottom: none;
      overflow-x: auto;
      min-width: 200px;
    }
    .tab {
      padding: 15px 25px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      color: #64748b;
      transition: all 0.3s ease;
      white-space: nowrap;
      text-align: left;
    }
    .tab.active {
      color: #4f46e5;
      background: white;
      border-right: 3px solid #4f46e5;
      border-bottom: none;
    }
    .tab:hover:not(.active) {
      color: #475569;
      background: #f1f5f9;
    }
    .content {
      padding: 30px;
    }
    .tool-section {
      display: none;
    }
    .tool-section.active {
      display: block;
    }
    .input-group {
      margin-bottom: 25px;
    }
    .input-group label {
      display: block;
      font-weight: 600;
      color: #374151;
      margin-bottom: 8px;
    }
    .input-group textarea, .input-group input {
      width: 100%;
      padding: 12px;
      border: 2px solid #e5e7eb;
      border-radius: 8px;
      font-family: 'Courier New', monospace;
      font-size: 14px;
      transition: border-color 0.3s ease;
    }
    .input-group textarea:focus, .input-group input:focus {
      outline: none;
      border-color: #4f46e5;
    }
    .button-group {
      display: flex;
      gap: 10px;
      margin: 20px 0;
      flex-wrap: wrap;
    }
    .btn {
      background: linear-gradient(45deg, #4f46e5, #7c3aed);
      color: white;
      border: none;
      padding: 12px 24px;
      border-radius: 8px;
      cursor: pointer;
      font-weight: 600;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    }
    .btn:active {
      transform: translateY(0);
    }
    .btn-secondary {
      background: linear-gradient(45deg, #6b7280, #9ca3af);
    }
    .result {
      background: #f8fafc;
      border: 2px solid #e5e7eb;
      border-radius: 8px;
      padding: 20px;
      margin-top: 20px;
      font-family: 'Courier New', monospace;
      font-size: 14px;
      white-space: pre-wrap;
      max-height: 300px;
      overflow-y: auto;
    }
    .result.success {
      border-color: #10b981;
      background: #ecfdf5;
    }
    .result.error {
      border-color: #ef4444;
      background: #fef2f2;
      color: #dc2626;
    }
    .examples {
      background: #f0f9ff;
      border-left: 4px solid #0284c7;
      padding: 15px;
      margin: 20px 0;
      border-radius: 0 8px 8px 0;
    }
    .examples h3 {
      color: #0369a1;
      margin-bottom: 10px;
    }
    .examples pre {
      background: rgba(255, 255, 255, 0.7);
      padding: 8px;
      border-radius: 4px;
      margin: 5px 0;
      font-size: 12px;
      overflow-x: auto;
    }
    .stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 15px;
      margin-top: 20px;
    }
    .stat-card {
      background: white;
      padding: 15px;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      text-align: center;
    }
    .stat-card h4 {
      color: #4f46e5;
      font-size: 24px;
      font-weight: bold;
    }
    .stat-card p {
      color: #6b7280;
      font-size: 14px;
      margin-top: 5px;
    }
    .flex-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
    @media (max-width: 768px) {
      .flex-layout {
        grid-template-columns: 1fr;
      }
    }
    @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .contact-form {
            max-width: 500px;
        }

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

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

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-group textarea {
            height: 120px;
            resize: vertical;
        }

        .required-indicator {
            color: #dc3545;
        }

        .optional-text {
            color: #6c757d;
            font-size: 14px;
            font-weight: normal;
        }

        .submit-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 15px 30px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            width: 100%;
            transition: all 0.3s ease;
        }

        .submit-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
        }

        .submit-btn:active {
            transform: translateY(0);
        }

        .submit-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .contact-info {
            margin-bottom: 30px;
        }

        .contact-info h2 {
            color: #333;
            margin-bottom: 10px;
        }

        .contact-info p {
            color: #6c757d;
            line-height: 1.6;
        }

        .success-message {
            display: none;
            background: #d4edda;
            color: #155724;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            border: 1px solid #c3e6cb;
        }

        .placeholder-content {
            text-align: center;
            padding: 60px 20px;
            color: #6c757d;
        }

        .placeholder-content h2 {
            margin-bottom: 15px;
            color: #333;
        }
        .contact-options {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }

        .contact-method {
            background: #f8f9fa;
            padding: 25px;
            border-radius: 12px;
            border-left: 4px solid #667eea;
        }

        .form-link-btn {
            display: inline-block;
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .form-link-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
            color: white;
            text-decoration: none;
        }




/* Side-by-side layout */
#exercise-container {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: 100%;
  flex-wrap: wrap;
}

#controls {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#question {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 10px;
}

.buttons {
  display: flex;
  gap: 10px;
}

button, select {
  padding:5px;
  font-size:16px;
  cursor:pointer;
}

select {
  border: 1px solid #ccc;
  border-radius: 4px;
}

#output {
  font-weight: bold;
  margin-top: 5px;
}

#hint {
  font-style: italic;
  color: #555;
}

/* CodeMirror styling */
.CodeMirror {
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 50px;
  font-size: 16px;
  padding: 2px;
  background-color: #fff;
}

.CodeMirror:focus {
  border-color: #007bff;
  box-shadow: 0 0 3px #007bff;
}


#snippet {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  max-height: 500px;
  overflow: auto;
  background-color: #f9f9f9;
}

.highlight {
  background-color: yellow;
}

/* Ad styling */
.ad-container {
  margin: 10px 0;
}

header, footer {
  text-align: center;
}

.footer-ad {
  margin-top: 20px;
  text-align: center;
}
