:root {
  --primary: #00a8ff;
  --secondary: #0097e6;
  --dark: #1e272e;
  --darker: #1a2228;
  --light: #f5f6fa;
  --nebula: linear-gradient(135deg, #182848, #4b6cb7, #4b79cf, #00a8ff);
  --blueprint: rgba(0, 168, 255, 0.15);
}

body {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  margin: 0;
  padding: 0;
  background: var(--dark);
  color: var(--light);
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 168, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(75, 108, 183, 0.1) 0%, transparent 20%),
    var(--nebula);
  background-attachment: fixed;
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: rgba(30, 39, 46, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(0, 168, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(0, 168, 255, 0.1),
    0 0 20px rgba(0, 168, 255, 0.2);
}

h1 {
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
  position: relative;
}

h1::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: var(--primary);
  margin: 0.5rem auto;
  box-shadow: 0 0 10px var(--primary);
}

p {
  text-align: center;
  color: rgba(245, 246, 250, 0.7);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.form-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

input[type="text"] {
  padding: 1rem;
  background: rgba(26, 34, 40, 0.7);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--light);
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 1px rgba(0, 168, 255, 0.1);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 
    0 0 0 2px rgba(0, 168, 255, 0.3),
    0 0 20px rgba(0, 168, 255, 0.2);
}

.format-type {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  justify-content: center;
}

.format-type label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: rgba(0, 168, 255, 0.1);
  border: 1px solid rgba(0, 168, 255, 0.2);
  transition: all 0.3s ease;
}

.format-type label:hover {
  background: rgba(0, 168, 255, 0.2);
}

.format-type input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.format-type input[type="radio"]:checked {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.format-selection {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.format-group {
  flex: 1;
}

.format-group h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

select {
  width: 100%;
  padding: 0.8rem;
  background: rgba(26, 34, 40, 0.7);
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--light);
  cursor: pointer;
  transition: all 0.3s ease;
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 
    0 0 0 2px rgba(0, 168, 255, 0.3),
    0 0 20px rgba(0, 168, 255, 0.2);
}

button {
  background: var(--primary);
  color: var(--light);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 
    0 4px 15px rgba(0, 168, 255, 0.4),
    0 0 0 1px rgba(0, 168, 255, 0.2);
}

button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 168, 255, 0.6),
    0 0 0 1px rgba(0, 168, 255, 0.3);
}

button:active {
  transform: translateY(0);
}

.result-container {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(26, 34, 40, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 168, 255, 0.2);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(0, 168, 255, 0.1);
}

.loading {
  text-align: center;
  color: var(--primary);
  font-size: 1.2rem;
  padding: 1rem;
  position: relative;
}

.loading::after {
  content: '...';
  position: absolute;
  animation: dots 1.5s infinite steps(3, end);
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

.success {
  color: var(--light);
}

.success h3 {
  color: var(--primary);
  margin-top: 0;
  font-size: 1.3rem;
}

.thumbnail {
  margin: 1.5rem 0;
  text-align: center;
}

.thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(0, 168, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.details {
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.details p {
  margin: 0;
  text-align: left;
  padding: 0.8rem;
  background: rgba(0, 168, 255, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.download-link {
  display: inline-block;
  background: var(--primary);
  color: var(--light);
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 600;
  margin-top: 1rem;
  box-shadow: 
    0 4px 15px rgba(0, 168, 255, 0.4),
    0 0 0 1px rgba(0, 168, 255, 0.2);
}

.download-link:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 168, 255, 0.6),
    0 0 0 1px rgba(0, 168, 255, 0.3);
}

.error {
  color: #ff6b6b;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.1);
  border-left: 3px solid #ff6b6b;
}

.error h3 {
  margin-top: 0;
}

/* Blueprint grid overlay effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 168, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .format-selection {
    flex-direction: column;
  }
}