/* ========================================================
   TAMILAI WORKSPACE - HIGH-END HIGH-READABILITY STYLES
   ======================================================== */

.profile-dropdown-menu {
  display: none;
  position: absolute;
  top: 55px;
  right: 15px;
  background: #09111e;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 14px;
  width: 240px;
  padding: 12px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 229, 255, 0.15);
  z-index: 100000;
  flex-direction: column;
  animation: floatingGlowSpawn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-dropdown-menu.active {
  display: flex !important;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid #00e5ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.user-meta-info h4 {
  font-size: 13px;
  color: #ffffff;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.user-meta-info span {
  font-size: 10px;
  color: rgba(0, 229, 255, 0.6);
  display: block;
  margin-top: 2px;
}
.menu-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

.profile-menu-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
}
.profile-menu-item:hover {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  transform: translateX(4px);
}

/* --------------------------------------------------------
   MASSIVE PRO-WIDE DASHBOARD CANVAS
   -------------------------------------------------------- */
.profile-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(2, 4, 8, 0.85);
  backdrop-filter: blur(4px);
  z-index: 100005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: all 0.4s ease-in-out;
}

.settings-modal-card.pro-wide-canvas {
  background: linear-gradient(135deg, #050b14, #0a1224, #060c18);
  background-size: 200% 200%;
  animation: cyberShift 12s ease infinite;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 20px;
  width: 100%;
  max-width: 840px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.95),
    0 0 40px rgba(0, 229, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dashboardIntro 0.3s ease-out;
}

.settings-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #040914;
}
.settings-modal-header h3 {
  font-size: 16px;
  color: #00e5ff;
  margin: 0;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}
.glowing-gear {
  display: inline-block;
  animation: rotateGear 5s linear infinite;
  margin-right: 4px;
}

.close-modal-x {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}
.close-modal-x:hover {
  color: #ff3366;
}

.settings-modal-body {
  display: flex;
  height: 460px;
}

/* Navigation Left Menu Column */
.settings-tabs-nav {
  width: 28%;
  background: #040914;
  border-right: 1px solid rgba(0, 229, 255, 0.15);
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 6px;
}
.tab-nav-link {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tab-nav-link:hover {
  color: #ffffff;
  background: rgba(0, 229, 255, 0.08);
}
.tab-nav-link.active {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.15), transparent);
  color: #00e5ff;
  font-weight: 600;
  border-left: 3px solid #00e5ff;
  padding-left: 11px;
}

