* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f4ff 100%);
  color: #333;
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

body.dark-mode {
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
  color: #fff;
}

/* ============== NAVBAR - GLASSMORPHISM STYLE ============== */
.navbar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.dark-mode .navbar {
  background: rgba(20, 20, 40, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Logo/Brand - FAR LEFT */
.nav-brand {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.nav-brand:hover {
  transform: scale(1.05);
}

/* RIGHT SECTION - Wraps Tools/Learn/Profile + Admin/Logout/Dark Mode */
.nav-right-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;          /* IMPORTANT: no wrapping */
  justify-content: flex-end; /* keep everything on right */
  flex-shrink: 0;
}

/* Tools, Learn, Profile buttons */
.nav-sections {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;      /* IMPORTANT */
}

.nav-section-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(52, 152, 219, 0.15);
  border: 1px solid rgba(52, 152, 219, 0.3);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #3498db;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .nav-section-btn {
  background: rgba(93, 173, 226, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
  color: #5dade2;
}

.nav-section-btn:hover {
  background: rgba(52, 152, 219, 0.25);
  color: #2980b9;
  border-color: rgba(52, 152, 219, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(52, 152, 219, 0.2);
}

body.dark-mode .nav-section-btn:hover {
  background: rgba(93, 173, 226, 0.2);
  color: #5dade2;
  border-color: rgba(93, 173, 226, 0.4);
}

.nav-section-btn i {
  font-size: 1rem;
}

/* Right Side - Admin, User, Logout, Dark Mode */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;      /* IMPORTANT */
  flex-shrink: 0;
  justify-content: flex-end;
}

.user-greeting {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-btn {
  background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
  color: white;
  border: none;
  padding: 0.6rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.admin-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
}

.logout-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  border: none;
  padding: 0.6rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3);
}

.logout-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(231, 76, 60, 0.4);
}

/* Dark Mode Toggle */
.dark-mode-toggle-nav {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(52, 152, 219, 0.3);
  border-radius: 50px;
  padding: 0.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .dark-mode-toggle-nav {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
}

.dark-mode-toggle-nav input {
  display: none;
}

.toggle-label-nav {
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 48px;
  height: 24px;
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  border-radius: 50px;
  position: relative;
  transition: all 0.3s ease;
  padding: 2px;
}

.toggle-label-nav i {
  color: white;
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-label-nav i:first-child {
  opacity: 1;
  transform: translateX(0);
}

.toggle-label-nav i:last-child {
  opacity: 0;
  transform: translateX(24px);
}

body.dark-mode .toggle-label-nav i:first-child {
  opacity: 0;
  transform: translateX(-24px);
}

body.dark-mode .toggle-label-nav i:last-child {
  opacity: 1;
  transform: translateX(0);
}

#darkModeToggle:checked + .toggle-label-nav {
  background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
}

/* ============== MODALS ============== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .modal-content {
  background: rgba(20, 20, 40, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(52, 152, 219, 0.2);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
  border-radius: 16px 16px 0 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark-mode .modal-header {
  border-bottom-color: rgba(93, 173, 226, 0.2);
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.1), rgba(46, 204, 113, 0.1));
}

.modal-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.75rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
  transition: all 0.3s ease;
}

.modal-close:hover {
  transform: rotate(90deg);
  color: #333;
}

body.dark-mode .modal-close:hover {
  color: #e0e0e0;
}

/* ============== PROFILE MODAL ============== */
.profile-modal-content {
  padding: 0;
}

.profile-tabs {
  display: flex;
  gap: 0;
  padding: 0 2rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.2);
  background: rgba(52, 152, 219, 0.03);
}

body.dark-mode .profile-tabs {
  border-bottom-color: rgba(93, 173, 226, 0.2);
}

.profile-tab-btn {
  background: transparent;
  border: none;
  padding: 1.25rem 1.75rem;
  color: #999;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  border-bottom: 2px solid transparent;
}

body.dark-mode .profile-tab-btn {
  color: #aaa;
}

.profile-tab-btn:hover {
  color: #3498db;
}

body.dark-mode .profile-tab-btn:hover {
  color: #5dade2;
}

.profile-tab-btn.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

body.dark-mode .profile-tab-btn.active {
  color: #5dade2;
  border-bottom-color: #5dade2;
}

.profile-tab-content {
  display: none;
  padding: 2.5rem;
  min-height: 300px;
}

.profile-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.login-prompt-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.login-prompt {
  text-align: center;
  padding: 3rem 2rem;
}

