:root {
  --primary: #2563eb;
  --dark: #121826;
  --light: #f8f9fa;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --placeholder: #6b7280;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--dark);
  color: var(--light);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 99vh;
  line-height: 1.6;
}
    
.container {
  overflow-y: auto; 
  overflow-x: hidden;
  max-height: 95vh; 
  width: 100%;
  max-width: 500px;
  background: #1e293b;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #2d3748;
}

.container::-webkit-scrollbar {
  width: 8px;
}

.container::-webkit-scrollbar-track {
  background: #2d3748;
  border-radius: 10px;
}

.container::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 10px;
}


.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #2d3748;
  border-radius: 12px;
  min-height: 200px; 
}
    
    h1 {
      text-align: center;
      margin-bottom: 1.5rem;
      color: var(--primary);
      font-weight: 600;
    }
    
    .input-group {
      display: flex;
      margin-bottom: 1.5rem;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    input {
      flex: 1;
      padding: 12px 15px;
      border: none;
      font-size: 1rem;
      background: #2d3748;
      color: var(--light);
    }
    
    input:focus {
      outline: none;
      background: #374151;
    }
    
    button {
      padding: 12px 20px;
      background-color: var(--primary);
      border: none;
      color: white;
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.3s ease;
    }
    
    button:hover {
      opacity: 0.9;
    }
    
    .option-group {
      margin-bottom: 1.5rem;
      position: relative;
    }
    
    label {
      display: block;
      margin-bottom: 0.5rem;
      color: var(--gray);
      font-size: 0.9rem;
    }
    
    .size-input-container {
      position: relative;
    }
    
    .size-input {
      width: 100%;
      padding: 12px 15px;
      border-radius: 6px;
      border: 1px solid #3e4a61;
      background: #2d3748;
      color: var(--light);
      font-size: 1rem;
    }
    
    .size-input.empty::placeholder {
      color: var(--placeholder);
    }
    
    .size-hint {
      position: absolute;
      left: 15px;
      top: 12px;
      color: var(--placeholder);
      pointer-events: none;
      font-size: 1rem;
    }
    
    .size-input:focus + .size-hint,
    .size-input:not(:placeholder-shown) + .size-hint {
      display: none;
    }
    
    .max-size-info {
      font-size: 0.8rem;
      color: var(--gray);
      margin-top: 5px;
      text-align: right;
    }
    
    .qr-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 1.5rem 0;
      padding: 1.5rem;
      background: #2d3748;
      border-radius: 12px;
    }
    
#qr-code {
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  background: var(--dark); 
}

.light-theme #qr-code {
  background: #ffffff;
}

#qr-code p {
  color: var(--light);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
    
    .download-options {
      display: flex;
      gap: 10px;
      width: 100%;
      margin-top: 1rem;
    }
    
    .download-btn {
      flex: 1;
      padding: 10px;
      border-radius: 6px;
      border: none;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.3s ease;
    }
    
    .download-btn:hover {
      opacity: 0.9;
    }
    
    .png-btn {
      background: var(--primary);
      color: white;
    }
    
    .jpg-btn {
      background: #e63946;
      color: white;
    }
    
    .jpeg-btn {
      background: #2a9d8f;
      color: white;
    }
    
    .error {
      color: #dc3545;
      text-align: center;
      margin: 1rem 0;
      font-size: 0.9rem;
    }
    
    @media (max-width: 600px) {
      .container {
        margin: 1rem;
        padding: 1.5rem;
      }
      
      .download-options {
        flex-direction: column;
      }
    }

.github-btn {
  position: fixed;
  top: 20px;
  right: 30px;
  background: #333;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.github-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  background: #444;
}

.github-btn i {
  font-size: 1.2rem;
}

@media (max-width: 600px) {
  .github-btn {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

div[style*="border: 1px solid rgb(255, 0, 0)"] {
  display: none !important;
}