/* Vernam Cipher and Perfect Secrecy Simulation Styles */

/* Desktop styles (default) */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 20px;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #333;
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Headings */
h4 {
  color: #2c3e50;
  margin: 25px 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

/* Form elements */
input[type="text"],
textarea {
  border: 2px solid #bdc3c7;
  border-radius: 6px;
  padding: 10px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  transition: border-color 0.3s ease;
  margin: 5px;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Buttons */
input[type="button"] {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  cursor: pointer;
  margin: 8px 5px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input[type="button"]:hover {
  background: linear-gradient(135deg, #2980b9, #21618c);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

input[type="button"]:active {
  transform: translateY(0);
}

/* Special button styling */
input[value*="Encrypt"] {
  background: linear-gradient(135deg, #27ae60, #229954);
}

input[value*="Decrypt"] {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

input[value*="Generate"] {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* Text areas for binary data */
textarea[readonly] {
  background-color: #ecf0f1;
  font-weight: bold;
}

#textarea2 {
  background-color: #fefefe;
  font-family: "Courier New", monospace;
  font-size: 12px;
  white-space: pre;
}

#notification {
  background-color: #d5f4e6;
  border: 2px solid #27ae60;
  color: #155724;
  font-weight: bold;
  padding: 10px;
  border-radius: 6px;
}

/* Section separators */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, #3498db, #9b59b6, #3498db);
  margin: 30px 0;
}

/* Form layout improvements */
form {
  margin: 15px 0;
}

pre {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #3498db;
  margin: 15px 0;
  overflow-x: auto;
}

/* Labels and descriptions */
p {
  margin: 15px 0;
  line-height: 1.7;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
  body {
    margin: 10px;
    font-size: 16px;
  }

  .content {
    padding: 15px;
    margin: 5px;
  }

  /* Larger inputs for mobile */
  input[type="text"],
  textarea {
    font-size: 16px;
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    margin: 8px 0;
  }

  /* Larger buttons for mobile */
  input[type="button"] {
    font-size: 16px;
    padding: 15px 25px;
    min-height: 55px;
    margin: 10px 5px;
    width: auto;
    min-width: 140px;
  }

  /* Stack buttons vertically on mobile */
  pre input[type="button"] {
    display: block;
    width: 100%;
    margin: 10px 0;
  }

  /* Responsive textareas */
  textarea {
    width: 100%;
    min-height: 120px;
  }

  #textarea2 {
    min-height: 200px;
    font-size: 11px;
  }

  /* Adjust headings for mobile */
  h4 {
    font-size: 18px;
    margin: 20px 0 10px 0;
  }

  /* Form spacing */
  p {
    margin: 20px 0;
  }

  pre {
    padding: 10px;
    margin: 10px 0;
  }
}

/* Very small screens */
@media screen and (max-width: 480px) {
  body {
    margin: 5px;
  }

  .content {
    padding: 10px;
  }

  input[type="button"] {
    padding: 18px 20px;
    font-size: 18px;
    min-height: 60px;
    width: 100%;
    margin: 8px 0;
  }

  input[type="text"],
  textarea {
    font-size: 18px;
    padding: 18px;
    min-height: 55px;
  }

  h4 {
    font-size: 20px;
  }
}

/* Additional styles for enhanced interface */
.main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.section-card {
  background: #e8f4fd;
  border-radius: 8px;
  padding: 20px;
  margin: 15px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #3498db;
}

.info-panel {
  background: #e8f5e8;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  margin: 15px 0;
}

.warning-panel {
  background: #fff3cd;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  margin: 15px 0;
}

.success-panel {
  background: #d4edda;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #28a745;
  margin: 15px 0;
}

.input-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.input-table td {
  padding: 8px;
  vertical-align: top;
}

.input-table td:first-child {
  width: 120px;
  font-weight: bold;
}

.input-table input,
.input-table textarea,
.input-table select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.button-primary {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.button-success {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.button-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.center-buttons {
  text-align: center;
  margin: 15px 0;
}

h6 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 10px;
}
