/* Reset & Base Layout */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
}
html {
  scroll-behavior: smooth;
}
.container {
    max-width: 1200px; /*  Wider for grid layout */
    margin: auto;
    padding: 20px;
    width: 90%;
   
}

.container h1,
.container h2,
.container p {
  text-align: center;
}

.container p {
    color: #00008B;

}


/* Header & Navigation */
.site-header {
    background: #F0FFFF;
    color: #808000;
    padding: 10px 10px;
    text-align: center;
    height: 130px;
    position: relative; /* âœ… ensures absolute children are placed relative to header */
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  gap: 10px;
  flex-wrap: wrap;
}

.header-title-centered {
  flex: 0 0 auto;
  padding: 0 20px;
  margin: 0;
   /* Color changed */
  font-size: 26px;
  white-space: nowrap;
  background: white;
}

/* =======================
   Responsive Header (Mobile)
   ======================= */
@media (max-width: 768px) {
  .site-header {
    padding: 0.1rem 0.4rem;
    text-align: center;
    height: 140px;
  }

  .site-header h1 {
    font-size: 1.2rem;   /* smaller title */
    margin: 0.3rem 0;
  }

  .site-header h2 {
    font-size: 0.8rem;   /* smaller subtitle */
    margin: 0.2rem 0;
    font-weight: bold;
    color: #800080 ;
  }

.container h1 {
  font-size: 1.8rem;     /* bigger than descriptions */
  font-weight: bold;
  color: #222;         /* strong contrast */
}


.container p {
    color: #00008B;

}
  .category h2 {
    font-size: 1.2rem;
    color: #C71585;
  }
  
 .tool-description {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.6s ease;
  }
  body.descriptions-ready .tool-description {
    visibility: visible;
    opacity: 1;
  }  

}

@media (max-width: 1200px) {
  .header-flex {
    flex-direction: column;
    align-items: center;
  }

 
  .header-title-centered{
    margin-top: 8px;
    margin-bottom: 8px;
    align-items: center;
    text-align: center;
    overflow-x: none;
    font-size: 21px;

  }
}

/* =======================
   Base (Mobile First) Nav menu
   ======================= */
.site-nav {
  padding: 0.8rem 1rem;
  background: #2F4F4F;
}

.site-nav .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.nav-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.site-nav a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  border-radius: 4px;
  background: #2F4F4F;
  color: #FFD700;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.site-nav a:hover {
  background: #2F4F4F;
  color: #FFD700;
}

.auth-links {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.auth-links a,
.auth-links .btn-dashboard {
  flex: 1;
  min-width: 100px;
  text-align: center;
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: #FFD700;
  border: none;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Mobile view */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    align-self: flex-start;
  }

  .nav-links {
    display: none;   /* hide by default */
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }

  .nav-links.active {
    display: flex;   /* show when toggled */
  }
}

/* =======================
   Desktop & Larger Screens
   ======================= */
@media (min-width: 769px) {
  .site-nav {
    background: linear-gradient(135deg, #556B2F, #6B8E23);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0; /* desktop nav is tighter */
  }

  .site-nav .container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0;
  }

  .nav-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding: 12px 15px;
    margin: 0;
    width: auto;
  }

  .site-nav a {
    display: inline-block;
    width: auto;
    color: #FFD700;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
  }

  .site-nav a:hover {
    background: #FFD700;
    color: #2F4F1A;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
  }

  .site-nav a.active {
    background: #FFD700;
    color: #2F4F1A;
    font-weight: 700;
  }

  .auth-links {
    width: auto;
    margin-top: 0;
    gap: 1rem;
  }

  .auth-links a,
  .auth-links .btn-dashboard {
    flex: none;
    min-width: auto;
  }
}


/* Search UI */
.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

#searchInput {
    display: none;
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #FF8C00;
    padding: 5px 10px;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

#social-follow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.social-icon img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-icon img:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #007BFF;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease;
    opacity: 0;
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
}