/* Tab Viewport Content Right Area */
.settings-tabs-content {
  width: 72%;
  padding: 26px;
  overflow-y: auto;
  background: #060d1a;
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

.pane-title {
  font-size: 15px;
  color: #ffffff;
  margin: 0 0 22px 0;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  letter-spacing: 0.5px;
}

.profile-form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}
.col-6 {
  width: 50%;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.profile-form-group label {
  font-size: 11px;
  color: #00e5ff;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* FIXED TEXT INPUT FIELDS RENDERING - PURE OPAQUE CORES */
.profile-form-group input[type="text"],
.profile-form-group input[type="email"],
.profile-form-group input[type="file"],
.profile-form-group select,
.profile-form-group textarea {
  background: #02050a !important;
  border: 1px solid rgba(0, 229, 255, 0.35);
  padding: 12px 14px;
  border-radius: 8px;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
}
.profile-form-group textarea {
  resize: none;
  line-height: 1.5;
}

.profile-form-group input:focus,
.profile-form-group select:focus,
.profile-form-group textarea:focus {
  border-color: #00e5ff;
  outline: none;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Custom Image Upload Configuration Layout UI */
.bg-uploader-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.bg-uploader-container input[type="file"] {
  flex-grow: 1;
}

/* Email Verification Component Layer */
.email-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.email-input-wrapper input {
  width: 100%;
  padding-right: 100px !important;
}
.verification-badge {
  position: absolute;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}
.verification-badge.verified {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.setting-desc-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin: -2px 0 10px 0;
}

/* Legal Text System Text Display boxes */
.legal-scroll-text {
  background: #02050a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px;
  height: 310px;
  overflow-y: auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}
.legal-scroll-text strong {
  color: #00e5ff;
}
.legal-scroll-text p {
  margin-top: 0;
  margin-bottom: 14px;
}
.legal-scroll-text li {
  margin-bottom: 8px;
}

/* Core Operations Action Buttons */
.flush-db-btn {
  background: rgba(255, 51, 102, 0.1);
  color: #ff3366;
  border: 1px solid rgba(255, 51, 102, 0.3);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
  transition: all 0.2s;
}
.flush-db-btn:hover {
  background: #ff3366;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.4);
}

.settings-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #040914;
}
.profile-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.profile-btn-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.profile-btn-primary {
  background: linear-gradient(135deg, #00e5ff, #00b0ff);
  border: none;
  color: #030710;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}
.profile-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

/* ========================================================
   THEME MATRICES LIVE DRIVERS LAYERS (ref: image_4a3e29.jpg)
   ======================================================== */

/* 1. CYBER DARK THEME (DEFAULT BEST READABILITY) */
body.theme-cyber-dark {
  background-color: #030712;
  color: #f3f4f6;
}

/* 2. NEON LIGHT THEME */
body.theme-neon-light {
  background-color: #f0f4f8;
  color: #1e293b;
}
body.theme-neon-light .settings-tabs-content {
  background: #ffffff;
}
body.theme-neon-light .pane-title {
  color: #0f172a;
}

/* 3. 3D MATRIX ANIMATED GLOW THEME */
body.theme-matrix-3d {
  background: radial-gradient(circle at center, #021a0d 0%, #000402 100%);
  color: #39ff14;
  animation: matrixPulse 6s ease-in-out infinite alternate;
}
body.theme-matrix-3d .settings-modal-card.pro-wide-canvas {
  border: 1px solid #39ff14;
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.25);
}
body.theme-matrix-3d .profile-form-group label,
body.theme-matrix-3d .settings-modal-header h3 {
  color: #39ff14;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}
body.theme-matrix-3d .profile-form-group input,
body.theme-matrix-3d .profile-form-group select,
body.theme-matrix-3d .profile-form-group textarea {
  border: 1px solid rgba(57, 255, 20, 0.5);
}

/* KEYFRAMES PERFORMANCE MAPS */
@keyframes cyberShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes rotateGear {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes matrixPulse {
  0% {
    box-shadow: inset 0 0 50px rgba(0, 255, 0, 0.05);
  }
  100% {
    box-shadow: inset 0 0 100px rgba(0, 255, 0, 0.15);
  }
}

/* Responsive Mobile Rules overrides */
@media screen and (max-width: 768px) {
  .settings-modal-body {
    flex-direction: column;
    height: 380px;
  }
  .settings-tabs-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    padding: 8px;
    gap: 4px;
  }
  .nav-section-divider {
    display: none;
  }
  .tab-nav-link {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .tab-nav-link.active {
    border-left: none;
    border-bottom: 2px solid #00e5ff;
  }
  .settings-tabs-content {
    width: 100%;
    height: 100%;
    padding: 16px;
  }
  .profile-form-row {
    flex-direction: column;
    gap: 0;
  }
  .col-6 {
    width: 100%;
  }
  .legal-scroll-text {
    height: 200px;
  }
}
/* ========================================================
   AVATAR STUDIO HUB LAYOUT INFRASTRUCTURE
   ======================================================== */
.avatar-studio-row {
  display: flex;
  gap: 20px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 18px;
}
body.light-mode .avatar-studio-row {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.avatar-studio-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.studio-preview-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #050b14;
  border: 2px solid #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #00e5ff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}
body.light-mode .studio-preview-circle {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
}

.avatar-studio-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.avatar-source-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
body.light-mode .avatar-source-toggle {
  background: #e2e8f0;
}

.avatar-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
body.light-mode .avatar-toggle-btn {
  color: #475569;
}
.avatar-toggle-btn.active {
  background: #00e5ff;
  color: #030710 !important;
  font-weight: 700;
}
body.light-mode .avatar-toggle-btn.active {
  background: #0284c7;
  color: #ffffff !important;
}

.avatar-zone-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avatar-grid-matrix {
  display: flex;
  gap: 12px;
  padding: 6px 0;
}

.avatar-node-option {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #050b14;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
}
body.light-mode .avatar-node-option {
  background: #f1f5f9;
}
.avatar-node-option:hover,
.avatar-node-option.selected {
  border-color: #00e5ff;
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* --- PRE-BUILT ADVANCED ANIMATED CORE DESIGNS --- */
.mini-avatar-shell {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Avatar 1: Neon Pulse */
.pulse-core {
  background: radial-gradient(circle, #00e5ff 0%, transparent 70%);
  animation: coreGlowPulse 1.5s infinite alternate;
}
@keyframes coreGlowPulse {
  0% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Avatar 2: Orbital Wire */
.orbit-node {
  background: transparent;
  border: 2px dashed rgba(0, 229, 255, 0.4);
  border-radius: 50%;
  width: 80%;
  height: 80%;
  animation: spinOrbit 4s linear infinite;
}
.orbit-node span {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 6px;
  height: 6px;
  background: #00e5ff;
  border-radius: 50%;
}
@keyframes spinOrbit {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Avatar 3: AI Matrix Grid */
.ai-matrix {
  color: #39ff14 !important;
}
.theme-matrix-3d .studio-preview-circle {
  border-color: #39ff14;
  box-shadow: 0 0 15px #39ff14;
}
.matrix-glitch {
  font-family: monospace;
  font-weight: 900;
  color: #39ff14;
  animation: matrixTextGlitch 2s steps(4) infinite;
}
@keyframes matrixTextGlitch {
  0%,
  100% {
    opacity: 0.3;
    transform: skewX(0deg);
  }
  50% {
    opacity: 1;
    transform: skewX(10deg);
    text-shadow: 2px 0 #00e5ff;
  }
}

/* Avatar 4: Cyber Grid Scanner */
.grid-scanner {
  background: linear-gradient(rgba(0, 229, 255, 0.05) 90%, #00e5ff 100%);
  background-size: 100% 12px;
  animation: radarScan 2.5s linear infinite;
}
@keyframes radarScan {
  0% {
    background-position: 0 -50px;
  }
  100% {
    background-position: 0 50px;
  }
}

/* Make sure the main menu and headers sync animation scales nicely */
.avatar-circle .mini-avatar-shell,
#userProfileBtn .mini-avatar-shell {
  transform: scale(0.85);
}
.logout-btn {
  width: 100%;

  margin-top: 15px;

  padding: 10px;

  border: none;

  border-radius: 10px;

  cursor: pointer;

  color: white;

  background: linear-gradient(135deg, #ff4d4d, #ff1f1f);

  transition: 0.3s;
}

.logout-btn:hover {
  transform: translateY(-2px);

  box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}
/* ===================================
   SETTINGS SIZE REDUCE ONLY
=================================== */

@media (max-width: 768px) {
  .settings-modal {
    width: 90% !important;
    max-width: 280px !important;
    padding-top: 100px;
  }

  .settings-content {
    padding: 0 !important;
  }

  .settings-tab {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }

  .profile-avatar,
  .profile-image,
  .avatar-preview {
    width: 70px !important;
    height: 70px !important;
  }

  .upload-btn {
    font-size: 10px !important;
    padding: 6px 8px !important;
  }

  .settings-modal h2 {
    font-size: 14px !important;
  }

  .settings-modal h3 {
    font-size: 12px !important;
  }

  .settings-modal p,
  .settings-modal label {
    font-size: 10px !important;
  }

  .settings-modal select,
  .settings-modal input {
    font-size: 11px !important;
    height: 36px !important;
  }

  .save-btn,
  .cancel-btn {
    height: 38px !important;
    font-size: 11px !important;
  }
}
/* ===================================
   MOBILE PROFILE FIX
=================================== */

@media (max-width: 768px) {
  .avatar-studio-row {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .avatar-studio-preview {
    width: 100% !important;
    justify-content: center !important;
  }

  .studio-preview-circle {
    width: 65px !important;
    height: 65px !important;
  }

  .avatar-studio-controls {
    width: 100% !important;
  }

  .avatar-toggle-btn {
    font-size: 10px !important;
    padding: 6px !important;
  }

  .avatar-node-option {
    width: 36px !important;
    height: 36px !important;
  }

  .avatar-grid-matrix {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .profile-form-group label {
    font-size: 9px !important;
  }

  .profile-form-group input,
  .profile-form-group select,
  .profile-form-group textarea {
    font-size: 11px !important;
    padding: 8px !important;
  }

  .settings-tabs-content {
    padding: 10px !important;
  }

  .pane-title {
    font-size: 5px !important;
  }
}
@media (max-width: 768px) {
  .settings-modal-card.pro-wide-canvas {
    width: 95% !important;
    max-width: 280px !important;
    height: 78vh !important;
  }

  .settings-modal-header {
    padding: 8px 12px !important;
  }

  .settings-modal-header h3 {
    font-size: 12px !important;
  }

  .settings-modal-body {
    height: calc(78vh - 100px) !important;
  }

  .settings-tabs-content {
    padding: 8px !important;
  }

  .pane-title {
    font-size: 11px !important;
    margin-bottom: 10px !important;
  }
}
@media (max-width: 768px) {
  .settings-modal-footer {
    padding: 8px !important;
  }

  .profile-btn-primary,
  .profile-btn-secondary {
    height: 34px !important;
    font-size: 10px !important;
    padding: 0 10px !important;
  }
}
/* ===================================
   FINAL MOBILE PROFILE FIX
=================================== */
@media (max-width: 768px) {
  /* Footer buttons centered */
  .settings-modal-footer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .profile-btn-primary,
  .profile-btn-secondary {
    width: 100px !important;
    height: 34px !important;

    flex: none !important;

    font-size: 10px !important;
  }

  /* Verified badge fix */
  .email-input-wrapper {
    display: block !important;
  }

  .email-input-wrapper input {
    padding-right: 10px !important;
  }

  .verification-badge {
    position: static !important;
    display: inline-block !important;

    margin-top: 6px !important;

    font-size: 9px !important;
  }
}
.profile-status {
  font-size: 11px;
  color: #00e5ff;
  margin-top: 4px;
  font-weight: 600;
}

.profile-email {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
  word-break: break-all;
}
