:root {
  --primary-color: #3498DB; /* Professional Blue */
  --primary-dark: #2980B9;
  --secondary-color: #f4f6f8;
  --text-color: #34495e;
  --white-color: #fff;
  --border-color: #d1d8e0;
  --shadow-light: rgba(0, 0, 0, 0.06);
  --jwt-header: #fb015b;
  --jwt-payload: #d63aff;
  --jwt-signature: #00b9f1;
  --valid-color: #27ae60;
  --invalid-color: #e74c3c;
}

body {
  font-family: 'Poppins', sans-serif; margin: 0;
  background-color: var(--secondary-color); color: var(--text-color); line-height: 1.6;
}

.container { max-width: 1200px; margin: auto; padding: 20px; }

header {
  background-color: var(--white-color); box-shadow: 0 2px 8px var(--shadow-light);
  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: 22px; }
nav a { margin-left: 20px; text-decoration: none; color: var(--primary-color); font-weight: 500; }
.breadcrumb { margin: 15px 0; color: #555; font-size: 14px; }

.tool-box {
  background-color: var(--white-color); padding: 30px;
  border-radius: 12px; box-shadow: 0 4px 15px var(--shadow-light);
}
.main-header { display: flex; align-items: center; gap: 20px; text-align: left; margin-bottom: 20px; }
.tool-icon { width: 60px; height: 60px; flex-shrink: 0; }
.main-header h1 { margin: 0; }
.description { margin: 5px 0 0; color: #718096; }

/* JWT Editor */
.jwt-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 20px;
}

.panel h3 {
  margin: 0 0 15px;
  font-size: 18px;
  color: var(--primary-dark);
}

#jwt-input {
  width: 100%;
  height: 400px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.5;
}
/* JWT Color Highlighting */
#jwt-input .jwt-header { color: var(--jwt-header); }
#jwt-input .jwt-payload { color: var(--jwt-payload); }
#jwt-input .jwt-signature { color: var(--jwt-signature); }

.decoded-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.json-section {
  background-color: #282c34; /* atom-one-dark background */
  border-radius: 8px;
  overflow: hidden;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: #3c424f;
}
.section-header h4 {
  margin: 0;
  font-size: 14px;
  color: #abb2bf;
  font-weight: 500;
  text-transform: uppercase;
}
.copy-btn {
  background-color: #4a5261;
  color: #abb2bf;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}
.copy-btn:hover { background-color: #5c6370; }

pre { margin: 0; }
pre code {
  padding: 15px !important;
  font-size: 14px;
  line-height: 1.6;
}

#signature-status {
  padding: 12px 15px;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}
#signature-status.valid { background-color: #eafaf1; color: var(--valid-color); }
#signature-status.invalid { background-color: #fbeee C; color: var(--invalid-color); }

/* General Sections */
section { margin-top: 40px; }
/* 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);
}