/* Cyberpunk / Hacker Theme */
:root {
    --primary: #0f0;
    --secondary: #00f7ff;
    --dark: #111;
    --darker: #0a0a0a;
    --light: #e0e0e0;
    --error: #ff3e3e;
    --success: #00ff88;
}

body {
    font-family: 'Share Tech Mono', monospace;
    background-color: var(--dark);
    color: var(--light);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Animated Background (Optional) */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/matrix-bg.png') repeat;
    opacity: 0.05;
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

h1 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
    font-size: 2.5rem;
}

.subtitle {
    color: var(--secondary);
    font-size: 1.1rem;
}

.card {
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid var(--primary);
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

h2 {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-top: 0;
}

.icon {
    color: var(--primary);
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: var(--secondary);
}

input[type="file"], textarea {
    width: 100%;
    padding: 10px;
    background: var(--darker);
    border: 1px solid var(--primary);
    color: var(--light);
    font-family: 'Share Tech Mono', monospace;
}

.glow-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-encode {
    background: var(--primary);
    color: black;
}

.btn-decode {
    background: var(--secondary);
    color: black;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px currentColor;
}

/* Alert Messages */
.alert {
    padding: 10px;
    border-radius: 3px;
    margin-bottom: 15px;
}

.alert-error {
    background: rgba(255, 62, 62, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert-success {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.8rem;
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
    width: 100%;
}

.progress-bar {
    height: 20px;
    background-color: #111;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0a0, #0f0);
    transition: width 0.1s linear;
    border-radius: 10px;
}

.progress-label {
    color: #0f0;
    font-family: 'Courier New', monospace;
    margin-bottom: 5px;
}

.message-box {
    background-color: rgba(0, 20, 0, 0.3);
    border: 1px solid #0f0;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}
.decoder-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  font-family: 'Courier New', monospace;
}

.cyber-loader {
  background-color: #0a0a12;
  border: 1px solid #0ff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  padding: 2rem;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}

.loader-grid {
  position: relative;
  height: 200px;
  margin-bottom: 1.5rem;
}

.grid-line {
  position: absolute;
  background: rgba(0, 255, 255, 0.1);
}

.grid-line:nth-child(1) {
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

.grid-line:nth-child(2) {
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
}

.grid-line:nth-child(3) {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

.grid-line:nth-child(4) {
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
}

.active-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #0ff, transparent);
  box-shadow: 0 0 10px #0ff;
  animation: scan 2s linear infinite;
}

.binary-stream {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.binary-digit {
  color: #0f0;
  text-shadow: 0 0 5px #0f0;
  opacity: 0.3;
  animation: binaryFlicker 0.1s infinite alternate;
}

.decoder-status {
  display: flex;
  justify-content: space-between;
  color: #0ff;
  font-size: 0.9rem;
}

.status-text {
  text-transform: uppercase;
}

.status-progress {
  color: #0f0;
}

.hex-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
  z-index: 0;
}

.decoded-result {
  display: none;
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: rgba(0, 20, 20, 0.5);
  border: 1px solid #0f0;
  border-radius: 5px;
  color: #0f0;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes binaryFlicker {
  0% { opacity: 0.1; }
  100% { opacity: 0.4; }
}

.glitch-char {
  display: inline-block;
  position: relative;
  animation: glitch 0.3s infinite alternate;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

.glitched {
  position: relative;
}

.glitched::before,
.glitched::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitched::before {
  color: #f0f;
  z-index: -1;
  animation: glitch-effect 3s infinite;
}

.glitched::after {
  color: #0ff;
  z-index: -2;
  animation: glitch-effect 2s infinite reverse;
}

@keyframes glitch-effect {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
  100% { transform: translate(0); }
}
/* Core Styles */
.decoder-container {
  max-width: 600px;
  margin: 2rem auto;
  font-family: 'Courier New', monospace;
}

/* Loader Design */
.decoder-loader {
  background: #0a0a12;
  border: 1px solid #00ffff;
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.loader-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  color: #00ffff;
  font-size: 0.9rem;
}

/* Progress Bar */
.progress-track {
  height: 8px;
  background: rgba(0, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ffaa, #00ffff);
  border-radius: 4px;
  transition: width 0.3s ease-out;
}

/* Status Display */
.status-display {
  display: flex;
  justify-content: space-between;
  color: #00ffff;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* Binary Visualization (Optional) */
.binary-visualization {
  height: 60px;
  background: rgba(0, 20, 20, 0.3);
  border: 1px dashed rgba(0, 255, 255, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 255, 255, 0.5);
  font-size: 0.8rem;
}

/* Result Display */
.decoded-result {
  background: rgba(0, 20, 20, 0.5);
  border: 1px solid #00ffaa;
  border-radius: 4px;
  padding: 1.5rem;
  margin-top: 1rem;
  color: #00ffaa;
}

.result-header {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #00ffff;
}

.result-content {
  white-space: pre-wrap;
  line-height: 1.5;
}



@keyframes progressStripes {
    from { background-position: 0 0; }
    to { background-position: 20px 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    h1 {
        font-size: 2rem;
    }
}

/*After AESGCM (First) Cryptography Added*/
/* Add these to your existing CSS */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
    color: #0f0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 2px solid #0f0;
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(0, 255, 0, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: rgba(0, 255, 0, 0.2);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #0f0;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Style for key input fields */
.glow-input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background-color: rgba(0, 20, 0, 0.5);
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    border-radius: 4px;
}

.glow-input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 5px #0f0;
}

/* Key display section styles */
.key-display-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 30, 0, 0.3);
    border: 1px solid var(--primary);
    border-radius: 5px;
}

.key-display-section h3 {
    color: var(--primary);
    margin-top: 0;
    font-size: 1.2rem;
}

.key-display-section p {
    color: var(--secondary);
    margin: 10px 0;
}

.key-display-container {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.key-display-input {
    flex: 1;
    padding: 10px;
    background: var(--darker);
    border: 1px solid var(--primary);
    color: var(--light);
    font-family: 'Share Tech Mono', monospace;
    border-radius: 3px 0 0 3px;
    border-right: none;
}

.btn-copy-key {
    padding: 10px 15px;
    background: var(--secondary);
    color: black;
    border: 1px solid var(--primary);
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-copy-key:hover {
    background: var(--primary);
}

.key-warning {
    font-size: 0.9rem;
    color: #ffa500 !important;
    font-style: italic;
}