:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-japanese-mtg: 'Zen Dots', 'Plus Jakarta Sans', sans-serif;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-muted: rgba(255, 255, 255, 0.5);

  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  --card-hover-bg: rgba(255, 255, 255, 0.16);
  --card-hover-border: rgba(255, 255, 255, 0.35);

  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
}

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

body {
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  color: var(--text-primary);
  background-color: #0d1117;
  padding: 5.5rem 1rem 6rem 1rem; /* Extra top & bottom padding for top and floating navbars */
}

/* Top Floating Glassmorphism Navigation Bar */
.top-navbar {
  position: fixed;
  top: max(0.8rem, env(safe-area-inset-top, 0.8rem));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 2rem);
  max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0.65rem 1.25rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-navbar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.top-navbar-logo {
  font-family: var(--font-japanese-mtg);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-primary);
  text-transform: uppercase;
  text-shadow: 0 0 12px var(--accent-glow), 0 0 24px rgba(255, 255, 255, 0.3);
  user-select: none;
  line-height: 1;
  display: inline-block;
  text-align: center;
}

/* Background Blur Layer */
.bg-blur-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(75%);
  transform: scale(1.1); /* Prevent blurred edges vignette cutoff */
  z-index: -2;
  transition: background-image 0.5s ease-in-out;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.85) 100%);
  z-index: -1;
}

/* Main Container & Glass Card */
.container {
  width: 100%;
  max-width: 480px;
  z-index: 1;
}

.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 2.5rem 1.8rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Language Switcher */
.lang-switcher {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
}

.lang-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.lang-divider {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
}

/* Profile Header */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.avatar-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.05));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.flag-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  position: relative;
}

.profile-name {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #d1d5db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Verified Badge & Tooltip */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  color: #1d9bf0;
  font-size: 1.25rem;
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.verified-badge:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(29, 155, 240, 0.6));
}

.verified-icon {
  color: #1d9bf0;
  background: #ffffff;
  border-radius: 50%;
  -webkit-text-fill-color: initial;
}

/* Tooltip Styling */
.verified-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 100;
}

.verified-badge::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.95) transparent transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.verified-badge:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.verified-badge:hover::before {
  opacity: 1;
  visibility: visible;
}

.profile-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 0.75rem;
  letter-spacing: 0.2px;
}

.profile-bio {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 90%;
}

/* Links Section */
.links-section {
  width: 100%;
}

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

/* Link Card Button */
.link-btn {
  display: flex;
  align-items: center;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.link-btn:hover {
  background: var(--card-hover-bg);
  border-color: var(--card-hover-border);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.link-btn.highlight {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(147, 51, 234, 0.25));
  border: 1px solid rgba(147, 51, 234, 0.4);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.link-btn.highlight:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(147, 51, 234, 0.4));
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
}

.link-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-right: 1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.link-btn:hover .link-icon-container {
  transform: scale(1.1) rotate(-4deg);
}

.link-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.link-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.link-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.link-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.link-btn:hover .link-arrow {
  transform: translateX(4px);
  color: var(--text-primary);
}

/* Page Header (Report Page) */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 1.8rem;
  width: 100%;
}

.header-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(245, 158, 11, 0.25));
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #ffffff 0%, #d1d5db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 90%;
  line-height: 1.4;
}

/* Complaint Form Styles */
.complaint-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label .required {
  color: #f87171;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s ease;
}

.form-select {
  padding-left: 1rem;
  padding-right: 2rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.form-select option {
  background-color: #161b22;
  color: #ffffff;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper::after {
  content: '\f0d7';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

.phone-input-group {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.6rem;
  width: 100%;
}

@media (max-width: 400px) {
  .phone-input-group {
    grid-template-columns: 1fr;
  }
}

.textarea-wrapper {
  align-items: flex-start;
}

.form-textarea {
  padding-left: 1rem;
  resize: vertical;
  min-height: 100px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--accent-color);
}

.form-input.invalid,
.form-select.invalid,
.form-textarea.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.error-msg {
  font-size: 0.75rem;
  color: #f87171;
  min-height: 1rem;
  margin-left: 0.2rem;
}

.char-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: -0.2rem;
}

/* Notice Box */
.notice-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
  padding: 1rem;
  margin-top: 0.4rem;
}

.notice-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 0.4rem;
}

.notice-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.8);
}

/* Custom Checkbox */
.checkbox-group {
  margin-top: 0.4rem;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 2px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.15);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.privacy-notice {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.privacy-notice i {
  color: var(--accent-color);
  margin-top: 2px;
}

/* Submit Button */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.95rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hidden {
  display: none !important;
}

/* Form Alert Toast / Notice */
.form-alert {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.2rem;
  animation: fadeIn 0.4s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.form-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.form-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Floating iOS Glassmorphism Navigation Bar */
.ios-navbar {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 2rem);
  max-width: 360px;
  background: rgba(20, 26, 38, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.4rem 1.2rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.25s ease;
  flex: 1;
  max-width: 140px;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-icon {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}

.nav-item.active .nav-icon {
  transform: translateY(-1px) scale(1.1);
  color: var(--accent-color);
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Footer */
.profile-footer {
  margin-top: 2rem;
  text-align: center;
}

.profile-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive tweaks */
@media (max-width: 480px) {
  body {
    padding: 5rem 0.75rem 6.5rem 0.75rem;
  }

  .top-navbar {
    width: calc(100% - 1.5rem);
    padding: 0.55rem 1rem;
  }

  .top-navbar-logo {
    font-size: 1.1rem;
    letter-spacing: 2.5px;
  }

  .glass-card {
    padding: 2rem 1.1rem;
    border-radius: 24px;
  }

  .avatar-img {
    width: 95px;
    height: 95px;
  }

  .profile-name {
    font-size: 1.5rem;
  }

  .ios-navbar {
    width: calc(100% - 1.5rem);
  }
}
