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

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #121212;
  color: #ffffff;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

.sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
  align-items: stretch;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  gap: 25px;
  padding: 30px 0;
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95) 0%, rgba(15, 15, 15, 0.98) 100%);
  border-radius: 20px;
  border: 1px solid #444444;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 40px;
}

h1 {
  color: #ffffff;
  font-size: 2.8rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 
    0 0 15px #dc2626,
    0 0 25px #dc2626,
    0 0 35px #dc2626,
    0 0 45px #dc2626,
    3px 3px 6px rgba(0,0,0,0.9);
}

.header-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-btn {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #4b5563;
  min-width: 90px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(55, 65, 81, 0.4);
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.account-dropdown-container {
  position: relative;
  display: inline-block;
}

.account-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
  border: 1px solid #444444;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
  z-index: 1000;
  min-width: 140px;
  margin-top: 5px;
}

.account-dropdown.show {
  display: block;
}

.account-dropdown-item {
  padding: 12px 16px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 1px solid #333333;
}

.account-dropdown-item:last-child {
  border-bottom: none;
}

.account-dropdown-item:hover {
  background-color: #374151;
}

.account-dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.account-dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

.privacy-statement {
  text-align: center;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
  text-shadow: 
    0 0 10px #ffffff,
    0 0 18px #ffffff,
    0 0 26px #ffffff,
    2px 2px 4px rgba(0,0,0,0.6);
  letter-spacing: 0.8px;
  opacity: 0.98;
  font-style: italic;
}

.section {
  background: #1f1f1f;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  border: 1px solid #333333;
  height: 100%;
  display: flex;
  flex-direction: column;
}

h2 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 3px solid #dc2626;
  padding-bottom: 8px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 8px;
  font-size: 1rem;
}

textarea {
  width: 100%;
  min-height: 100px;
  height: 100px;
  padding: 12px;
  border: 2px solid #444444;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
  background-color: #2a2a2a;
  color: #ffffff;
}

textarea:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

textarea::placeholder {
  color: #888888;
}

input[type="password"], input[type="number"] {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #444444;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background-color: #2a2a2a;
  color: #ffffff;
}

input[type="password"]:focus, input[type="number"]:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

input[type="password"]::placeholder, input[type="number"]::placeholder {
  color: #888888;
}

.credentials-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.char-counter {
  text-align: right;
  font-size: 0.9rem;
  color: #b3b3b3;
  margin-top: 5px;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 100%;
  max-width: 200px;
}

.btn-encrypt {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: white;
  margin-bottom: 20px;
}

.btn-encrypt:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-decrypt {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
  margin-bottom: 20px;
}

.btn-decrypt:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(31, 41, 55, 0.4);
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.btn-copy {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  font-size: 0.9rem;
  padding: 8px 20px;
  margin-top: 10px;
  width: 100%;
  max-width: 200px;
}

.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

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

/* Toast notification container */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
}

/* Base toast styles */
.toast {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  border-left: 4px solid;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(400px);
  opacity: 0;
}

/* Error toast */
.toast.error {
  background-color: #1f1f1f;
  border-left-color: #dc2626;
  color: #ffffff;
  border: 1px solid #dc2626;
}

/* Success toast */
.toast.success {
  background-color: #1f1f1f;
  border-left-color: #10b981;
  color: #ffffff;
  border: 1px solid #10b981;
}

/* Toast close button */
.toast-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #888888;
  font-size: 18px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.toast-close:hover {
  color: #ffffff;
}

/* Progress bar for auto-dismiss */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.3);
  transition: width linear;
}

.toast.error .toast-progress {
  background-color: #dc2626;
}

.toast.success .toast-progress {
  background-color: #10b981;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    transform: translateY(-100px);
  }

  .toast.show {
    transform: translateY(0);
  }

  .toast.hide {
    transform: translateY(-100px);
  }
}

@media (max-width: 1200px) {
  .sections-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    margin-bottom: 30px;
    padding: 15px 0;
  }

  .header-top {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  h1 {
    font-size: 2rem;
  }

  .header-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    min-width: 70px;
  }

  .privacy-statement {
    font-size: 0.95rem;
  }

  .section {
    padding: 20px;
  }

  .credentials-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  textarea {
    min-height: 80px;
  }

  .sections-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

#encrypted-output, #decrypted-output {
  background-color: #2a2a2a;
  font-family: 'Courier New', monospace;
  color: #ffffff;
  border: 2px solid #444444;
}

#char-count.warning, #encrypted-char-count.warning {
  color: #dc2626;
  font-weight: 600;
}

.file-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #444444;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background-color: #2a2a2a;
  color: #ffffff;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.file-input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.file-input::file-selector-button {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  margin-right: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.file-input::file-selector-button:hover {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  transform: translateY(-1px);
}

.footer {
  background: #1a1a1a;
  color: #ccc;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  border-top: 1px solid #333;

  text-shadow: 
    0 0 10px #ffffff,
    0 0 18px #ffffff,
    0 0 26px #ffffff,
    2px 2px 4px rgba(0,0,0,0.6);
  letter-spacing: 0.8px;
  opacity: 0.98;
  font-style: italic;
}

.footer a {
  color: #ccc;
  text-decoration: none;
  margin: 0 8px;
}

.footer a:hover {
  color: #fff;
}
