* {
  box-sizing: border-box;
}

html {
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f7f8;
  color: #1f2937;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}

.header {
  margin-bottom: 32px;
  text-align: center;
}

.header h1 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.2;
}

.header p {
  margin: 0;
  color: #5f6368;
  font-size: 17px;
  line-height: 1.5;
}

.input-section {
  margin-bottom: 24px;
}

.input-section label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}

textarea {
  display: block;
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
}

textarea::placeholder {
  color: #8a8f98;
}

textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-color: #2563eb;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.counter-card {
  min-width: 0;
  padding: 20px 16px;
  border: 1px solid #e1e3e6;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.counter-label {
  display: block;
  margin-bottom: 10px;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.4;
}

.counter-value {
  display: block;
  color: #111827;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Character Limit Checker */

.platform-section {
  margin-top: 40px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.platform-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #e1e3e6;
  border-radius: 8px;
  background: #ffffff;
}

.platform-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.3;
}

.item-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-card[data-platform="x"] .item-icon {
  fill: currentColor;
  stroke: none;
}

.platform-card[data-platform="youtubeTitle"] .item-icon,
.platform-card[data-platform="youtubeDescription"] .item-icon,
.platform-card[data-platform="linkedin"] .item-icon {
  fill: none;
  stroke: currentColor;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

.platform-limit {
  margin: 0 0 14px;
  color: #5f6368;
  font-size: 14px;
  line-height: 1.4;
}

.platform-count {
  margin: 0 0 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.platform-status {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.platform-status.normal {
  color: #15803d;
  font-weight: 600;
}

.platform-status.warning {
  color: #ca8a04;
  font-weight: 600;
}

.platform-status.over {
  color: #dc2626;
  font-weight: 700;
}

/* Informational content */

.info-section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #e1e3e6;
}

.info-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.3;
}

.info-section h3 {
  margin: 24px 0 8px;
  font-size: 18px;
  line-height: 1.4;
}

.info-section p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.7;
}

/* Button */

.button-container {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

button {
  min-width: 100px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #f3f4f6;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Footer */

.site-footer {
  width: 100%;
  border-top: 1px solid #e1e3e6;
  background: #ffffff;
}

.site-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.site-footer a {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Static information pages */

.page-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
}

.page-content h2 {
  margin: 28px 0 10px;
  font-size: 22px;
  line-height: 1.35;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p,
.page-content li {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.7;
}

.page-content p {
  margin: 0 0 16px;
}

.page-content ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.page-content a {
  color: #1d4ed8;
}

.page-back {
  display: inline-block;
  margin-top: 32px;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 600;
}

/* Responsive */

@media (max-width: 700px) {
  .container {
    padding: 32px 16px;
  }

  .header {
    margin-bottom: 24px;
  }

  .header h1 {
    font-size: 30px;
  }

  .header p {
    font-size: 16px;
  }

  textarea {
    min-height: 240px;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .counter-card {
    padding: 18px 12px;
  }

  .counter-value {
    font-size: 24px;
  }

  .platform-section {
    margin-top: 32px;
  }

  .platform-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .platform-card {
    padding: 18px;
  }

  .info-section {
    margin-top: 32px;
    padding-top: 24px;
  }

  .site-footer nav {
    gap: 14px 18px;
    padding: 20px 16px;
  }

  .page-container {
    padding: 32px 16px;
  }

  .page-header h1 {
    font-size: 30px;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 28px 12px;
  }

  .counter-grid {
    gap: 10px;
  }

  .counter-label {
    font-size: 13px;
  }

  .counter-value {
    font-size: 22px;
  }

  .platform-card {
    padding: 16px;
  }

  .platform-card h3 {
    font-size: 17px;
  }

  .platform-count {
    font-size: 20px;
  }

  .site-footer nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}