/* Reset & Variables */
:root {
  --bg-color: #030308;
  --text-color: #f1f1f6;
  --text-muted: #8b8ba3;
  --primary-color: #7d5fff;
  --primary-hover: #9b82ff;
  --accent-color: #ff4d94;
  --accent-hover: #ff70a9;
  --success-color: #00ebae;
  --card-bg: rgba(10, 10, 22, 0.45);
  --card-border: rgba(255, 255, 255, 0.07);
  --glass-blur: blur(25px);
  --font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --neon-glow: 0 0 20px rgba(125, 95, 255, 0.3);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Floating Balloons Background */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.balloon {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  animation: float 25s infinite ease-in-out;
}

.balloon-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 80%);
  top: 10%;
  left: -5%;
  animation-duration: 25s;
}

.balloon-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 80%);
  bottom: 5%;
  right: -10%;
  animation-duration: 32s;
  animation-delay: -5s;
}

.balloon-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #32ff7e 0%, transparent 80%);
  bottom: -10%;
  left: 15%;
  animation-duration: 28s;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-60px) scale(1.15) rotate(15deg);
  }
}

/* Layout Header */
header {
  backdrop-filter: var(--glass-blur);
  background-color: rgba(3, 3, 8, 0.6);
  border-bottom: 1px solid var(--card-border);
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: -0.03em;
}

.logo-icon {
  font-size: 2.2rem;
  animation: pulse-balloon 3s infinite ease-in-out;
  display: inline-block;
}

@keyframes pulse-balloon {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-6px) rotate(4deg) scale(1.05);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn.secondary {
  color: var(--text-color);
}

.nav-btn.secondary:hover,
a.nav-btn.secondary:hover {
  color: var(--text-color) !important;
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.nav-btn.primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #a29bfe 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(125, 95, 255, 0.2);
}

.nav-btn.primary:hover,
a.nav-btn.primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #b2abff 100%);
  box-shadow: 0 6px 20px rgba(125, 95, 255, 0.35);
  color: white !important;
  transform: translateY(-1px);
}

/* Burger Menu Button (Hidden on Desktop) */
.burger-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.75rem;
  height: 1.15rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.burger-menu-btn span {
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transform to Close Cross icon */
.burger-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main Container */
main {
  flex: 1;
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: rgba(8, 8, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.1rem 1.75rem;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 500;
  animation: slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-in {
  from {
    transform: translateY(60px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Card Style (Glassmorphism) */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 3rem;
  backdrop-filter: var(--glass-blur);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.card-title {
  font-size: 1.95rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

/* Forms and Inputs */
.form-group {
  margin-bottom: 1.75rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 1.02rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.form-input::placeholder {
  color: #5d5d75;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-hover);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 4px rgba(125, 95, 255, 0.15),
              inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

textarea.form-input {
  min-height: 140px;
  resize: vertical;
}

/* Checkbox Toggle styled as Toggle Switch */
.checkbox-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 500;
  user-select: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.checkbox-label span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-input-wrapper {
  position: relative;
  width: 3.25rem;
  height: 1.75rem;
}

.checkbox-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
  border: 1px solid var(--card-border);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 1.25rem;
  width: 1.25rem;
  left: 0.15rem;
  bottom: 0.1rem;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.checkbox-input:checked + .toggle-slider {
  background-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(125, 95, 255, 0.3);
}

.checkbox-input:checked + .toggle-slider:before {
  transform: translateX(1.4rem);
}

/* File Upload Field */
.file-upload-container {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.005);
  transition: all 0.25s ease;
}

.file-upload-container:hover {
  border-color: var(--primary-color);
  background-color: rgba(125, 95, 255, 0.02);
  box-shadow: var(--neon-glow);
}

.file-upload-input {
  display: none;
}

.file-upload-text {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

.file-upload-icon {
  font-size: 2.8rem;
  margin-bottom: 0.85rem;
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-family);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #a29bfe 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(125, 95, 255, 0.25);
}

.btn-primary:hover,
a.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #b2abff 100%);
  color: white !important;
  box-shadow: 0 10px 30px rgba(125, 95, 255, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-color);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover,
a.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-color) !important;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff7675 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(255, 77, 148, 0.25);
}

.btn-danger:hover,
a.btn-danger:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #ff8cbb 100%);
  color: white !important;
  box-shadow: 0 10px 30px rgba(255, 77, 148, 0.4);
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-group {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
}

/* Secret Output Link Area */
.secret-link-box {
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  padding: 1.25rem;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.secret-link-text {
  font-family: monospace;
  word-break: break-all;
  font-size: 1rem;
  color: var(--primary-hover);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Dashboard List */
.secret-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.secret-item {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.25s ease;
}

.secret-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.12);
}

.secret-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.secret-item-comment {
  font-weight: 700;
  font-size: 1.15rem;
}

.secret-item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* PWA Update Banner */
.update-banner {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary-color) 0%, #a29bfe 100%);
  color: white;
  padding: 0.85rem 1.75rem;
  border-radius: 30px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  animation: slide-down 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slide-down {
  from {
    top: -80px;
    opacity: 0;
  }
  to {
    top: 5.5rem;
    opacity: 1;
  }
}

.update-btn {
  background-color: white;
  color: var(--primary-color);
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.update-btn:hover {
  transform: scale(1.05);
}

/* Home / Info Section */
.hero-section {
  text-align: center;
  padding: 3rem 0;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 40%, #ff4d94 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.hero-desc {
  font-size: 1.35rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* Decrypted View Styling */
.decrypted-secret-box {
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  padding: 1.75rem;
  border-radius: 20px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 1.1rem;
  color: #fff;
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 2rem;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.danger-alert-box {
  background-color: rgba(255, 77, 148, 0.08);
  border: 1px solid rgba(255, 77, 148, 0.15);
  border-radius: 16px;
  padding: 1.25rem;
  color: #ff9fb4;
  font-size: 1rem;
  line-height: 1.55;
  display: flex;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

/* Pagination Row */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Responsive fixes */
@media (max-width: 600px) {
  main {
    padding: 1.5rem 1rem;
  }
  .card {
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
  }
  .card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  .hero-title {
    font-size: 2.3rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
  }
  .hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  header {
    padding: 1rem 1.25rem;
    position: relative; /* relative boundary for absolute menu */
  }
  .logo-text {
    font-size: 1.25rem;
  }
  .logo-icon {
    font-size: 1.8rem;
  }
  .burger-menu-btn {
    display: flex; /* Show burger on mobile */
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(3, 3, 8, 0.96);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    padding: 1.5rem 1.5rem;
    gap: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-btn {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    text-align: center;
  }
  .btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  .secret-item {
    padding: 1.25rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .secret-item .btn {
    width: auto;
    align-self: stretch;
  }
  .secret-link-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  .secret-link-text {
    font-size: 0.85rem;
    text-align: center;
  }
}

/* Extra small devices support */
@media (max-width: 380px) {
  .logo-text {
    display: none; /* Hide brand text on tiny screens to keep header clean */
  }
  .hero-title {
    font-size: 1.95rem;
  }
}

/* Table Styles */
.secret-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  margin-top: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.secret-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 1rem;
}

.secret-table th,
.secret-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.secret-table th {
  background-color: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.secret-table tr:last-child td {
  border-bottom: none;
}

.secret-table tr {
  transition: background-color 0.25s ease;
}

.secret-table tr:hover {
  background-color: rgba(255, 255, 255, 0.015);
}

.secret-table-comment {
  font-weight: 700;
  color: var(--text-color);
}

.secret-table-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}
