/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Body */
body {
  background: #1a1a2e url("./media/background.jpg") center / cover fixed;
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Main container */
.container {
  width: 100%;
  max-width: 500px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(15px);
  border-radius: 24px;
  padding: 35px 25px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Title */
h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 25px;
  background: linear-gradient(135deg, #3498db, #e67e22);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Input */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
  margin-bottom: 8px;
}

input,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #e67e22;
  box-shadow: 0 0 10px rgba(230, 126, 34, 0.3);
}

/* Buttons */
.buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.buttons button {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
}

#encrypt-btn {
  background: #2ecc71;
}

#encrypt-btn:hover {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}

#decrypt-btn {
  background: #3498db;
}

#decrypt-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

/* Output */
#output-area {
  margin-top: 10px;
}

.output-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.output-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
  margin-bottom: 6px;
  display: block;
}

.output-text {
  font-size: 1.1rem;
  word-break: break-word;
  min-height: 1.5em;
  color: #fff;
}

/* Copy */
.copy-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
  background: #2ecc71;
}

/* Error */
#error-message {
  min-height: 1.2em;
  margin-top: 10px;
  color: #e74c3c;
  font-size: 0.95rem;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 500px) {
  .container {
    padding: 20px 15px;
  }
  .buttons {
    flex-direction: column;
  }
}