/* Tool Container */
.tool-container {
    max-width: 820px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.tool-container h1 {
    font-size: 26px;
    margin-bottom: 10px;
}

.tool-container p {
    color: #555;
    margin-bottom: 20px;
}

.tool-container textarea,
.tool-container input[type="text"],
.tool-container input[type="number"],
.tool-container input[type="file"],
.tool-container select {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Button Group */
.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.btn {
    flex: 1 1 130px;
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    color: white;
    margin: 5px;
    transition: background 0.3s ease;
    display: block; /* âœ… Ensure tool-card display toggling works properly */
}

.btn select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}
    
  .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  .btn-secondary:hover {
    background-color: #5a6268;
  }

.btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  cursor: pointer;
}

.btn-primary:hover { background-color: #0056b3; }

.btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  cursor: pointer;
}


.btn-warning {
  background-color: #ffc107;
  color: #212529;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  cursor: pointer;

}
.btn-warning:hover {
  background-color: #e0a800;
}


.btn-success { background-color: #28a745; }
.btn-success:hover { background-color: #218838; }

.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }

.btn-primary:hover,
.btn-danger:hover,
.btn-secondary:hover {
  opacity: 0.9;
}

/* Output Box */
.output-box {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    margin-top: 15px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-height: 60px;
    font-size: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow-x: auto;
    text-align: left;
    box-sizing: border-box;
}

/* Thumbnail Preview */
#output-wrapper {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
    padding: 15px;
    box-sizing: border-box;
}

.output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 10px;
    justify-content: start;
    align-items: start;
    box-sizing: border-box;
}

#output {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.thumb-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ccc;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* ======== Index Page Layout ======== */
.category {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.category:nth-child(odd) {
    background: #e3f2fd;
}
.category:nth-child(even) {
    background: #ffebee;
}

.category h2 {
    margin: 0;
    padding-bottom: 10px;
    text-align: center;
    color: #C71585;
}

 
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.tool-card {
    display: block; /* âœ… Ensure visibility toggle with JS works */
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-card a {
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: block;
}

.tool-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.tool-description {
    font-size: 15px;
    color: #262626;
    margin-top: 5px;
}

/* Responsive fix for grid */
@media (max-width: 500px) {
    .grid {
        grid-template-columns: 1fr;
    }
}


#editor {
    background: #fff;
    padding: 20px;
    color: #000;
    font-family: Arial, sans-serif;
}

.blog-post h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #007BFF;
    text-align: left;
}

.post-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    text-align: left;
}

.post-content {
    text-align: left;
    line-height: 1.7;
}

.post-content h2 {
    margin-top: 25px;
    font-size: 22px;
    color: #333;
}

.post-content ul {
    list-style: disc;
    padding-left: 20px;
}

.post-content blockquote {
    border-left: 4px solid #007BFF;
    padding-left: 15px;
    font-style: italic;
    background: #f0f8ff;
    margin: 20px 0;
}

/* blog.php page  */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.blog-card {
    background: #ccffff;
    border: 1px solid #ffcc80;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.blog-card:hover {
    background: #ccffff;
    transform: translateY(-4px);
}

.blog-card a {
    font-size: 18px;
    font-weight: bold;
    color: royalblue;
    text-decoration: none;
}

.blog-icon {
    font-size: 28px;
    display: inline-block;
    margin-bottom: 8px;
}

.blog-description {
    color: #4e342e;
    font-size: 14px;
    margin: 10px 0;
}

.blog-date {
    font-size: 12px;
    color: #6d4c41;
}



