/* CryptKop - Custom Premium Styling Sheet */

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  /* Color Palette - Vibrant Dark Theme with Rich Cyan/Teal accents */
  --bg-deep: #030808;
  --bg-card: rgba(8, 18, 18, 0.6);
  --bg-card-hover: rgba(12, 26, 26, 0.75);
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-focused: rgba(6, 182, 212, 0.4);
  
  --primary-start: #06b6d4; /* Cyan */
  --primary-end: #0d9488;   /* Teal */
  --accent: #14b8a6;        /* Turquoise */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
  --shadow-glow-large: 0 0 50px rgba(6, 182, 212, 0.25);
  --shadow-card: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Background Blobs */
.glass-bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(125px);
  opacity: 0.16;
  mix-blend-mode: screen;
  animation: float-around 22s infinite alternate ease-in-out;
}

.blob-1 {
  width: 550px;
  height: 550px;
  background: var(--primary-start);
  top: -10%;
  left: 10%;
  animation-duration: 18s;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: var(--accent);
  bottom: -5%;
  right: 15%;
  animation-duration: 25s;
}

.blob-3 {
  width: 380px;
  height: 380px;
  background: #3b82f6; /* Soft Blue */
  top: 35%;
  left: 45%;
  animation-duration: 20s;
}

@keyframes float-around {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.08); }
  100% { transform: translate(40px, -30px) scale(0.92); }
}

/* App Container */
.app-container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
}

/* Header */
.app-header {
  margin-bottom: 25px;
  text-align: center;
}

.logo-area {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-normal);
}

.animate-sway {
  animation: sway 6s infinite ease-in-out;
}

@keyframes sway {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.04); }
}

.logo-text h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 30%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.tagline {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 3px;
  font-weight: 400;
}

/* Privacy Banner */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(6, 182, 212, 0.03);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.privacy-icon {
  font-size: 20px;
  color: var(--primary-start);
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.privacy-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: left;
}

.privacy-text strong {
  color: var(--text-primary);
}

/* Vault Card */
.card {
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
  position: relative;
}

/* Tabs Header Bar */
.tabs-header-bar {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 24px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tabs-header-bar::-webkit-scrollbar {
  height: 4px;
}
.tabs-header-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.tab-btn.active {
  color: var(--primary-start);
  border-bottom-color: var(--primary-start);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Tab contents */
.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.tab-content.active {
  display: block;
  animation: fade-in-up 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form layouts */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  height: 38px;
  padding: 0 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-glass-focused);
}

.form-select {
  background-color: #0a1212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  height: 38px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 0 10px;
  outline: none;
  cursor: pointer;
}

.form-select option {
  background-color: #0a1212;
  color: var(--text-primary);
}

textarea {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 14px;
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  min-height: 180px;
  outline: none;
  transition: var(--transition-fast);
}

textarea:focus {
  border-color: var(--border-glass-focused);
  background-color: rgba(0, 0, 0, 0.35);
}

/* Secret key view toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
}

.password-input-wrapper .form-input {
  width: 100%;
  padding-right: 44px;
}

.btn-toggle-key-view {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 44px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: var(--transition-fast);
}

.btn-toggle-key-view:hover {
  color: var(--text-primary);
}

/* Output form groups with copy action */
.output-form-group {
  position: relative;
}

.btn-copy {
  position: absolute;
  right: 12px;
  top: 36px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* TAB 1: Encryption Layout */
.encrypt-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.encrypt-outputs textarea {
  min-height: 290px;
}

/* TAB 2: Hasher Layout */
.hash-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

.hash-input-column textarea {
  min-height: 380px;
}

.hash-outputs-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.hash-outputs-column::-webkit-scrollbar {
  width: 4px;
}
.hash-outputs-column::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}

.hash-output-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hash-card-header strong {
  font-family: var(--font-heading);
  font-size: 11.5px;
  color: var(--primary-start);
  text-transform: uppercase;
}

.btn-copy-hash {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  transition: var(--transition-fast);
}

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

.code-text {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12.5px;
  color: #e2e8f0;
  word-break: break-all;
  user-select: all;
  background: rgba(0,0,0,0.15);
  padding: 6px 10px;
  border-radius: 6px;
  min-height: 30px;
}

/* TAB 3: Password Gen Layout */
.password-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: 280px;
}

.slider-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.slider-header-row label {
  margin-bottom: 0;
}

.slider-header-row strong {
  color: var(--primary-start);
  font-family: var(--font-heading);
  font-size: 14px;
}

/* Range Slider */
.form-range {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-start);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  transition: var(--transition-fast);
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.options-checklist-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

/* Custom Checkboxes */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-label input {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
  display: inline-block;
  position: relative;
  transition: var(--transition-fast);
}

.checkbox-label:hover .checkbox-custom {
  border-color: rgba(6, 182, 212, 0.3);
}

.checkbox-label input:checked + .checkbox-custom {
  background: var(--primary-start);
  border-color: var(--primary-start);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Giant Password Display */
.pwd-result-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.giant-password-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.giant-password-text {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.password-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 18px;
  gap: 16px;
}

.strength-indicator-bar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  width: 150px;
}

.strength-indicator-bar span {
  font-size: 9.5px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.strength-meter {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: width 0.3s, background-color 0.3s;
}

.strength-weak { background-color: var(--error); width: 25%; }
.strength-medium { background-color: var(--warning); width: 60%; }
.strength-strong { background-color: var(--success); width: 100%; }

.pwd-action-btns {
  display: flex;
  gap: 10px;
}

/* TAB 4: QR Layout */
.qr-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel-subtitle-inner {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qr-sub-panel {
  display: flex;
  flex-direction: column;
}

.qr-sub-panel.border-left {
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  padding-left: 24px;
}

.qr-canvas-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-top: 10px;
  min-height: 220px;
  gap: 14px;
}

.qr-canvas-wrapper {
  background: white;
  padding: 10px;
  border-radius: 8px;
  display: inline-block;
}

.qr-canvas-wrapper img {
  display: block;
}

/* Scanner viewport rules */
.scanner-viewport-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-viewport {
  width: 100%;
  height: 100%;
}

.scanner-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.scanned-result-row {
  display: flex;
  gap: 8px;
}

.scanned-result-row .form-input {
  flex-grow: 1;
}

.margin-top-12 {
  margin-top: 12px;
}

/* General Buttons */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #22d3ee, #0f766e);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

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

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-small {
  height: 32px;
  font-size: 12px;
  padding: 4px 12px;
}

.btn-large {
  padding: 12px 24px;
  font-size: 14px;
}

.text-error {
  color: var(--error) !important;
}

/* Footer info */
.app-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.app-footer p {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Responsive Explorer Layout */
@media (max-width: 850px) {
  .encrypt-layout-grid, .hash-layout-grid, .password-layout-grid, .qr-layout-grid {
    grid-template-columns: 1fr;
  }
  .app-container {
    padding: 20px 10px;
  }
  .qr-sub-panel.border-left {
    border-left: none;
    padding-left: 0;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 20px;
  }
  .password-actions-row {
    flex-direction: column;
    gap: 12px;
  }
  .strength-indicator-bar, .pwd-action-btns {
    width: 100%;
  }
  .pwd-action-btns .btn {
    flex-grow: 1;
  }
}
