/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== LAYOUT WRAPPER ===== */
.main-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR STYLES ===== */
.sidebar {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 20px;
  width: 300px;
  flex-shrink: 0;
  overflow-y: auto;
  box-shadow: 5px 0 40px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 40px;
  flex-shrink: 0;
}

.main-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 1.7rem;
  margin-bottom: 10px;
  text-shadow: none;
}

/* ===== NAVIGATION STYLES ===== */
.nav-pills {
  flex: 1;
}

.nav-pills .nav-link {
  color: #b0b0b0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  margin-bottom: 12px;
  padding: 12px 20px;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.nav-pills .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.nav-pills .nav-link:hover::before {
  left: 100%;
}

.nav-pills .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(8px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.nav-pills .nav-link.active {
  color: #ffffff;
  background: linear-gradient(45deg, #007bff, #ff69b4);
  border-color: rgba(0, 123, 255, 0.5);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.2);
  transform: scale(1.02);
}

/* ===== MAIN CONTENT STYLES ===== */
.main-content {
  flex: 1;
  padding: 50px;
  border-radius: 20px;
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.content-pane {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.5s ease-in-out;
  margin-bottom: 20px;
}

.cipher-title {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 30px;
  font-size: 2.5rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.5));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(255, 105, 180, 0.5));
  }
}

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

.row > div {
  animation: slideIn 0.6s ease-out;
}

/* ===== FORM STYLES ===== */
.form-label {
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
}

.form-control,
.form-control[readonly] {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 123, 255, 0.5);
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

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

.form-text {
  color: #b0b0b0;
  font-size: 0.875rem;
}

/* File Input Styling */
input[type="file"]::file-selector-button {
  background: #ffffff;
  color: #000000;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: 0.3s;
}

input[type="file"]::file-selector-button:hover {
  background: #f0f0f0;
}

/* Radio Button Styling */
input[type="radio"] {
  accent-color: #007bff;
  margin-right: 8px;
}

/* ===== BUTTON STYLES ===== */
.btn {
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 500;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-right: 10px;
  margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary,
.btn-success {
  background: linear-gradient(45deg, #007bff, #ff69b4);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
  border: none;
}

.btn-primary:hover,
.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.4);
}

.btn-secondary {
  background: linear-gradient(45deg, #28a745, #218838);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
}

/* ===== OUTPUT SECTION ===== */
.output-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.output-title {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #007bff, #ff69b4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ALERT STYLES ===== */
.alert {
  border-radius: 12px;
  border: none;
  backdrop-filter: blur(10px);
  margin-bottom: 20px;
  color: #ffffff;
}

.alert-success {
  background: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.alert-warning {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.alert-danger {
  background: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-info {
  background: rgba(23, 162, 184, 0.2);
  border: 1px solid rgba(23, 162, 184, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .card {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(0, 123, 255, 0.7), rgba(255, 105, 180, 0.7));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    color: #fff;
  }

  .sidebar-header {
    width: 100%;
    margin-bottom: 20px;
  }

  .nav-pills {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-pills .nav-link {
    margin: 5px;
    text-align: center;
    padding: 10px 15px;
    flex: 1 1 45%;
    min-width: 120px;
  }

  .main-content {
    padding: 20px;
    width: 100%;
  }

  .main-title {
    font-size: 2rem;
  }

  .content-pane {
    padding: 20px;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}