/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #1a4b6d;
  color: white;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

/* Font Definitions */
@font-face {
  font-family: "BanglaFont";
  src: local("Kalpurush"), local("SolaimanLipi"), local("Noto Sans Bengali");
  font-display: swap;
}

.bangla-font {
  font-family: "BanglaFont", sans-serif;
}

.bijoy-font {
  font-family: "SutonnyMJ", "BijoyBangla", monospace;
}

/* Header Styles */
header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #4a8bc2;
  padding-bottom: 10px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo h1 {
  color: #4dff9e;
  font-size: 28px;
  font-weight: bold;
}

.logo span {
  margin-left: 5px;
  color: white;
}

.header-info {
  text-align: right;
  font-size: 14px;
  margin-top: 5px;
}

/* Top Navigation */
.top-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 15px;
}

.nav-link {
  background-color: #2980b9;
  color: white;
  text-align: center;
  padding: 5px;
  text-decoration: none;
  border-radius: 3px;
  font-size: 12px;
  transition: background-color 0.2s;
}

.nav-link:hover {
  background-color: #3498db;
}

/* Main Content Layout */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Sidebar Styles */
.sidebar {
  width: 100%;
  margin-bottom: 15px;
}

.sidebar-box {
  background-color: #1a4b6d;
  border: 1px solid #4a8bc2;
  border-radius: 5px;
  margin-bottom: 15px;
}

.sidebar-header {
  background-color: #2980b9;
  color: white;
  text-align: center;
  padding: 5px;
  font-weight: 500;
  border-radius: 3px 3px 0 0;
}

.sidebar-link {
  display: block;
  padding: 8px 10px;
  color: white;
  text-decoration: none;
  border-top: 1px solid #4a8bc2;
  transition: background-color 0.2s;
}

.sidebar-link:hover {
  background-color: #2c5d8a;
}

.latest-post {
  padding: 10px;
  color: #4dff9e;
  font-size: 14px;
}

.latest-post p {
  margin-bottom: 8px;
}

/* Converter Styles */
.converter-container {
  width: 100%;
}

.converter-box {
  background-color: #1a5980;
  border: 1px solid #4a8bc2;
  border-radius: 5px;
  padding: 15px;
}

.converter-title {
  font-size: 22px;
  text-align: center;
  color: #ffeb3b;
  font-weight: bold;
  margin-bottom: 5px;
}

.converter-subtitle {
  text-align: center;
  color: #4dff9e;
  margin-bottom: 20px;
  font-size: 14px;
}

.text-box-container {
  margin-bottom: 15px;
}

.text-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.button-group {
  display: flex;
  gap: 5px;
}

.action-button {
  background-color: #f1c40f;
  color: black;
  border: none;
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.action-button:hover {
  background-color: #f39c12;
}

.action-button.clear {
  background-color: #e74c3c;
  color: white;
}

.action-button.clear:hover {
  background-color: #c0392b;
}

.text-box {
  width: 100%;
  height: 120px;
  padding: 10px;
  border: 1px solid #4a8bc2;
  border-radius: 5px;
  resize: vertical;
  font-size: 16px;
  background-color: white;
  color: black;
}

.text-statistics {
  text-align: center;
  font-size: 12px;
  margin-bottom: 15px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.main-button {
  background-color: #2980b9;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.main-button:hover {
  background-color: #3498db;
}

.clear-button {
  background-color: #e74c3c;
}

.clear-button:hover {
  background-color: #c0392b;
}

/* Right Sidebar Specific */
.converter-image {
  background-color: white;
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  margin-bottom: 15px;
}

.converter-image img {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.download-button {
  background-color: #2980b9;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 5px 10px;
  width: 100%;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.download-button:hover {
  background-color: #3498db;
}

.search-box {
  background-color: white;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 15px;
  color: black;
}

.search-input {
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-bottom: 5px;
  font-size: 12px;
}

.search-button {
  background-color: #2980b9;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}

.select-box {
  width: 100%;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-bottom: 5px;
  font-size: 12px;
}

.rate-display {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-top: 10px;
}

.counter-box {
  background-color: #1e5b8d;
  color: white;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 15px;
}

.counter-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.counter-value {
  background-color: #2980b9;
  padding: 0 5px;
  border-radius: 3px;
}

.browser-info {
  font-size: 12px;
}

.browser-info ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-top: 5px;
}

/* Ad Container */
.ad-container {
  background-color: white;
  border-radius: 5px;
  padding: 5px;
  margin-bottom: 15px;
  text-align: center;
}

.ad-label {
  font-size: 10px;
  color: #2980b9;
  margin-bottom: 5px;
}

.ad-placeholder {
  min-height: 250px;
  background-color: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 12px;
}

/* SEO Analysis */
.seo-analysis {
  background-color: #0c3b5c;
  border: 1px solid #4a8bc2;
  border-radius: 5px;
  padding: 15px;
  margin-top: 20px;
}

.seo-analysis.hidden {
  display: none;
}

.seo-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffeb3b;
  text-align: center;
  margin-bottom: 15px;
}

.seo-score-container {
  margin-bottom: 20px;
}

.seo-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.seo-score-value {
  font-weight: bold;
  color: #4dff9e;
}

.progress-container {
  width: 100%;
  height: 10px;
  background-color: #0a2e4a;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #4dff9e;
  border-radius: 5px;
  transition: width 0.3s ease;
}

.seo-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.seo-column {
  width: 100%;
}

.seo-section {
  margin-bottom: 15px;
}

.seo-section h4 {
  color: #4dff9e;
  font-weight: 500;
  margin-bottom: 5px;
}

.seo-stats {
  list-style: none;
}

.seo-stats li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 14px;
}

.seo-recommendations {
  border-top: 1px solid #2c5d8a;
  padding-top: 15px;
}

.seo-recommendations h4 {
  color: #4dff9e;
  font-weight: 500;
  margin-bottom: 10px;
}

.seo-recommendations ul {
  list-style-type: disc;
  padding-left: 20px;
}

.seo-recommendations li {
  margin-bottom: 5px;
  font-size: 14px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: white;
  color: black;
  margin: 10% auto;
  padding: 20px;
  border-radius: 5px;
  width: 90%;
  max-width: 500px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: bold;
}

.close-modal {
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: black;
}

.modal-body {
  margin-bottom: 20px;
}

.font-list {
  margin: 15px 0;
}

.font-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 5px;
  margin-bottom: 10px;
}

.font-download-button {
  background-color: #2980b9;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.font-download-button:hover {
  background-color: #3498db;
}

.download-message {
  color: #27ae60;
  font-size: 14px;
  margin: 10px 0;
}

.download-message.hidden {
  display: none;
}

.font-instructions {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.close-button {
  background-color: #ddd;
  border: none;
  border-radius: 3px;
  padding: 8px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.close-button:hover {
  background-color: #ccc;
}

/* Footer */
footer {
  text-align: center;
  font-size: 12px;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #4a8bc2;
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Responsive Design */
@media (min-width: 768px) {
  header {
    flex-direction: row;
  }

  .top-nav {
    grid-template-columns: repeat(8, 1fr);
  }

  .main-content {
    flex-direction: row;
  }

  .sidebar {
    width: 22%;
  }

  .converter-container {
    width: 60%;
    margin: 0 15px;
  }

  .seo-details {
    flex-direction: row;
  }

  .seo-column {
    width: 50%;
  }
}