.login-prompt i {
  font-size: 3rem;
  color: #ddd;
  margin-bottom: 1rem;
  display: block;
}

.login-prompt p {
  color: #999;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

body.dark-mode .login-prompt p {
  color: #aaa;
}

#googleAuthDivProfile,
#googleAuthDivHistory,
#googleAuthDivHistoryTab {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.2);
}

body.dark-mode .profile-header {
  border-bottom-color: rgba(93, 173, 226, 0.2);
}

.profile-avatar img {
  border-radius: 50%;
  border: 4px solid #3498db;
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.4);
  width: 100px;
  height: 100px;
}

.profile-info-section h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-info-section p {
  margin: 0.25rem 0;
  color: #999;
  font-size: 0.95rem;
}

body.dark-mode .profile-info-section p {
  color: #aaa;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-item {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
  padding: 1.75rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(52, 152, 219, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .stat-item {
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.1), rgba(46, 204, 113, 0.1));
  border-color: rgba(93, 173, 226, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #999;
  font-weight: 600;
}

body.dark-mode .stat-label {
  color: #aaa;
}

.history-item {
  background: rgba(52, 152, 219, 0.05);
  border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .history-item {
  background: rgba(93, 173, 226, 0.05);
  border-color: rgba(93, 173, 226, 0.2);
}

.history-item:hover {
  box-shadow: 0 8px 16px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.history-type {
  font-weight: 600;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.history-date {
  font-size: 0.85rem;
  color: #999;
}

body.dark-mode .history-date {
  color: #aaa;
}

.history-detail {
  color: #666;
  word-break: break-all;
  font-size: 0.95rem;
}

body.dark-mode .history-detail {
  color: #aaa;
}

/* ============== ADMIN DASHBOARD ============== */
.admin-dashboard {
  padding: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

body.dark-mode .admin-stats {
  border-bottom-color: rgba(93, 173, 226, 0.2);
}

.stat-card {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(52, 152, 219, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .stat-card {
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.1), rgba(46, 204, 113, 0.1));
  border-color: rgba(93, 173, 226, 0.2);
}

.stat-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 50px;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-section {
  padding: 2rem;
  border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

body.dark-mode .admin-section {
  border-bottom-color: rgba(93, 173, 226, 0.2);
}

.admin-section:last-child {
  border-bottom: none;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.admin-section h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.refresh-btn {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(46, 204, 113, 0.15));
  border: 1px solid rgba(52, 152, 219, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  color: #3498db;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .refresh-btn {
  color: #5dade2;
  border-color: rgba(93, 173, 226, 0.2);
}

.refresh-btn:hover {
  transform: rotate(180deg);
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.25), rgba(46, 204, 113, 0.25));
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.admin-user-row {
  background: rgba(52, 152, 219, 0.05);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .admin-user-row {
  background: rgba(93, 173, 226, 0.05);
  border-color: rgba(93, 173, 226, 0.2);
}

.admin-user-row:hover {
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.user-name {
  font-weight: 600;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-email {
  color: #999;
  font-size: 0.9rem;
  margin: 0;
}

body.dark-mode .user-email {
  color: #aaa;
}

.user-time {
  color: #bbb;
  font-size: 0.85rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.dark-mode .user-time {
  color: #888;
}

.export-btn {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.3);
}

.export-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.4);
}

/* ============== PAGES ============== */
.page {
  display: none;
  animation: pageIn 0.4s ease;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============== HERO SECTION ============== */
.hero-section {
  background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
  padding: 8rem 2rem;
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(40px);
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  filter: blur(40px);
}

body.dark-mode .hero-section {
  background: linear-gradient(135deg, #2980b9 0%, #27ae60 100%);
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2rem;
}

.cta-button {
  background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
  color: #3498db;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ============== INFO SECTIONS ============== */
.info-sections {
  padding: 4rem 2rem;
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 40px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark-mode .wrapper {
  background: rgba(20, 20, 40, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  transition: all 0.3s ease;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .info-card {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
}

.info-card:hover {
  box-shadow: 0 12px 32px rgba(52, 152, 219, 0.2);
  transform: translateY(-6px);
  border-color: rgba(52, 152, 219, 0.4);
}

.icon-box {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
}

.info-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.info-card p {
  color: #666;
  line-height: 1.6;
}

body.dark-mode .info-card p {
  color: #aaa;
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.method-card {
  background: rgba(255, 255, 255, 0.4);
  padding: 1.75rem;
  border-radius: 16px;
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .method-card {
  background: rgba(52, 152, 219, 0.08);
  border-left-color: #5dade2;
}

.method-card:hover {
  box-shadow: 0 12px 32px rgba(52, 152, 219, 0.2);
  transform: translateY(-6px);
  border-left-color: #2ecc71;
}

.method-icon {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.method-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.method-card p {
  color: #666;
}

body.dark-mode .method-card p {
  color: #aaa;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.comparison-card {
  background: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  border-radius: 16px;
  border-left: 4px solid #3498db;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .comparison-card {
  background: rgba(52, 152, 219, 0.1);
  border-left-color: #5dade2;
}

.comparison-card:hover {
  box-shadow: 0 12px 32px rgba(52, 152, 219, 0.2);
  transform: translateY(-6px);
}

.comparison-card.steganography {
  border-left-color: #3498db;
}

.comparison-card.encryption {
  border-left-color: #2ecc71;
}

.comparison-card h3 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.comparison-list {
  list-style: none;
  padding: 0;
}

.comparison-list li {
  padding: 0.75rem 0;
  color: #666;
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

body.dark-mode .comparison-list li {
  color: #aaa;
  border-bottom-color: rgba(93, 173, 226, 0.1);
}

.comparison-list li:last-child {
  border-bottom: none;
}

.comparison-list strong {
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.tech-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.tech-card {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(46, 204, 113, 0.15));
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 152, 219, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .tech-card {
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.15), rgba(46, 204, 113, 0.15));
  border-color: rgba(93, 173, 226, 0.2);
}

.tech-card:hover {
  box-shadow: 0 12px 32px rgba(52, 152, 219, 0.2);
  transform: translateY(-6px);
  border-color: rgba(52, 152, 219, 0.5);
}

.tech-card h3 {
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.tech-card p {
  color: #0c4a6e;
  margin-bottom: 0.75rem;
}

body.dark-mode .tech-card p {
  color: #a5d8e8;
}

.tech-info {
  background: rgba(255, 255, 255, 0.5);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 1rem;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.usecase-card {
  background: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .usecase-card {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
}

.usecase-card:hover {
  box-shadow: 0 12px 32px rgba(52, 152, 219, 0.2);
  transform: translateY(-6px);
  border-color: rgba(52, 152, 219, 0.4);
}

.usecase-card i {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: block;
}

.usecase-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.usecase-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

body.dark-mode .usecase-card p {
  color: #aaa;
}

/* ============== TOOLS PAGE ============== */
.tools-wrapper {
  padding: 3rem 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f4ff 100%);
  margin-top: 0;
}

body.dark-mode .tools-wrapper {
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
}

.tools-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.tools-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.tools-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.tools-header p {
  color: #666;
  font-size: 1.1rem;
}

body.dark-mode .tools-header p {
  color: #aaa;
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.6);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .tabs {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
}

.tab-btn {
  background: rgba(255, 255, 255, 0.4);
  color: #666;
  border: 1px solid rgba(52, 152, 219, 0.2);
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .tab-btn {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
  color: #aaa;
}

.tab-btn:hover {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border-color: #3498db;
  transform: translateY(-2px);
}

body.dark-mode .tab-btn:hover {
  background: rgba(93, 173, 226, 0.2);
  color: #5dade2;
  border-color: #5dade2;
}

.tab-btn.active {
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(52, 152, 219, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tab-content h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.tool-card {
  background: rgba(255, 255, 255, 0.7);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark-mode .tool-card {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
}

.tool-card:hover {
  box-shadow: 0 16px 48px rgba(52, 152, 219, 0.2);
  transform: translateY(-6px);
  border-color: rgba(52, 152, 219, 0.4);
}

.tool-card h4 {
  font-size: 1.2rem;
  margin-bottom: 1.75rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}
/* ============== DECODED IMAGE FULL DISPLAY FIX ============== */

#decodedImageInImage {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

#decodedImageInImageContainer {
  max-height: none;
  overflow: visible;
}

/* Ensure tool card never clips dynamic content */
.tool-card {
  overflow: visible;
}


.custom-file {
  display: block;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(46, 204, 113, 0.15));
  color: #3498db;
  padding: 2rem;
  border-radius: 12px;
  cursor: pointer;
  border: 2px dashed rgba(52, 152, 219, 0.4);
  text-align: center;
  transition: all 0.3s ease;
  margin-bottom: 1.25rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .custom-file {
  background: linear-gradient(135deg, rgba(93, 173, 226, 0.1), rgba(46, 204, 113, 0.1));
  color: #5dade2;
  border-color: rgba(93, 173, 226, 0.3);
}

.custom-file:hover {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.25), rgba(46, 204, 113, 0.25));
  border-color: rgba(52, 152, 219, 0.6);
  transform: translateY(-2px);
}

.custom-file input {
  display: none;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 0.875rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(52, 152, 219, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: #333;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.dark-mode input[type="text"],
body.dark-mode textarea {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(93, 173, 226, 0.2);
  color: #e0e0e0;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #3498db;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

body.dark-mode input[type="text"]:focus,
body.dark-mode textarea:focus {
  background: rgba(52, 152, 219, 0.2);
  box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.2);
}

.tool-btn {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
  border: none;
  padding: 0.9rem 1.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.3);
  font-size: 0.95rem;
}

.tool-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.4);
}

.copy-btn {
  margin-top: 1rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ============== ENCRYPTED/DECRYPTED TEXT OUTPUT FIX ============== */
#encryptedTextResult,
#decryptedTextResult {
  background: rgba(52, 152, 219, 0.1) !important;
  padding: 15px !important;
  border-radius: 8px !important;
  word-break: break-all !important;
  margin-top: 10px !important;
  color: #2c3e50 !important;
  font-family: 'Courier New', monospace !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  border: 1px solid rgba(52, 152, 219, 0.3) !important;
  min-height: 60px !important;
}

body.dark-mode #encryptedTextResult,
body.dark-mode #decryptedTextResult {
  color: #ecf0f1 !important;
  background: rgba(52, 152, 219, 0.15) !important;
  border: 1px solid rgba(52, 152, 219, 0.4) !important;
}

#encryptedTextResult strong,
#decryptedTextResult strong {
  color: #3498db !important;
  font-weight: 600 !important;
  display: block !important;
  margin-bottom: 8px !important;
}

body.dark-mode #encryptedTextResult strong,
body.dark-mode #decryptedTextResult strong {
  color: #5dade2 !important;
}

#encryptedResultContainer,
#decryptedResultContainer {
  margin-top: 20px;
  animation: fadeIn 0.3s ease;
}

/* ============== FOOTER ============== */
footer {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(52, 152, 219, 0.2);
  padding: 2rem;
  text-align: center;
  color: #999;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.dark-mode footer {
  background: rgba(20, 20, 40, 0.6);
  border-top-color: rgba(93, 173, 226, 0.2);
  color: #aaa;
}

footer i {
  color: #e74c3c;
}

/* ============== RESPONSIVE ============== */
/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .nav-right-section {
    gap: 1rem;
  }

  .nav-sections {
    gap: 0.5rem;
  }

  .nav-section-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* ================= FIXED BLOCK (THIS WAS MISSING) ================= */
@media (max-width: 768px) {

  .hero-title {
    font-size: 2rem;
  }

  .cards-grid,
  .methods-grid,
  .tool-grid,
  .comparison-grid,
  .tech-details,
  .usecases-grid {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    gap: 1.5rem;
  }

  .tabs {
    flex-direction: column;
  }

  .tab-btn {
    justify-content: flex-start;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }
}  /* ✅ THIS CLOSING BRACE WAS MISSING */

/* ================= MOBILE (480px) ================= */
@media (max-width: 480px) {

  .hero-section {
    padding: 3rem 1rem;
    margin-top: 0;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .info-sections,
  .tools-wrapper {
    padding: 2rem 1rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .user-greeting {
    font-size: 0.8rem;
    max-width: 100px;
  }

  /* ================= NAVBAR MOBILE FIX ================= */

  .nav-container {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
  }

  .nav-brand {
    font-size: 0.95rem;
    flex-shrink: 0;
  }

  .nav-right-section {
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: nowrap;
  }

  .nav-sections {
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: nowrap;
  }

  .nav-section-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  .nav-section-btn i {
    font-size: 0.85rem;
  }

  .nav-right {
    gap: 0.4rem;
    flex-wrap: nowrap;
  }

  .dark-mode-toggle-nav {
    transform: scale(0.85);
  }
}

/* ============== RIGHT ALIGNED NAVBAR (PHISHGUARD STYLE) ============== */
@media (max-width: 768px) {

  .nav-container {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-brand {
    font-size: 1rem;
    flex-shrink: 0;
  }

  .nav-right-section {
    justify-content: flex-end;
    gap: 0.6rem;
  }

  .nav-sections {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .nav-section-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .nav-right {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .dark-mode-toggle-nav {
    transform: scale(0.9);
  }
}