.lang-select select {
  font-size: 14px;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

/* Related Blog Post */

.blog-suggestion-box {
  background: #f0f8ff;
  border-left: 5px solid #007bff;
  padding: 15px 20px;
  border-radius: 9px;
  margin-top: 30px;
}

.blog-suggestion-box h3 {
  margin-top: 0;
  color: #007bff;
}

.blog-suggestion-link {
  text-decoration: none;
  color: inherit;
}

.blog-suggestion-content {
  display: flex;
  gap: 15px;
  align-items: center;
}

.blog-icon {
  font-size: 36px;
}

.blog-snippet {
  font-size: 14px;
  color: #555;
}

/* Hamburger menu */

.category-toggle {
  position: relative;
  display: inline-block;
  }

#categoryToggle {
  font-size: 14px;
  color: #00008B;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 35px;
  left: 0;
  background-color: #556B2F;
  border: 1px solid #ccc;
  z-index: 999;
  min-width: 220px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.category-toggle:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: #FFD700;
  text-decoration: none;
  border-bottom: 2px solid #eee;
}

.dropdown-menu a:hover {
  background-color: #6B8E23;
  color: #FFD700;
}

/* Search Tooltip Popup */

.search-wrapper {
  position: relative;
  display: inline-block;
}

.search-tooltip {
  position: absolute;
  top: 120%;
  right: 0;
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 13px;
  z-index: 1000;
  text-align: center;
  width: 140px;
  display: none;
}

.search-tooltip::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 15px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #ccc transparent;
}

.search-tooltip-buttons {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.search-tooltip button {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background-color: #007bff;
  color: white;
  flex: 1;
  transition: background 0.2s ease;
}

.search-tooltip button:hover {
  background-color: #0056b3;
}

.search-tooltip button:last-child {
  background-color: #6c757d;
}

.search-tooltip button:last-child:hover {
  background-color: #5a6268;
}

@media screen and (max-width: 480px) {
  .search-tooltip {
    width: 130px;
    font-size: 12px;
    right: -10px;
  }

  .search-tooltip::before {
    right: 20px;
  }
}

.language-select {
  padding: 8px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Prevent page-wide horizontal scroll */
html, body {
    overflow-x: hidden;
    
}



/* ---------------------------
   Tool Stats Container
   (views, likes, favourites, comments)
--------------------------- */
.tool-stats {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    position: absolute;
    top: 10px;
    left: 10px;               
    max-width: calc(100% - 20px);
    align-items: center;
    z-index: 999;                 /* ensure above page content */
}

/* ---------------------------
   Each Icon Container
--------------------------- */
.tool-stats .stat-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;            /* needed for tooltip positioning */
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 4px;                 /* space between icons */
}

/* Icon hover scaling */
.tool-stats .stat-item:hover {
    transform: scale(1.1);
}

/* Icon size and color */
.tool-stats i {
    font-size: 22px;
    color: #555;
}

/* Counter under the icon */
.tool-stats .stat-count {
    font-size: 13px;
    margin-top: 3px;
    color: #333;
}

/* Tooltip text */
.stat-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%; 
    left: 50%;
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translate(-50%, -10px);
    z-index: 1000;
    max-width: 90vw;       /* prevent going outside screen */
    overflow: hidden;      /* clip extra text */
    text-overflow: ellipsis;
}

/* Tooltip arrow */
.stat-item::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #333 transparent;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Show tooltip on hover */
.stat-item:hover::after,
.stat-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -5px);
}

/* ---------------------------
   Active (liked/favourited)
--------------------------- */
.stat-item.active i {
    color: blue;
}

/* ---------------------------
   Mobile-friendly tooltip (tap)
--------------------------- */
@media (hover: none) {
    .stat-item:active::after,
    .stat-item:active::before {
        opacity: 1;
        transform: translate(-50%, -5px);
    }
}

/* JS-triggered tooltip (used on mobile or delayed clicks) */
.stat-item.show-tooltip::after,
.stat-item.show-tooltip::before {
    opacity: 1 !important;
    transform: translate(-50%, -5px) !important;
}

/* Login form */
.form-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    color: #222;
}

.error-message {
    background: #ffe5e5;
    color: #d9534f;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 1rem;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.login-form input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #4CAF50;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #43a047;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
}

