
:root {
  --color-light-bg: #f4f4f4;
  --color-light-text: #121212;
  --color-light-card: #ffffff;
  /* --accent: #1abc9c; lighter green teal */
  --accent: #228B22; 
  --accent-hover: #17a689;
  --result-bg: #e0f7fa;
  --button-save: #27ae60; /* lighter green */
  --button-save-hover: #1e8449; /* slightly darker on hover */
  --button-export: #1f618d;
  --button-export-hover: #15406b;
  --disabled-color: #555555;
  --disabled-bg: #cccccc;
  --disabled-border: #bbbbbb;
}


/* =============================
   Fonts
============================= */
@font-face {
  font-family: "Poppins";
  src: url("fonts/poppins.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

body {
  margin: 0;
  font-family: "Poppins", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-light-bg);
  color: var(--color-light-text);
  transition: all 0.3s ease;
  text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
  color: #48bf53;
}

/* =============================
   Headings
============================= */
h1, h2, h3 {
  color: var(--accent);
}

h1 { margin-top: 0; font-size: 1.8em; }
h2 { font-size: 1.5em; margin-top: 1.5rem; }
h3 { font-size: 1.2em; margin-top: 1rem; }

/* =============================
   Inputs & Labels
============================= */
label {
  font-weight: bold;
  margin-bottom: 6px;
  display: block;
}

input[type="text"],
input[type="number"] {
  padding: 12px;
  font-size: 1em;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--color-light-bg);
  color: var(--color-light-text);
  transition: all 0.3s ease;
}

/* =============================
   Result Boxes
============================= */
.result-box, .result {
  font-size: 1.3em;
  font-weight: bold;
  padding: 15px;
  border-radius: 12px;
  background-color: var(--result-bg);
  color: var(--color-light-text);
}

/* =============================
   Result Section
============================= */


.result-section label {
  font-weight: bold;
  margin-bottom: 2px;
}

.result-box {
  padding: 10px 15px;
  border-radius: 10px;
  background-color: var(--result-bg);
  color: var(--color-light-text);
  font-size: 1.2em;
  font-weight: bold;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.3;
  margin-bottom: 20px;
}

.result-box p {
  margin: 0;
  font-size: 1.3em;
}


/* =============================
   Buttons
============================= */
.buttons {
  display: flex;
  gap: 10px;
}

.buttons button,
.history-controls button {
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Save Button */
.save-btn { background-color: var(--button-save); color: #fff; }
.save-btn:hover { background-color: var(--button-save-hover); }

/* Clear Button */
.clear-btn { background-color: #c0392b; color: #fff; }
.clear-btn:hover { background-color: #922b21; }

/* Export Button */
.export-btn { background-color: var(--button-export); color: #fff; }
.export-btn:hover { background-color: var(--button-export-hover); }

/* Disabled Buttons */
.disabled-btn {
  color: var(--disabled-color);
  background-color: var(--disabled-bg);
  border: 1px solid var(--disabled-border);
  cursor: not-allowed;
}

/* =============================
   History
============================= */
#history { margin-top: 5px; }
#historyList { list-style: disc; padding-left: 20px; }
.history-controls { display: flex; gap: 10px; }

/* =============================
   Converter Cards
============================= */
.converter-card {
  background-color: var(--color-light-card);
  border-radius: 12px;
  padding: 24px 30px 30px 30px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =============================
   Layout wrapper for main content + sidebar
============================= */
.content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.main-content { flex: 1; margin-top: 0; }

/* =============================
   Sidebar
============================= */
.sidebar {
  width: 270px;
  padding: 1.2rem;
  background: var(--color-light-card);
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  box-sizing: border-box;
  transition: all 0.3s ease;
  margin-top: 0;
  flex-shrink: 0;
}

.sidebar-ad {
  height: 200px;
  background: #f1f1f1;
  border: 1px dashed #ccc;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #666;
  font-size: 0.9rem;
}

.sidebar-links h3 {
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  color: var(--color-light-text);
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  background: var(--color-light-bg);
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-weight: 500;
  color: var(--color-light-text);
  transition: all 0.2s ease;
}

.sidebar-btn:hover:not(.disabled-btn) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-icon img {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.card-icon img {
  width: 50px;
  height: 50px;
  display: block;
}

/* =============================
   Home Page Cards
============================= */
.home-cards {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.home-card {
  flex: 1 1 300px;
  background-color: var(--color-light-card);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-decoration: none;
  color: var(--color-light-text);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.home-card h2 {
  margin: 0;
  color: var(--accent);
  font-size: 1.2rem;
}

.home-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.card-icon img, .card-icon svg {
  width: 44px;
  height: 44px;
  display: block;
}

/*Conversion tables*/
.conversion-table-section {
  margin-top: 2rem;
}

.conversion-table-section h2 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.conversion-table-section p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.conversion-table {
  border-collapse: collapse;
  font-size: 0.95rem;
}

.conversion-table th,
.conversion-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: left;
}

.conversion-table thead {
  background: #f2f2f2;
  font-weight: 600;
}

.conversion-table tr:nth-child(even) {
  background: #fafafa;
}

.conversion-table tr:hover {
  background: #f0f8ff;
}


/* Mobile adjustments for home cards */
@media (max-width: 768px) {
  .home-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    min-height: 160px;
  }
  .home-card h2 { font-size: 1rem; }
  .home-card p { font-size: 0.85rem; }
}


/* =============================
   Mobile responsive
============================= */
@media (max-width: 768px) {
  .content-wrapper { flex-direction: column; gap: 1.5rem; }
  .sidebar { width: 100%; margin-top: 1.5rem; border-radius: 12px; }
}
