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

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

.container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 100%;
  padding: 40px;
}

.logo {
  text-align: center;
  color: #667eea;
  font-size: 2.5em;
  margin-bottom: 30px;
  font-weight: 700;
}

.section {
  animation: fadeIn 0.5s ease-in;
}

.hidden {
  display: none !important;
}

h2 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5em;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.url-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
  transition: border-color 0.3s;
}

.url-input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-create {
  padding: 14px 28px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
  white-space: nowrap;
}

.btn-create:hover {
  background: #5568d3;
  transform: translateY(-1px);
}

.btn-create:active {
  transform: translateY(0);
}

.generated-link {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.generated-link p {
  margin-bottom: 10px;
  font-weight: 600;
  color: #666;
}

.link-box {
  display: flex;
  gap: 10px;
}

.link-box input {
  flex: 1;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95em;
  background: white;
}

.btn-copy {
  padding: 12px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-copy:hover {
  background: #218838;
}

.info-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-top: 30px;
}

.info-section h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.info-section p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.info-section ul {
  list-style-position: inside;
  color: #666;
  line-height: 1.8;
  margin-left: 10px;
}

.link-preview {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
  text-align: center;
}

.preview-label {
  font-size: 1.1em;
  color: #666;
  margin-bottom: 15px;
}

.preview-url {
  background: white;
  padding: 15px;
  border-radius: 8px;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  color: #667eea;
  font-weight: 600;
  font-size: 1.1em;
  border: 2px solid #667eea;
}

.btn-open {
  width: 100%;
  padding: 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.3em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
  margin-bottom: 20px;
}

.btn-open:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(40, 167, 69, 0.3);
}

.btn-open:active {
  transform: translateY(0);
}

.warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.warning p {
  color: #856404;
  margin: 0;
  font-size: 0.95em;
}

.fallback-message {
  background: #fff3cd;
  border: 2px solid #ffc107;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 20px;
  animation: slideDown 0.3s ease-out;
}

.fallback-message p {
  margin: 0 0 10px 0;
  color: #856404;
  font-weight: 600;
  font-size: 1.1em;
}

.fallback-subtext {
  font-size: 0.9em !important;
  font-weight: 400 !important;
  margin-bottom: 15px !important;
}

.btn-copy-fallback {
  padding: 12px 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1em;
}

.btn-copy-fallback:hover {
  background: #5568d3;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (orientation: portrait) {
  body {
    padding: 0;
  }

  .container {
    padding: 25px 15px;
    border-radius: 0;
  }
  
  .logo {
    font-size: 2em;
  }
  
  .input-group {
    flex-direction: column;
  }
  
  .link-box {
    flex-direction: column;
  }
}