.form-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* signup form */
/* Reuse same base form style */
.form-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    color: #222;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1.05rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
    outline: none;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
    color: #666;
}

#strength-meter {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 5px;
    margin: 8px 0;
}

#strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 5px;
    transition: width 0.3s;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #1e40af;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
}

.form-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
}

/* Dashboard Styles */
.dashboard-container {
  background: #fff;
  padding: 20px; /* smaller padding for mobile */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 650px;
  width: 95%;   /* let it shrink properly on small screens */
  margin: 20px auto;
  text-align: center;
  box-sizing: border-box; /* prevent padding from overflowing width */
}

.dashboard-container h1 {
  color: #333;
  margin-bottom: 20px;
}

/* Desktop & larger screens */
@media (min-width: 769px) {
  .dashboard-container {
    padding: 40px;   /* restore bigger padding */
    margin: 50px auto;
    width: 100%;
  }
}


/* Badge row */
.badge-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Role badges */
.badge-basic {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: #6c757d;
  color: #fff;
  font-size: 14px;
}
.badge-premium {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff9800, #ffc107);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}
.badge-admin {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #d32f2f, #f44336);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

/* Buttons */
.tool-btn {
  padding: 8px 16px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.3s ease;
}
.tool-btn:hover {
  background: #0056b3;
}


.welcome-text {
    color: #00ffff;
    font-weight: 500;
}




/* upgrade box  */

 .upgrade-box {
            max-width: 600px;
            margin: 80px auto;
            padding: 30px;
            background: #fff;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            text-align: center;
}
.upgrade-box h2 {
            color: #c0392b;
            margin-bottom: 15px;
}
.upgrade-box p {
            font-size: 1.1rem;
            margin-bottom: 25px;
}
.upgrade-box a.btn {
            display: inline-block;
            padding: 12px 24px;
            background: #0073e6;
            color: #fff;
            border-radius: 8px;
            text-decoration: none;
            font-weight: bold;
            transition: background 0.3s ease;
}
.upgrade-box a.btn:hover {
            background: #005bb5;
}

/* Admin Panel  */
.admin-container {
    width: 100%;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.admin-container form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

.permissions-table th {
    background: #f4f4f4;
}

/* Admin Tool Manager */
.tool-form input, .tool-form textarea {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.tool-form button {
    background: #007bff;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.tool-form button:hover {
    background: #0056b3;
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

.tool-table th {
    background: #f5f5f5;
}

/* CSS for the modal */

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-box {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 350px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.modal-box h2 {
    margin-top: 0;
    color: #d9534f;
}
.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.btn-secondary {
    background: #6c757d;
    color: white;
}
.btn-danger {
    background: #d9534f;
    color: white;
}
.btn-warning {
    background: #f0ad4e;
    color: white;
}

/* Messenger button styling */
.messenger-btn {
  position: absolute;
  top: 70%;
  right: 70px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0084ff;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.25s ease, background 0.3s ease;
  z-index: 10;
}

/* Hover/focus grow */
.messenger-btn:hover,
.messenger-btn:focus {
  background: #006fd6;
  transform: translateY(-50%) scale(1.2);
}

/* Tooltip (default: left side for desktop) */
.messenger-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 110%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.messenger-btn::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent rgba(0,0,0,0.85) transparent transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Show tooltip on hover (desktop) */
.messenger-btn:hover::after,
.messenger-btn:hover::before {
  opacity: 1;
}

/* Mobile view adjustments */
@media (max-width: 768px) {
   .messenger-btn {
      top: 80%;
      right: 15px;
      width: 35px;
      height: 35px; 

   }

  .messenger-btn::after {
    top: 110%;       /* place below button */
    left: 50%;
    right: auto;
    transform: translateX(-90%);
  }

  .messenger-btn::before {
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0,0,0,0.85) transparent transparent transparent;
  }
}
/* Back button */
.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 10px;
}

.btn-back:hover {
    background-color: #45a049;
}

/* Tool next/previous button */
.tool-navigation {
    display: flex;
    justify-content: center;   /* keeps buttons close on desktop */
    gap: 30px;                 /* distance between buttons */
    margin: 30px 0;
    max-width: inherit;
    
}

/* Mobile behavior stays same */
@media (max-width: 600px) {
    .tool-navigation {
        justify-content: space-between;
        gap: 0;
    }
}

.nav-button {
    background: #0073e6;
    color: #fff;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.nav-button:hover {
    background: #005bb5;
}

/* Tool category at the top of page */
.tool-category {
  font-size: 0.95rem;
  color: #444;
  
}

.tool-updated {
    font-size: 0.90rem;
}

/* Breadcrumb */
.breadcrumb {
  margin: 10px 0;
  font-size: 0.95rem;
  color: #555;
}

.breadcrumb a {
  text-decoration: none;
  color: #0073e6;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #333;
  font-weight: 500;
}

/* Icons */
.icon {
  width: 18px;
  height: 18px;
  fill: currentColor; /* inherits text color */
  vertical-align: middle;
  cursor: pointer;
}
.icon.heart { fill: red; }
.icon.eye   { fill: #444; }
.icon.lock  { fill: #666; }
.icon.thumbs { fill: green; }



/* Clock */
.datetime-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  padding: 10px 20px;
  margin: 15px auto;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  text-align: center;
  transition: transform 0.2s ease;
}

.datetime-box:hover {
  transform: scale(1.01);
}

.clock-icon {
  font-size: 1.2rem;
}

@media (max-width: 600px) {
  .datetime-box {
    font-size: 0.9rem;
    padding: 8px 15px;
  }
  .clock-icon {
    font-size: 1rem;
  }
}

/* FAQ Section Styling */
.faq-section {
  background: #f9f9fc;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 25px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.faq-section:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.faq-section h3 {
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2a2a2a;
  margin-top: 20px;
  margin-bottom: 8px;
  cursor: pointer;
  padding-left: 30px;
}

.faq-section h3::before {
  content: "❓";
  position: absolute;
  left: 0;
  top: 0;
  color: #0066ff;
  font-size: 1.1rem;
}

.faq-section p {
  font-size: 0.96rem;
  color: #444;
  margin-bottom: 12px;
  line-height: 1.6;
  text-align:left;
  padding-left: 15px;
}

/* Optional collapsible effect (toggle answer visibility) */
.faq-section h3.active + p {
  display: block;
}

.faq-section p {
  display: none;
}

.faq-section h3.active::before {
  content: "💬";
  color: #28a745;
}

/* ===== Grade Table (Collapsible) for Marks percentage calculator ===== */
.grade-table-container {
    margin-top: 25px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease-in-out;
}

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

.grade-header h3 {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.collapse-btn {
    background-color: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.collapse-btn:hover {
    background-color: #155fc0;
}

.grade-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.95em;
}

.grade-table th,
.grade-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: center;
}

.grade-table th {
    background-color: #f5f7fa;
    color: #333;
    font-weight: 600;
}

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

.grade-table tr:hover {
    background-color: #eef5ff;
}

/* Grade colors */
.grade-a-plus { color: #1a73e8; font-weight: 600; }
.grade-a { color: #2e8b57; font-weight: 600; }
.grade-b-plus { color: #4caf50; font-weight: 600; }
.grade-b { color: #8bc34a; font-weight: 600; }
.grade-c { color: #ffc107; font-weight: 600; }
.grade-d { color: #ff9800; font-weight: 600; }
.grade-f { color: #e53935; font-weight: 600; }

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Marks percentage calculator */

.student-info {
    margin-bottom: 15px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
    border-radius: 8px;
    overflow: hidden;
}

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

.result-table th {
    background-color: #f4f6f9;
    font-weight: 600;
    color: #333;
}

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

.result-table tr:hover {
    background-color: #eef5ff;
}
/* ====== Online visitor counter ======= */ 
.footer-online {
    font-size: 14px;
    line-height: 1.6;
}

.country-section {
    margin-top: 10px;
    text-align:left;
    margin-left: 20px;
    color: #FFA500;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.country-item img {
    width: 20px;
    height: auto;
}

.last-updated {
    font-size: 12px;
    color: #9ACD32;
    margin-top: 2px;
}

.yesterday-count {
    margin-top: 4px;
    font-size: 13px;
    color: #B0C4DE;
}

.dob-group {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 10px;
}

@media (max-width: 480px) {
    .dob-group {
        grid-template-columns: 1fr;
    }
}

/* ====== Tool rating ======= */ 

.rate-label {
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
    
}



.rating-summary {
    font-size: 13px;
    margin-top: 5px;
    color: #555;
    
}

.rating-breakdown {
    font-size: 12px;
    margin-top: 6px;
    color: #666;
    
}


/* Toast popup */
.rating-toast {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.rating-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================
   Tool Rating Card Layout
========================= */

.tool-rating {
    display: inline-block;            /* Prevent full-width stretch */
    text-align: left;      /* Override parent centering */
    padding: 15px 30px 15px 20px;
    border: 1px solid #FFFF00;
    border-radius: 10px;
    background: #F0FFF0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin: 8px 0 5px 0;
    max-width: 600px;
}

/* Force left placement even if container is centered */
.tool-container .tool-rating {
    margin-left: 0;
    margin-right: 600px;
    margin-bottom: 14px;
}

/* =========================
   Label
========================= */

.rate-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
}

/* =========================
   Stars
========================= */

.stars {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.star {
    font-size: 24px;
    color: #ffcc99;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
}

.star:hover {
    transform: scale(1.15);
}

.star.hover,
.star.active,
.star.rated {
    color: #f4b400; /* gold */
}

/* =========================
   Summary
========================= */

.rating-summary {
    font-size: 13px;
    margin-top: 4px;
    color: #555;
}

/* =========================
   Breakdown
========================= */

.rating-breakdown {
    font-size: 12px;
    margin-top: 8px;
    color: #666;
    line-height: 1.45;
}

.rating-breakdown div {
    display: flex;
    justify-content: space-between;
}

/* =========================
   Mobile Friendly
========================= */

@media (max-width: 600px) {
    .tool-rating {
        max-width: 100%;
        padding: 15px 30px 15px 20px;
    }
}
/* Dynamic Pill tabs inside all tool page (video,comments etc.) */
/* Modern Pill Tabs */
.tool-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.tab-button {
  padding: 10px 20px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 14px;
}

.tab-button:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}

.tab-button.active {
  background: linear-gradient(135deg, #007bff, #0056d2);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(0,123,255,0.35);
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modern Responsive Video */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9; /* Modern method */
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 600px) {
  .tool-tabs {
    gap: 8px;
  }

  .tab-button {
    padding: 8px 14px;
    font-size: 13px;
  }
}

.faq-item {
  margin-bottom: 15px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 10px;
}

.faq-item h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

/* FAQ Accordion */

.faq-controls {
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
}

.faq-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 13px;
  transition: 0.2s ease;
}

.faq-btn:hover {
  background: #e9f1ff;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: #fafafa;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: #f0f4ff;
}

.faq-answer {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  padding: 0 16px;
  font-size: 15px;
  line-height: 1.6;
}

.faq-answer-inner {
  padding: 5px 0 5px;
  text-align: left;
}

.faq-icon {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Header flex (rating + share) */
.tool-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Share container */
.share-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

/* Buttons */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  transition: all 0.2s ease;
}

/* Colors */
.share-btn.fb { background: #1877f2; }
.share-btn.x { background: #000; }
.share-btn.ln { background: #0a66c2; }
.share-btn.wa { background: #25d366; }
.share-btn.copy { background: #f2f2ff; }

/* Hover */
.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* Mobile */
@media (max-width: 600px) {
  .tool-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ====== End ======= */ 





