.mode-text {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the content horizontally */
    gap: 0.5rem;
    flex-wrap: nowrap;
    width: 100%; /* Take full width of parent */
    text-align: center; /* Center align text */
}
.mode-title {
    font-size: 1.1rem;
    font-weight: 700;
    order: 1;
    /* Stable gradient */
    background: linear-gradient(
        45deg,
        #ff6b6b 0%,
        #4ecdc4 50%,
        #45b7d1 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulseGlow 2s ease-in-out infinite;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes pulseGlow {
    0%, 100% {
        filter: brightness(1) saturate(1);
        text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    }
    50% {
        filter: brightness(1.2) saturate(1.3);
        text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    }
}

.mode-subtitle {
    font-size: 0.85rem;
    opacity: var(--opacity-07);
    font-weight: 400;
    order: 2;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent shrinking */
}

/* If you need to constrain the overall width */
.mode-text-container {
    max-width: 400px; /* Adjust as needed */
    margin: 0 auto; /* Center the container */
}

/* Alternative: If they're in a button or specific container */
.mode-button .mode-text,
.mode-container .mode-text {
    justify-content: center;
    padding: 0 1rem; /* Add padding to prevent edge touching */
}

/* Shimmer animation */
@keyframes shimmer {
    0% {
        background-position: 200% 0%;
    }
    50% {
        background-position: -200% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

/* Shine animation */
@keyframes shine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}


/* Alternative: More subtle gradient option */
.mode-title.subtle {
    background: linear-gradient(
        45deg,
        #667eea 0%,
        #764ba2 50%,
        #f093fb 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: subtleShimmer 4s ease-in-out infinite;
}

@keyframes subtleShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Responsive: Stack on very small screens if needed */
@media (max-width: 480px) {
    .mode-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    
    .mode-subtitle {
        margin-left: 0;
    }
}


.mode-btn.active .mode-subtitle { 
  opacity: 0.9; 
} 

.algorithm-card { 
  padding: 1rem; 
} 

.card-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: 1.5rem; 
  position: relative; 
  z-index: 2; 
} 

.card-title-section { 
  gap: 1rem; 
} 

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

.algorithm-card h3 { 
  font-size: 1.4rem; 
} 

.algorithm-subtitle { 
  font-size: 0.9rem; 
} 

.algorithm-description { 
  margin-bottom: 1.5rem; 
  position: relative; 
  z-index: 2; 
} 

.main-description { 
  font-size: 1rem; 
  color: var(--text-secondary); 
  margin-bottom: 1rem; 
  line-height: 1.4; 
} 

.crypto-stack { 
  background: rgba(0,0,0,0.3); 
  border-radius: 10px; 
  padding: 1rem; 
  border-left: 4px solid var(--accent-cyan); 
} 

.stack-title { 
  font-size: 0.85rem; 
} 

.stack-components { 
  gap: 0.5rem; 
} 

.component { 
  font-size: 0.9rem; 
} 

.component-type { 
  border-radius: 8px; 
  font-size: 0.75rem; 
  min-width: 80px; 
} 

.algorithm-details { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin-top: 1.5rem; 
  position: relative; 
  z-index: 2; 
} 

.security-metrics { 
  gap: 0.5rem; 
} 

.security-level { 
  font-size: 0.8rem; 
  padding: 0.4rem 1rem; 
} 

.level-ultra { 
  background: linear-gradient(45deg,rgba(0,255,255,0.15),rgba(255,0,255,0.15)); 
} 

.use-case-tags { 
  justify-content: center; 
} 

.use-case-tag { 
  display: flex; 
  align-items: center; 
  gap: 0.3rem; 
  background: var(--white-10); 
  border: 1px solid var(--white-20); 
  border-radius: 12px; 
  padding: 0.3rem 0.8rem; 
  font-size: 0.75rem; 
  color: var(--text-secondary); 
  transition: all var(--transition-normal); 
} 

.performance-indicator { 
  font-size: 0.8rem; 
  padding: 0.3rem 0.8rem; 
  border-radius: 12px; 
  background: var(--white-10); 
  border: 1px solid var(--white-20); 
  display: flex; 
  align-items: center; 
  gap: 0.3rem; 
} 

.input-hint { 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  font-weight: 400; 
  margin-left: 0.5rem; 
} 

.textarea-wrapper {
    position: relative;
    margin-bottom: 2.5rem; /* Add space for counter */
}

.enhanced-textarea {
    position: relative;
    min-height: 250px;
    border-radius: 12px;
    padding: 1.5rem;
    padding-right: 4rem;
    line-height: 1.6;
    font-family: var(--font-code);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    transition: all var(--transition-normal);
}

.textarea-actions { 
  position: absolute; 
  top: 0.5rem; 
  right: 0.5rem; 
  display: flex; 
  gap: 0.5rem; 
  z-index: 10000 !important; 
} 

.textarea-action-btn { 
  background: rgba(0,0,0,0.6); 
  border: 1px solid var(--border-color); 
  border-radius: 8px; 
  padding: 0.5rem; 
  color: var(--text-secondary); 
  cursor: pointer; 
  transition: all var(--transition-normal); 
  backdrop-filter: blur(10px); 
} 

.textarea-action-btn:hover { 
  background: rgba(0,255,255,0.1); 
  border-color: var(--accent-cyan); 
  color: var(--accent-cyan); 
  transform: translateY(-1px); 
} 

.enhanced-input { 
  padding-right: 3rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
} 

.password-toggle { 
  position: absolute; 
  right: 1rem; 
  top: 50%; 
  transform: translateY(-50%); 
  background: none; 
  border: none; 
  color: var(--text-secondary); 
  cursor: pointer; 
  padding: 0.5rem; 
  border-radius: 6px; 
  transition: all var(--transition-normal); 
  z-index: 10000 !important;
} 

.password-toggle:hover { 
  color: var(--accent-cyan); 
  background: rgba(0,255,255,0.1); 
} 

.password-strength { 
  flex-direction: column; 
  gap: 0.5rem; 
} 

.strength-bars { 
  display: flex; 
  gap: 0.25rem; 
  flex: 1; 
} 

.strength-bar { 
  height: 4px; 
  background: var(--white-10); 
  border-radius: 2px; 
  flex: 1; 
  transition: all var(--transition-normal); 
} 

.strength-bar.active { 
  background: white; 
} 

.strength-bar.weak { 
  background: var(--error-color); 
} 

.strength-bar.medium { 
  background: var(--color-orange); 
} 

.strength-bar.strong { 
  background: var(--success-color); 
} 

.strength-text { 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  font-weight: 500; 
} 

.enhanced-select { 
  background: rgba(0,0,0,0.8); 
  border: 2px solid var(--border-color); 
  border-radius: 12px; 
  padding: 1rem 3rem 1rem 1rem; 
  position: relative;
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2340E0D0' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
} 

.enhanced-select:focus { 
  border-color: var(--accent-cyan); 
  box-shadow: 0 0 20px var(--glow-cyan); 
} 

.char-counter { 
  flex-direction: column; 
  align-items: flex-start; 
  gap: 0.5rem; 
} 

.counter-bar { 
  position: absolute; 
  bottom: -3px; 
  left: 0; 
  right: 0; 
  height: 2px; 
  background: var(--white-10); 
  border-radius: 1px; 
  overflow: hidden; 
} 

.counter-fill { 
  height: 100%; 
  background: linear-gradient(90deg,var(--accent-cyan),var(--accent-magenta)); 
  width: 0%; 
  transition: width var(--transition-normal); 
  box-shadow: 0 0 10px var(--glow-cyan); 
} 

.enhanced-btn { 
  position: relative; 
  overflow: hidden; 
  border-radius: 12px; 
  transition: all var(--transition-normal); 
} 

.btn-shine { 
  position: absolute; 
  top: 0; 
  left: -100%; 
  width: 100%; 
  height: 100%; 
  background: var(--gradient-90-white); 
  transition: left 0.6s ease; 
} 

.enhanced-btn:hover .btn-shine { 
  left: 100%; 
} 

.enhanced-primary { 
  position: relative; 
  overflow: hidden; 
} 

.btn-ripple { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  width: 0; 
  height: 0; 
  border-radius: 50%; 
  background: rgba(255,255,255,0.3); 
  transform: var(--transform-center-short); 
  transition: width 0.6s ease,height 0.6s ease; 
} 

.enhanced-primary:active .btn-ripple { 
  width: 200px; 
  height: 200px; 
} 

.enhanced-secondary { 
  background: var(--white-05); 
  border: 2px solid var(--border-color); 
  backdrop-filter: blur(10px); 
} 

.enhanced-secondary:hover { 
  background: rgba(0,255,255,0.1); 
  border-color: var(--accent-cyan); 
  box-shadow: 0 8px 25px var(--glow-cyan); 
} 

.progress-bar { 
  position: relative; 
  border-radius: 8px; 
  overflow: hidden; 
} 

.progress-text { 
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: var(--transform-center-short); 
  font-size: 1.1rem; 
  font-weight: 700; 
  color: white; 
  text-shadow: 0 2px 6px rgba(0,0,0,0.9), 0 0 10px rgba(0,255,255,0.3); 
  z-index: 10; 
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.5px;
} 

.enhanced-status { 
  background: rgba(0,255,255,0.1); 
  border: 1px solid var(--accent-cyan); 
  border-radius: 8px; 
  padding: 1rem; 
  backdrop-filter: blur(10px); 
} 

.enhanced-error { 
  background: rgba(255,107,107,0.1); 
  border: 1px solid var(--error-color); 
  border-radius: 8px; 
  padding: 1rem; 
  backdrop-filter: blur(10px); 
} 

.stat-item { 
  position: relative; 
  overflow: hidden; 
} 

.stat-change { 
  position: absolute; 
  top: 0.5rem; 
  right: 0.5rem; 
  font-size: 0.7rem; 
  padding: 0.25rem 0.5rem; 
  border-radius: 12px; 
  background: rgba(76,175,80,0.2); 
  border: 1px solid var(--success-color); 
  color: var(--success-color); 
} 

.enhanced-output { 
  border-radius: 12px; 
  min-height: 200px; 
  font-family: var(--font-code); 
  line-height: 1.6; 
} 

.output-status { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  margin-left: auto; 
} 

.status-indicator { 
  border: 2px solid currentColor; 
} 

.status-success { 
  animation: bounce-in 0.6s cubic-bezier(0.68,-0.55,0.265,1.55); 
} 

.status-text { 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  font-weight: 500; 
} 

.security-badge { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  margin-left: auto; 
  background: rgba(76,175,80,0.2); 
  border: 1px solid var(--success-color); 
  border-radius: 20px; 
  padding: 0.5rem 1rem; 
} 

.badge-icon { 
  font-size: 0.8rem; 
} 

.badge-text { 
  font-size: 0.8rem; 
  font-weight: 600; 
  color: var(--success-color); 
} 

.info-badge { 
  position: absolute; 
  top: 1rem; 
  right: 1rem; 
  background: linear-gradient(135deg,var(--accent-cyan),var(--accent-magenta)); 
  color: white; 
  padding: 0.25rem 0.75rem; 
  border-radius: 12px; 
  font-size: 0.7rem; 
  font-weight: 600; 
  text-transform: uppercase; 
  letter-spacing: 0.5px; 
} 

.key-status { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  margin-left: auto; 
} 

.footer-content { 
  gap: 0.5rem; 
} 

.footer-link { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  padding: 0.5rem 1rem; 
  border-radius: 8px; 
  transition: all var(--transition-normal); 
  text-decoration: none; 
  color: var(--text-secondary); 
} 

.footer-link:hover { 
  background: rgba(0,255,255,0.1); 
  color: var(--accent-cyan); 
  transform: translateY(-2px); 
}

.footer-link.advanced-link {
  background: linear-gradient(135deg, rgba(0,255,200,0.1), rgba(0,184,148,0.1));
  border: 1px solid rgba(0,255,200,0.3);
}

.footer-link.advanced-link:hover {
  background: linear-gradient(135deg, rgba(0,255,200,0.2), rgba(0,184,148,0.2));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
} 

.link-text { 
  font-size: 0.9rem; 
  font-weight: 500; 
} 

.footer-version { 
  background: rgba(0,255,255,0.2); 
  border: 1px solid var(--accent-cyan); 
  border-radius: 12px; 
  padding: 0.25rem 0.5rem; 
  font-size: 0.7rem; 
  font-weight: 600; 
  margin-left: 0.5rem; 
} 

@keyframes pulse-glow { 
  0%, 100% { box-shadow: 0 0 5px var(--glow-cyan); } 
  50% { transform: scale(1.05); } 
} 

@keyframes slide-in-up { 
  from { opacity: 0; transform: translateY(30px); } 
  to { opacity: var(--opacity-1); transform: var(--translateY-0); } 
} 

@keyframes bounce-in { 
  0% { opacity: 0; transform: scale(0.3); } 
  70% { transform: var(--scale-hover); } 
  100% { opacity: var(--opacity-1); transform: scale(1); } 
} 

.enhanced-btn:active { 
  transform: scale(0.98); 
} 

.algorithm-card:hover { 
  animation: none; 
} 

/* Password section card background */
.password-section {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Security info section - less transparent */
.security-info {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(12px);
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* High z-index for interactive buttons to be above cursor effects */
.enhanced-btn,
.password-toggle,
.textarea-action-btn,
button {
  z-index: 9999 !important;
  position: relative;
}

/* Cursor effects should be below interactive elements */
body {
  cursor: auto;
  position: relative;
  z-index: 1;
}

/* Custom cursor styling */
* {
  cursor: inherit;
}

a, button, input, textarea, select, .algorithm-card, .mode-btn {
  cursor: pointer;
  z-index: 9999;
  position: relative;
}

/* Enhanced Mobile Optimization */
@media (max-width: 1024px) {
  /* Tablet optimizations */
  .algorithm-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
  }
  
  .algorithm-card {
    padding: 1.5rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .use-case-tags {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  /* Mobile-first responsive design */
  .container {
    padding: 1rem;
    max-width: 100%;
  }
  
  .mode-selector {
    flex-direction: column;
    gap: 1rem;
  }
  
  .mode-btn {
    padding: 1.5rem;
    flex-direction: column;
    text-align: center;
    min-height: 120px;
    align-items: center;
    justify-content: center;
  }
  
  /* Fix password mode button - stack animation and text */
  .mode-btn[data-mode="password"] {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }
  
  .mode-btn[data-mode="password"] .dice-password {
    margin: 0;
    order: 1;
  }
  
  .mode-btn[data-mode="password"] .mode-text {
    order: 2;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
  }
  
  /* Fix key mode button layout */
  .mode-btn[data-mode="key"] {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }
  
  .mode-btn[data-mode="key"] .mode-icon {
    order: 1;
    width: 80px;
    height: 70px;
  }
  
  .mode-btn[data-mode="key"] .mode-text {
    order: 2;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
  }
  
  .algorithm-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .algorithm-card {
    padding: 1.25rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .algorithm-icon {
    font-size: 1.5rem;
  }
  
  .card-title-section {
    text-align: center;
  }
  
  .algorithm-details {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .security-metrics {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .use-case-tags {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .input-section {
    margin-bottom: 1.5rem;
  }
  
  .enhanced-textarea {
    min-height: 180px;
    padding: 1.25rem;
    font-size: 1rem;
  }
  
  .textarea-actions {
    top: 0.75rem;
    right: 0.75rem;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .textarea-action-btn {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .enhanced-input {
    padding: 1.25rem;
    font-size: 1rem;
  }
  
  .password-toggle {
    right: 1.25rem;
    padding: 0.75rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-link {
    padding: 1rem;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }
  
  .stat-item {
    padding: 1.25rem;
  }
  
  .progress-container {
    margin: 1.5rem 0;
  }
  
  .progress-bar {
    height: 8px;
    border-radius: 4px;
  }
  
  .progress-text {
    font-size: 1rem;
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  /* Small mobile optimizations */
  .container {
    padding: 0.75rem;
  }
  
  .mode-btn {
    padding: 1.25rem;
    min-height: 70px;
  }
  
  .mode-title {
    font-size: 1rem;
  }
  
  .mode-subtitle {
    font-size: 0.8rem;
  }
  
  .algorithm-card {
    padding: 1rem;
  }
  
  .card-header {
    margin-bottom: 1rem;
  }
  
  .algorithm-card h3 {
    font-size: 1.2rem;
  }
  
  .algorithm-subtitle {
    font-size: 0.85rem;
  }
  
  .enhanced-textarea {
    min-height: 160px;
    padding: 1rem;
    font-size: 0.95rem;
  }
  
  .textarea-actions {
    top: 0.5rem;
    right: 0.5rem;
  }
  
  .textarea-action-btn {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .enhanced-input {
    padding: 1rem;
    font-size: 0.95rem;
  }
  
  .password-toggle {
    right: 1rem;
    padding: 0.5rem;
  }
  
  .output-status, .key-status, .security-badge {
    margin-left: 0;
    margin-top: 0.75rem;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .footer-link {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .link-text {
    font-size: 0.85rem;
  }
  
  .enhanced-btn {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .progress-text {
    font-size: 0.9rem;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .algorithm-card {
    transition: none;
  }
  
  .algorithm-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  .algorithm-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  .enhanced-btn:hover {
    transform: none;
  }
  
  .enhanced-btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
  }
  
  .textarea-action-btn:hover {
    transform: none;
  }
  
  .textarea-action-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  /* Larger touch targets */
  .mode-btn {
    min-height: 60px;
  }
  
  .algorithm-card {
    min-height: 200px;
  }
  
  .enhanced-btn {
    min-height: 48px;
    padding: 0.75rem 1.5rem;
  }
  
  .textarea-action-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  .password-toggle {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    padding: 0.75rem;
  }
  
  .mode-selector {
    flex-direction: row;
    gap: 1rem;
  }
  
  .mode-btn {
    flex: 1;
    min-height: 70px;
  }
  
  .algorithm-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .enhanced-textarea {
    min-height: 140px;
  }
}

/* High-DPI mobile displays */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
  .algorithm-icon {
    font-size: 1.6rem;
  }
  
  .progress-bar {
    height: 6px;
  }
  
  .progress-text {
    font-weight: 700;
  }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
  .enhanced-btn:focus,
  .enhanced-input:focus,
  .enhanced-textarea:focus,
  .enhanced-select:focus {
    outline: 3px solid var(--accent-cyan);
    outline-offset: 3px;
  }
  
  .algorithm-card:focus {
    outline: 3px solid var(--accent-cyan);
    outline-offset: 3px;
  }
  
  .mode-btn:focus {
    outline: 3px solid var(--accent-cyan);
    outline-offset: 3px;
  }
}

/* Dark mode mobile optimizations */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
  .algorithm-card {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
  }
  
  .enhanced-textarea,
  .enhanced-input,
  .enhanced-select {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .mode-btn {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

/* Reduced motion for mobile */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .algorithm-card,
  .enhanced-btn,
  .mode-btn {
    transition: none;
  }
  
  .btn-shine,
  .btn-ripple,
  .counter-fill {
    display: none;
  }
}

/* Print styles for mobile */
@media print and (max-width: 768px) {
  .algorithm-grid {
    grid-template-columns: 1fr;
  }
  
  .algorithm-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  .enhanced-textarea,
  .enhanced-input {
    border: 1px solid #000;
  }
} 

@media (prefers-color-scheme: dark) { 
  .enhanced-btn { 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
  } 
  .enhanced-textarea, .enhanced-input, .enhanced-select { 
    background: rgba(0,0,0,0.6); 
  } 
} 

@media (prefers-contrast: high) { 
  .algorithm-badge, .info-badge { 
    background: var(--accent-cyan); 
    color: var(--bg-primary); 
  } 
} 

@media (prefers-reduced-motion: reduce) { 
  .btn-shine, .btn-ripple, .counter-fill { 
    transition: none; 
  } 
} 

.enhanced-btn:focus, .enhanced-input:focus, .enhanced-textarea:focus, .enhanced-select:focus { 
  outline: 3px solid var(--accent-cyan); 
  outline-offset: 2px; 
} 

.skip-link { 
  position: absolute; 
  top: -40px; 
  left: 6px; 
  background: var(--accent-cyan); 
  color: var(--bg-primary); 
  padding: 8px; 
  text-decoration: none; 
  border-radius: 4px; 
  z-index: 10001; 
} 

.skip-link:focus { 
  top: 6px; 
}

/* Security Level Selection */
.security-option {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(64, 224, 208, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 1rem 2rem 1rem;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(64, 224, 208, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2rem);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.security-option:hover {
    border-color: rgba(64, 224, 208, 0.4);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(64, 224, 208, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.security-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.security-select {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg-strong);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    backdrop-filter: blur(10px);
    /* 3D Border Effect */
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.15);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    border-right: 2px solid rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid rgba(0, 0, 0, 0.25);
    /* Remove default dropdown arrow and add custom one */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2340E0D0' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.security-select:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 5px 20px rgba(var(--accent-cyan-rgb), 0.1);
}

.security-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(var(--accent-cyan-rgb), 0.2);
}

.security-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Compression Option - Consistent with Security Option */
.compression-option {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 0, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 1rem 3rem 1rem; /* Extra bottom margin before input section */
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 0, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2rem); /* Match security section width */
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.compression-option:hover {
    border-color: rgba(255, 0, 255, 0.4);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 0, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Input Section - Match security section width and styling */
.input-section {
    margin-top: 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 1rem 2rem 1rem;
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2rem); /* Match security section width */
    box-sizing: border-box;
}

/* Ensure all dropdowns and inputs take full width of their containers */
.security-select,
.compression-select,
.enhanced-textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Override compression-wrapper max-width constraint */
.compression-wrapper {
    max-width: none !important; /* Override the 400px constraint */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Make compression select match security select styling */
.compression-select {
    background: var(--glass-bg-strong) !important;
    border: 2px solid var(--glass-border) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;

/* Security dropdown submenu item styling for visual indentation */
.security-select .submenu-item {
    padding-left: 2rem !important;
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
    font-style: italic !important;
}
    transition: all 0.3s ease !important;
    outline: none !important;
    backdrop-filter: blur(10px) !important;
    padding: 1rem !important;
    /* 3D Border Effect */
    box-shadow: 
        inset 2px 2px 4px rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.15) !important;
    border-top: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-left: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-right: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.25) !important;
    /* Remove default dropdown arrow and add custom one */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2340E0D0' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1rem !important;
    padding-right: 3rem !important;
}

.compression-select:hover {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 5px 20px rgba(var(--accent-cyan-rgb), 0.1) !important;
}

.compression-select:focus {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-cyan-rgb), 0.2) !important;
}

.compression-select option {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
}

/* Compression Info Panel - Stacked under dropdown */
.compression-info-panel {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compression-selection-help {
    background: rgba(var(--accent-cyan-rgb), 0.05);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 8px;
    padding: 0.75rem;
}

.help-quick-info {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.help-quick-info strong {
    color: var(--text-primary);
}

.help-item {
    white-space: nowrap;
}

.help-item strong {
    color: var(--accent-cyan);
}

/* Override any existing compression notice styles */
.compression-notice {
    background: rgba(255, 193, 7, 0.1) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    margin: 0 !important;
}

.notice-content {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
}

.notice-icon {
    flex-shrink: 0 !important;
}

.notice-close {
    margin-left: auto !important;
    background: none !important;
    border: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer !important;
    font-size: 1.2rem !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Security Help Panel Styling */
.security-help-panel {
    margin-top: 1rem;
    background: rgba(var(--accent-cyan-rgb), 0.05);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(5px);
}

.security-help-panel h3 {
    color: var(--accent-cyan);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.help-security-level {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--accent-cyan);
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-security-level strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.help-security-level:last-of-type {
    margin-bottom: 1.5rem;
}

.help-recommendation {
    background: rgba(var(--accent-gold-rgb), 0.08);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-recommendation strong {
    color: var(--accent-gold);
}

/* Security Info Panel - Stacked under dropdown like compression */
.security-info-panel {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.security-selection-help {
    background: rgba(var(--accent-cyan-rgb), 0.05);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.15);
    border-radius: 8px;
    padding: 0.75rem;
}

/* Security Information Card */
.security-info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 1rem 2rem 1rem;
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.security-info-content {
    margin-top: 1.5rem;
}

.security-info-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(var(--accent-cyan-rgb), 0.02);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--accent-cyan);
}

.security-info-section h3 {
    color: var(--accent-cyan);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.security-info-section p {
    margin: 0.75rem 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.security-info-section strong {
    color: var(--text-primary);
}

.security-recommendation {
    background: rgba(var(--accent-gold-rgb), 0.05);
    border: 1px solid rgba(var(--accent-gold-rgb), 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-gold);
}

.security-recommendation h3 {
    color: var(--accent-gold);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.security-recommendation ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.security-recommendation li {
    margin: 0.5rem 0;
}

.security-recommendation strong {
    color: var(--text-primary);
}

/* Security badge styling */
.security-badge {
    display: inline-block;
    background: var(--accent-cyan);
    color: #0f0f23;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Security description options indentation */
.security-description {
    font-size: 0.85rem !important;
    color: #888 !important;
    padding-left: 2rem !important;
    text-indent: 1rem !important;
}

/* Security Level Information Card */
.security-level-info-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 1rem 2rem 1rem;
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2rem);
    box-sizing: border-box;
}

.security-level-content {
    margin-top: 1.5rem;
}

.security-level-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(var(--accent-cyan-rgb), 0.02);
    border: 1px solid rgba(var(--accent-cyan-rgb), 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--accent-cyan);
}

.security-level-section h3 {
    color: var(--accent-cyan);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.security-level-section p {
    margin: 0.75rem 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.security-level-section strong {
    color: var(--text-primary);
}

/* File upload area should also match width */
.file-upload-area {
    width: 100%;
    max-width: none;
}
