:root {
  --primary-color: #0ea5e9; /* Tailwind Sky 500 */
  --primary-hover: #0284c7;
  --secondary-color: #f8fafc; /* Tailwind Slate 50 */
  --text-color: #334155; /* Tailwind Slate 700 */
  --border-color: #e2e8f0; /* Tailwind Slate 200 */
  --white-color: #ffffff;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

body { font-family: 'Poppins', sans-serif; margin: 0; background: var(--secondary-color); color: var(--text-color); line-height: 1.7; }
.container { max-width: 1200px; margin: auto; padding: 20px; }
header { background: var(--white-color); box-shadow: 0 2px 6px rgba(0,0,0,0.1); padding: 15px 20px; position: sticky; top: 0; z-index: 1000; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; text-decoration: none; color: var(--primary-color); font-size: 24px; }
nav a { margin-left: 20px; text-decoration: none; color: var(--primary-color); font-weight: 500; }
.breadcrumb { margin: 15px 0; color: #64748b; font-size: 14px; }

.tool-box { background: var(--white-color); padding: 30px; border-radius: 16px; box-shadow: var(--shadow); text-align: center; }
.tool-icon { width: 70px; height: 70px; margin-bottom: 15px; }
h1 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; }
.description { max-width: 700px; margin: 0 auto 30px; font-size: 1.1rem; color: #475569; }

/* Generator Interface */
.generator-interface { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; text-align: left; }
.generator-column h2, .converter-column h2 { margin-top: 0; margin-bottom: 20px; }
.controls { margin-bottom: 20px; display: flex; gap: 20px; }
.input-group { flex: 1; }
.input-group label { display: block; font-weight: 600; margin-bottom: 8px; }
.input-group input[type="text"] { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); box-sizing: border-box; }
.color-input-wrapper { display: flex; gap: 10px; }
.color-input-wrapper input[type="text"] { flex-grow: 1; }
.color-input-wrapper input[type="color"] { width: 40px; height: 40px; border: none; padding: 0; border-radius: 8px; cursor: pointer; }

.palette-container { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.color-swatch { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; cursor: pointer; transition: filter 0.2s ease; }
.color-swatch:hover { filter: brightness(1.1); }
.swatch-info { font-weight: 600; }
.swatch-hex { font-family: 'Courier New', monospace; opacity: 0.8; }

.code-output { position: relative; margin-top: 20px; }
.code-output pre { background-color: #1e293b; color: #e2e8f0; padding: 15px; border-radius: 8px; max-height: 300px; overflow-y: auto; white-space: pre-wrap; font-family: 'Courier New', monospace; }
#copyConfigBtn { position: absolute; top: 10px; right: 10px; background: #334155; color: white; border: 1px solid #475569; padding: 5px 10px; border-radius: 6px; cursor: pointer; }

/* Converter Column */
.converter-column { border-left: 1px solid var(--border-color); padding-left: 30px; }
.converter-result { margin-top: 20px; text-align: center; }
.closest-match-display { border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; }
.closest-match-display p { margin: 0 0 10px 0; }
.closest-swatch { width: 100%; height: 80px; border-radius: 6px; margin-bottom: 10px; }
.closest-name { font-weight: 600; font-size: 1.2rem; }

/* Global Copy Feedback */
.copy-feedback-popup { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background-color: #333; color: white; padding: 12px 25px; border-radius: 8px; z-index: 2000; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.copy-feedback-popup.show { opacity: 1; }

/* General Sections */
section { margin-top: 50px; }
footer { text-align: center; padding: 25px; background: var(--white-color); margin-top: 40px; border-top: 1px solid var(--border-color); }
#backToTop { position: fixed; bottom: 20px; right: 20px; background: var(--primary-color); color: var(--white-color); border: none; border-radius: 50%; width: 45px; height: 45px; cursor: pointer; display: none; font-size: 20px; }

@media (max-width: 900px) {
    .generator-interface { grid-template-columns: 1fr; }
    .converter-column { border-left: none; padding-left: 0; border-top: 1px solid var(--border-color); padding-top: 30px; }
}
/* style.css */

/* --- Global Styles & Variables --- */
:root {
  --primary: #0056ff;
  --secondary: linear-gradient(135deg, #00E0FF, #00FFFF); /* Bright Cyan Gradient */
  --text: #222;
}

body {
  font-family: Poppins, sans-serif;
  margin: 0;
  background: var(--secondary);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* --- Header Styles --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #0056ff, #00aaff);
  padding: 15px 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-img {
  margin-right: 12px;
  filter: brightness(1) invert(0.9) sepia(0.8) saturate(3) hue-rotate(45deg);
}

.logo-text {
  font-size: 24px;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
  font-weight: 700;
}

/* Navbar links */
#navbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

#navbar a {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 5px 0;
}

#navbar a:hover {
  color: #fffa;
  transform: scale(1.1);
}

/* Hamburger Icon */
#hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1002;
}

#hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  font-family: Poppins, sans-serif;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0056ff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  min-width: 180px;
  z-index: 999;
  border: 1px solid #004acb;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: #004acb;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* --- Mobile Responsive Menu --- */
@media screen and (max-width: 768px) {
  #hamburger {
    display: flex;
  }

  #navbar {
    position: fixed;
    top: 80px;
    right: 15px;
    width: 250px;
    background: linear-gradient(180deg, #0056ff, #00399d);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    gap: 0;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.25);
    z-index: 1001;
    border-radius: 12px;
    transform: translateX(110%);
    transition: transform 0.3s ease-in-out;
  }

  #navbar.show {
    display: flex;
    transform: translateX(0);
  }

  #navbar a, .dropdown {
    padding: 15px 25px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .dropdown-content {
    position: static;
    display: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    border-radius: 0;
    border: none;
    min-width: 100%;
  }

  .dropdown-content a {
    color: #e0f7ff;
    font-weight: normal;
    padding-left: 40px;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* --- Footer Styles --- */
footer a {
  text-decoration: none;
  color: var(--primary);
  margin-right: 15px;
}

footer a:hover {
  color: #0039c1;
}

/* Social media icon hover effect */
.footer-social a:hover {
    transform: scale(1.15);
}