:root {
  --primary: #1a2b3c;
  --secondary: #4361ee;
  --accent: #f72585;
  --accent2: #4cc9f0;
  --light: #f8f9fa;
  --dark: #121826;
  --success: #06d6a0;
  --warning: #ff9e00;
  --card-bg: rgba(255, 255, 255, 0.08);
  --gradient-start: #4361ee;
  --gradient-end: #3a0ca3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
  color: var(--light);
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(67, 97, 238, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(247, 37, 133, 0.1) 0%,
      transparent 50%
    );
  z-index: -1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

header {
  text-align: center;
  padding: 40px 0;
  margin-bottom: 40px;
  position: relative;
}

header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--secondary),
    transparent
  );
}

h1 {
  font-size: 3.2rem;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--secondary), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(67, 97, 238, 0.3);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.2rem;
  color: #a0aec0;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 300;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

.algorithms-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light);
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 600;
}

.section-title i {
  background: linear-gradient(135deg, var(--secondary), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.5em;
}

.algorithms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .algorithms-grid {
    grid-template-columns: 1fr;
  }
}

.algorithm-card {
  background: linear-gradient(
    145deg,
    rgba(67, 97, 238, 0.1),
    rgba(58, 12, 163, 0.05)
  );
  border-radius: 16px;
  padding: 25px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.algorithm-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.algorithm-card:hover {
  transform: translateY(-8px);
  border-color: rgba(67, 97, 238, 0.3);
  background: linear-gradient(
    145deg,
    rgba(67, 97, 238, 0.2),
    rgba(58, 12, 163, 0.1)
  );
  box-shadow: 0 15px 35px rgba(67, 97, 238, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.algorithm-card:hover::before {
  transform: scaleX(1);
}

.algorithm-card.active {
  border-color: var(--secondary);
  background: linear-gradient(
    145deg,
    rgba(67, 97, 238, 0.25),
    rgba(58, 12, 163, 0.15)
  );
  box-shadow: 0 10px 30px rgba(67, 97, 238, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.algorithm-card.active::before {
  transform: scaleX(1);
}

.algorithm-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--secondary), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.3s ease;
}

.algorithm-card:hover .algorithm-icon {
  transform: scale(1.1);
}

.algorithm-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--light);
  letter-spacing: 0.5px;
}

.algorithm-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.4;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 40px;
}

.action-btn {
  padding: 16px 40px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 180px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.action-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 ease;
}

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

.encrypt-btn {
  background: linear-gradient(135deg, var(--success), #04966d);
  color: white;
  box-shadow: 0 5px 20px rgba(6, 214, 160, 0.3);
}

.decrypt-btn {
  background: linear-gradient(135deg, var(--warning), #cc7e00);
  color: white;
  box-shadow: 0 5px 20px rgba(255, 158, 0, 0.3);
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.action-btn.active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}

.io-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.input-group {
  margin-bottom: 30px;
}

label {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #e2e8f0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

label::before {
  content: "→";
  color: var(--secondary);
  font-weight: bold;
}

textarea,
input {
  width: 100%;
  padding: 18px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 1rem;
  resize: vertical;
  transition: all 0.3s ease;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

textarea {
  min-height: 140px;
  font-family: "Monaco", "Consolas", monospace;
  line-height: 1.5;
}

.process-btn {
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, var(--secondary), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.process-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: transform 0.6s ease;
}

.process-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(67, 97, 238, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.process-btn:hover::after {
  transform: rotate(30deg) translate(20%, 20%);
}

.process-btn:active {
  transform: translateY(-2px);
}

.result-container {
  margin-top: 40px;
  padding: 25px;
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.3),
    rgba(67, 97, 238, 0.05)
  );
  border-radius: 16px;
  border-left: 4px solid var(--secondary);
  position: relative;
  overflow: hidden;
}

.result-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 95%, rgba(67, 97, 238, 0.1));
  pointer-events: none;
}

.result-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

#result {
  font-size: 1.1rem;
  word-wrap: break-word;
  line-height: 1.6;
  color: #cbd5e1;
  font-family: "Monaco", "Consolas", monospace;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  min-height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.algorithm-info {
  background: linear-gradient(
    145deg,
    rgba(67, 97, 238, 0.1),
    rgba(247, 37, 133, 0.05)
  );
  border-radius: 12px;
  padding: 20px;
  margin-top: 25px;
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}

.algorithm-info strong {
  color: var(--accent2);
  font-weight: 600;
}

footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 0.9rem;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--secondary),
    transparent
  );
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(67, 97, 238, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .main-content {
    gap: 20px;
  }

  .algorithms-section,
  .io-section {
    padding: 20px;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .action-btn {
    width: 100%;
    max-width: 300px;
  }

  .process-btn {
    padding: 16px;
    font-size: 1.1rem;
  }
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--secondary), var(--accent));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--secondary), var(--accent2));
}

/* :root {
  --primary: #374a5d;
  --secondary: #3498db;
  --accent: #e74c3c;
  --light: #ecf0f1;
  --dark: #2f4050;
  --success: #27ae60;
  --warning: #f39c12;
}

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

body {
  background: linear-gradient(135deg, #ad3a1ac2, #e72006c0);
  color: var(--light);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  padding: 30px 0;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
  font-size: 1.2rem;
  color: #ddd;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

.algorithms-section {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: var(--secondary);
}

.algorithms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .algorithms-grid {
    grid-template-columns: 1fr;
  }
}

.algorithm-card {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.algorithm-card:hover {
  transform: translateY(-5px);
  border-color: var(--secondary);
  background-color: rgba(255, 255, 255, 0.2);
}

.algorithm-card.active {
  border-color: var(--secondary);
  background-color: rgba(52, 152, 219, 0.2);
}

.algorithm-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--secondary);
}

.algorithm-name {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.algorithm-desc {
  font-size: 0.9rem;
  color: #ccc;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.action-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
}

.encrypt-btn {
  background-color: var(--success);
  color: white;
}

.decrypt-btn {
  background-color: var(--warning);
  color: white;
}

.action-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.action-btn.active {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.io-section {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.input-group {
  margin-bottom: 25px;
}

label {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #ddd;
}

textarea,
input {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 1rem;
  resize: vertical;
}

textarea {
  min-height: 120px;
}

.process-btn {
  width: 100%;
  padding: 16px;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.process-btn:hover {
  background-color: #2980b9;
  transform: translateY(-3px);
}

.result-container {
  margin-top: 30px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border-left: 5px solid var(--secondary);
}

.result-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--secondary);
}

#result {
  font-size: 1.1rem;
  word-wrap: break-word;
  line-height: 1.5;
}

.hidden {
  display: none;
}

.algorithm-info {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.5;
}

footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #aaa;
  font-size: 0.9rem;
} */
