@import url("https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;700;800&display=swap");

:root {
  /* Colors */
  --neutral-0: hsl(0, 0%, 100%);
  --neutral-300: hsl(252, 6%, 83%);
  --neutral-500: hsl(245, 15%, 58%);
  --neutral-700: hsl(245, 19%, 35%);
  --neutral-900: hsl(248, 70%, 10%);

  --orange-500: hsl(7, 88%, 67%);
  --orange-700: hsl(7, 71%, 60%);

  /* Typography */
  --font-family: "Inconsolata", monospace;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--neutral-900);
  color: var(--neutral-0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./assets/images/background-mobile.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./assets/images/pattern-circle.svg");
  background-size: 800px;
  background-position: top right;
  background-repeat: no-repeat;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 900px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.logo {
  margin-bottom: 1rem;
}

.logo img {
  width: 200px;
  height: auto;
}

/* Form Section */
.form-section {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.form-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.form-header::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background-image: url("./assets/images/pattern-squiggly-line-top.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.3;
}

.form-header h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--orange-500), var(--neutral-0));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.form-header p {
  color: var(--neutral-300);
  font-size: 1rem;
  font-weight: 400;
}

/* Avatar Upload */
.avatar-upload-wrapper {
  margin-bottom: 2rem;
}

.avatar-upload-label {
  display: block;
  color: var(--neutral-0);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.avatar-upload-area {
  border: 2px dashed var(--neutral-500);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.avatar-upload-area:hover {
  border-color: var(--orange-500);
  background: rgba(255, 255, 255, 0.05);
}

.avatar-upload-area.focus {
  border-color: var(--orange-500);
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

.avatar-upload-area.error {
  border-color: var(--orange-500);
}

.upload-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  opacity: 0.7;
}

.avatar-upload-text {
  color: var(--neutral-300);
  font-size: 0.9rem;
  font-weight: 400;
}

.avatar-upload-text strong {
  color: var(--neutral-0);
  font-weight: 500;
}

.avatar-upload-hint {
  color: var(--neutral-500);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: block;
}

.avatar-preview {
  display: none;
  margin-top: 1rem;
  text-align: center;
}

.avatar-preview.active {
  display: block;
}

.avatar-preview img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 auto;
  border: 2px solid var(--neutral-500);
}

.avatar-preview-name {
  color: var(--neutral-300);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.change-photo-btn {
  background: transparent;
  color: var(--orange-500);
  border: none;
  padding: 0.5rem 1rem;
  font-family: var(--font-family);
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 0.5rem;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.change-photo-btn:hover {
  color: var(--orange-700);
}

input[type="file"] {
  display: none;
}

/* Form Fields */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  color: var(--neutral-0);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  color: var(--neutral-0);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--neutral-500);
}

.form-input:focus {
  outline: none;
  border-color: var(--orange-500);
  background: rgba(255, 255, 255, 0.08);
}

.form-input:hover {
  border-color: var(--neutral-500);
}

.form-input.error {
  border-color: var(--orange-500);
}

.error-message {
  color: var(--orange-500);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.error-message.active {
  display: flex;
}

.error-message::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-image: url("./assets/images/icon-info.svg");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1rem;
  background: var(--orange-500);
  color: var(--neutral-0);
  border: none;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.submit-btn:hover {
  background: var(--orange-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(243, 115, 102, 0.3);
}

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

/* Ticket Section */
.ticket-section {
  width: 100%;
  max-width: 700px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.ticket-section.active {
  display: flex;
}

.ticket-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.ticket-header h2 .user-name {
  background: linear-gradient(135deg, var(--orange-500), var(--neutral-0));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ticket-header p {
  color: var(--neutral-300);
  font-size: 1rem;
  line-height: 1.6;
}

.ticket-header .user-email {
  color: var(--orange-500);
}

/* Ticket Card */
.ticket-card {
  width: 100%;
  max-width: 550px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ticket-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("./assets/images/pattern-lines.svg");
  background-size: cover;
  background-position: center;
  opacity: 0.03;
  border-radius: 16px;
  pointer-events: none;
}

.ticket-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.ticket-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
}

.ticket-logo {
  display: flex;
  align-items: center;
}

.ticket-logo img {
  width: 50px;
  height: auto;
}

.ticket-info {
  flex: 1;
  text-align: left;
  min-width: 150px;
}

.ticket-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-0);
  margin-bottom: 0.35rem;
}

.ticket-info p {
  color: var(--neutral-500);
  font-size: 0.875rem;
}

.ticket-number {
  color: var(--neutral-500);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
  margin-left: auto;
}

.ticket-bottom {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ticket-avatar {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.ticket-user {
  flex: 1;
  text-align: left;
}

.ticket-user h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--neutral-0);
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.ticket-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--neutral-500);
  font-size: 0.875rem;
}

.ticket-github img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Attribution */
.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 2rem;
  color: var(--neutral-500);
}

.attribution a {
  color: var(--orange-500);
  text-decoration: none;
  transition: color 0.3s ease;
}

.attribution a:hover {
  color: var(--orange-700);
}

/* Responsive Design */
@media (min-width: 768px) {
  body::before {
    background-image: url("./assets/images/background-desktop.png");
  }

  .logo img {
    width: 250px;
  }

  .form-header h1 {
    font-size: 2.5rem;
  }

  .form-header p {
    font-size: 1.125rem;
  }

  .ticket-header h2 {
    font-size: 2.5rem;
  }

  .ticket-card {
    padding: 3rem 2.5rem;
  }

  .ticket-logo img {
    width: 60px;
  }

  .ticket-info h3 {
    font-size: 1.5rem;
  }

  .ticket-info p {
    font-size: 1rem;
  }

  .ticket-avatar {
    width: 90px;
    height: 90px;
  }

  .ticket-user h4 {
    font-size: 1.35rem;
  }

  .ticket-github {
    font-size: 1rem;
  }

  .ticket-github img {
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 3rem 2rem;
  }

  .form-section {
    padding: 3rem 2.5rem;
  }

  .ticket-avatar {
    width: 100px;
    height: 100px;
  }

  .ticket-user h4 {
    font-size: 1.5rem;
  }
}
