/* ==========================================
   BASIC & TEXT STYLING
   ========================================== */
body {
  /* Text formatting properties */
  font-family: Arial, sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #f4f4f9;

  /* Margin property: Centers container and clears edges */
  margin: 20px;
  padding: 0;
}

h1, h2 {
  /* Text alignment */
  text-align: center;
  color: #2c3e50;
}

/* ==========================================
   BORDER, MARGIN, & PADDING DEMONSTRATION
   ========================================== */
.card {
  background-color: #ffffff;

  /* Border property */
  border: 2px solid #3498db;
  border-radius: 8px;

  /* Padding property: Inner space inside the box */
  padding: 20px;

  /* Margin property: Space outside the box */
  margin: 20px auto;
  max-width: 800px;
}

/* ==========================================
   FLOAT DEMONSTRATION
   ========================================== */
.float-box {
  /* Float property */
  float: left;
  width: 120px;
  height: 100px;
  background-color: #e74c3c;
  color: white;
  text-align: center;
  line-height: 100px;

  /* Margin & Padding applied to floated element */
  margin-right: 15px;
  margin-bottom: 10px;
  padding: 5px;
  border: 1px solid #c0392b;
}

/* Clearfix to contain floated elements */
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

/* ==========================================
   FLEXBOX DEMONSTRATION
   ========================================== */
.flex-container {
  /* Flexbox property */
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;

  background-color: #ecf0f1;
  padding: 15px;
  border: 1px dashed #bdc3c7;
  margin-top: 20px;
}

.flex-item {
  flex: 1;
  background-color: #2ecc71;
  color: white;
  padding: 15px;
  text-align: center;
  border: 1px solid #27ae60;
  border-radius: 4px;
}