/* ===== Base Styles ===== */
body {
  background-color: #1a1a1a;
  color: #e5e5e5;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1100px;
}

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

.header-brand-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
}

.header-icon {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.header-icon img {
  width: 56px;
  height: 56px;
  display: block;
  transition: filter 0.3s ease;
}

.header-brand:hover .header-icon img {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.35));
}

.app-title {
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: 8px;
  color: #ffffff;
  margin: 0;
  font-family: 'Helvetica Neue', 'Arial', sans-serif;
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.app-version {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: #fff;
  padding-bottom: 8px;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

.app-subtitle {
  font-size: 12px;
  color: #666666;
  font-weight: 400;
  letter-spacing: 1.5px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

.app-description {
  font-size: 17px;
  color: #a3a3a3;
  max-width: 600px;
  margin: 0 auto 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

.text-encrypt {
  color: #3b82f6;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-weight: 500;
}

.text-decrypt {
  color: #10b981;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-weight: 500;
}

/* ===== Cards ===== */
.card {
  background-color: #222222;
  border: 1px solid #333333;
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.card:hover {
  border-color: #3d3d3d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.card.processing {
  pointer-events: none;
}

.card.processing .card-body {
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.card-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.card.processing .card-loading-overlay {
  display: flex;
}

.card-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #333333;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.card.decrypt .card-loading-spinner {
  border-top-color: #10b981;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.card-header {
  padding: 24px 28px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header i {
  font-size: 24px;
  color: #3b82f6;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  margin-top: -2px;
}

.card-header.decrypt i {
  color: #10b981;
}

.card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #e5e5e5;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

.card-body {
  padding: 28px 28px;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 500;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background-color: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 2px;
  color: #e5e5e5;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: #666666;
}

.form-control::placeholder {
  color: #666666;
}

/* ===== Drop Zone ===== */
.drop-zone {
  position: relative;
  border: 2px dashed #333333;
  border-radius: 2px;
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
  background-color: rgba(26, 26, 26, 0.6);
}

.drop-zone:hover {
  border-color: #444444;
  background-color: rgba(255, 255, 255, 0.015);
}

.drop-zone.has-file {
  border-style: solid;
  border-color: #333333;
  padding: 0;
  cursor: default;
}

.drop-zone.drag-over {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.card.decrypt .drop-zone.drag-over {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.06);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

.drop-zone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.drop-zone.has-file .drop-zone-input {
  pointer-events: none;
}

.drop-zone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.drop-zone-prompt i {
  font-size: 32px;
  color: #444444;
  transition: color 0.3s ease, transform 0.3s ease;
}

.drop-zone:hover .drop-zone-prompt i {
  color: #555555;
  transform: translateY(-2px);
}

.drop-zone.drag-over .drop-zone-prompt i {
  color: #3b82f6;
  transform: translateY(-4px);
  animation: dropBounce 0.6s ease infinite alternate;
}

.card.decrypt .drop-zone.drag-over .drop-zone-prompt i {
  color: #10b981;
}

@keyframes dropBounce {
  from { transform: translateY(-2px); }
  to { transform: translateY(-8px); }
}

.drop-zone-text {
  font-size: 13px;
  color: #666666;
  line-height: 1.6;
}

.drop-zone-browse {
  color: #3b82f6;
  font-weight: 500;
}

.card.decrypt .drop-zone-browse {
  color: #10b981;
}

/* ===== Input Groups ===== */
.input-group {
  display: flex;
}

.input-group .form-control {
  border-right: none;
  border-radius: 2px 0 0 2px;
}

.input-group .btn-icon {
  border-radius: 0;
}

.input-group .btn-icon:last-child {
  border-radius: 0 2px 2px 0;
}

/* ===== Buttons ===== */
.btn {
  padding: 13px 24px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: 100%;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.btn-primary {
  background-color: #3b82f6;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-success {
  background-color: #10b981;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-icon {
  width: 44px;
  padding: 12px;
  background-color: #1a1a1a;
  border: 1px solid #333333;
  cursor: pointer;
  transition: border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  border-color: #4a4a4a;
}

.btn-icon i {
  color: #737373;
  font-size: 14px;
}

.btn-icon:hover i {
  color: #a3a3a3;
}

.btn-primary > i,
.btn-success > i {
  margin-right: 6px;
  font-size: 13px;
}

.btn > .spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 6px;
}

/* ===== Progress ===== */
.status-section {
  margin-top: 28px;
}

.progress {
  height: 3px;
  background-color: #2a2a2a;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #3b82f6;
  transition: width 0.3s ease;
  font-size: 0;
  border-radius: 2px;
}

.status-log {
  margin-top: 16px;
  padding: 12px 16px;
  font-size: 13px;
  letter-spacing: 0.3px;
  border-radius: 2px;
  border-left: 3px solid;
}

.status-log.success {
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
  border-left-color: #10b981;
}

.status-log.error {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
}

.status-log .success-icon {
  font-size: 18px;
  margin-right: 8px;
  vertical-align: middle;
  animation: checkmarkPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: inline-block;
}

.status-log .status-message {
  display: inline;
  vertical-align: middle;
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== Password Strength Indicator ===== */
.password-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background-color: #333333;
  border-radius: 2px;
  overflow: hidden;
}

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

.strength-fill.weak {
  width: 33%;
  background-color: #ef4444;
}

.strength-fill.medium {
  width: 66%;
  background-color: #ff9500;
}

.strength-fill.strong {
  width: 100%;
  background-color: #10b981;
}

.strength-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 60px;
}

.strength-text.weak {
  color: #ef4444;
}

.strength-text.medium {
  color: #ff9500;
}

.strength-text.strong {
  color: #10b981;
}

/* ===== File Info Display ===== */
.file-info {
  padding: 14px 16px;
  background-color: #1a1a1a;
  border-radius: 2px;
  font-size: 13px;
  color: #a3a3a3;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInFile 0.25s ease;
  position: relative;
  z-index: 3;
}

@keyframes fadeInFile {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-info i:first-child {
  color: #3b82f6;
  font-size: 18px;
  flex-shrink: 0;
}

.card.decrypt .file-info i:first-child {
  color: #10b981;
}

.file-info .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e5e5e5;
  font-weight: 500;
}

.file-info .file-size {
  color: #737373;
  font-size: 12px;
  white-space: nowrap;
}

.file-remove {
  background: none;
  border: none;
  color: #555555;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

.file-remove:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}

.file-remove i {
  font-size: 12px;
}

/* ===== Footer ===== */
.app-footer {
  margin-top: 24px;
  margin-bottom: 4px;
  text-align: center;
}

.footer-note {
  font-size: 13px;
  color: #737373;
  margin-bottom: 16px;
  line-height: 1.7;
}

.footer-note .highlight {
  font-weight: 500;
  color: #ff9500;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
}

.footer-link {
  margin: 24px 0 0 0;
}

.footer-link a {
  color: #737373;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s ease;
  font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
  font-weight: 500;
}

.footer-link a:hover {
  color: #3b82f6;
}

/* ===== Toast Notifications ===== */
#toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.app-toast {
  background-color: #222222;
  border: 1px solid #333333;
  border-radius: 2px;
  padding: 16px 20px;
  min-width: 400px;
  max-width: 550px;
  color: #e5e5e5;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-toast > i {
  font-size: 16px;
  flex-shrink: 0;
}

.app-toast.warning > i {
  color: #ff9500;
}

.app-toast.error > i {
  color: #ef4444;
}

.app-toast.success > i {
  color: #10b981;
}

.app-toast.error {
  border-left: 3px solid #ef4444;
}

.app-toast.warning {
  border-left: 3px solid #ff9500;
}

.app-toast.success {
  border-left: 3px solid #10b981;
}

@keyframes slideIn {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100px);
    opacity: 0;
  }
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .card {
    margin-bottom: 32px;
  }
  
  .app-title {
    font-size: 2.25rem;
    letter-spacing: 6px;
  }
  
  .app-header {
    margin-bottom: 48px;
  }
  
  #toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    transform: none;
    align-items: stretch;
  }
  
  .app-toast {
    min-width: auto;
    width: 100%;
  }
}