* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Language Selector */
.language-selector {
  position: absolute;
  top: 15px;
  right: 15px;
}

.flag-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: background 0.2s;
}

.flag-btn:hover {
  background: #f0f0f0;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
  margin-top: 5px;
}

.lang-dropdown button {
  display: block;
  width: 100%;
  padding: 12px 15px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.lang-dropdown button:hover {
  background: #f5f5f5;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 8px;
  font-size: 2rem;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.tab {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #667eea;
  background: transparent;
  color: #667eea;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab:hover {
  background: rgba(102, 126, 234, 0.1);
}

.tab.active {
  background: #667eea;
  color: white;
}

.form {
  display: none;
}

.form.active {
  display: block;
}

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

label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

input, select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #333;
  margin-top: 15px;
}

.btn-secondary:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.qr-result {
  margin-top: 30px;
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #e1e1e1;
}

.qr-result.hidden {
  display: none;
}

.qr-result h2 {
  color: #333;
  margin-bottom: 20px;
}

#qr-image {
  max-width: 300px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.qr-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.qr-buttons .btn {
  margin: 0;
}

@media (max-width: 500px) {
  .container {
    padding: 25px;
  }
  
  .tabs {
    flex-direction: column;
  }
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  color: #333;
  margin-bottom: 8px;
  text-align: center;
}

.modal-subtitle {
  color: #666;
  text-align: center;
  margin-bottom: 25px;
  font-size: 14px;
}

.modal-content textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}

.modal-content textarea:focus {
  outline: none;
  border-color: #667eea;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-buttons .btn {
  flex: 1;
}

.btn-cancel {
  background: #e1e1e1;
  color: #333;
}

.btn-cancel:hover {
  background: #d1d1d1;
  box-shadow: none;
  transform: none;
}

/* Mode Selector */
.mode-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  padding: 10px;
  background: #f5f7fa;
  border-radius: 12px;
}

.mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 15px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: #667eea;
}

.mode-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.mode-icon {
  font-size: 1.8rem;
}

.mode-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.mode-content {
  display: none;
}

.mode-content.active {
  display: block;
}

.mode-description {
  text-align: center;
  color: #666;
  margin-bottom: 25px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Form Sections (Accordion) */
.form-section {
  margin-bottom: 15px;
  border: 1px solid #e1e5eb;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background 0.2s;
}

.section-header:hover {
  background: #eef0f2;
}

.section-icon {
  font-size: 1.2rem;
}

.section-title {
  flex: 1;
  font-weight: 600;
  color: #333;
}

.section-toggle {
  color: #999;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.form-section.collapsed .section-toggle {
  transform: rotate(0deg);
}

.section-content {
  padding: 20px;
  border-top: 1px solid #e1e5eb;
}

.section-content.hidden {
  display: none;
}

/* Form Rows */
.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

/* Large Button */
.btn-large {
  width: 100%;
  padding: 18px;
  font-size: 1.1rem;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 500px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .mode-selector {
    gap: 10px;
  }
  
  .mode-btn {
    padding: 12px 8px;
  }
  
  .mode-icon {
    font-size: 1.5rem;
  }
  
  .mode-label {
    font-size: 0.8rem;
  }
}

/* Back Link */
.back-link {
  display: inline-block;
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.back-link:hover {
  color: #4CAF50;
}

/* Footer */
.site-footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #3498db;
  text-decoration: underline;
}

.footer-links .separator {
  color: #7f8c8d;
}

.footer-copyright {
  font-size: 0.9rem;
  color: #95a5a6;
  margin: 0;
}

@media (max-width: 500px) {
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .footer-links .separator {
    display: none;
  }
}

/* Ad Banner */
.ad-banner {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
}

.ad-banner ins {
  background: #f8f9fa;
  border-radius: 8px;
}
