@font-face{
    font-family: "MyCustomFont";
    src: url("../assets/fonts/Inconsolata-VariableFont_wdth\,wght.ttf");
}
:root {
  --color-bg: #0d0520;
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-hover: rgba(255, 255, 255, 0.1);
  --color-border: rgba(255, 255, 255, 0.15);
  --color-accent: #F57261;
  --color-text: #ffffff;
  --color-text-muted: rgba(200, 190, 220, 0.75);
  --color-error: #ff6b6b;
  --color-ticket-bg: linear-gradient(135deg, #1e0e3e 0%, #2a1055 100%);
  --font-base: clamp(14px, 2vw, 16px);
  --radius: 10px;
  --transition: 0.2s ease;
}

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'MyCustomFont';
  background-image:url("../assets/images/pattern-lines.svg") ,url("../assets/images/background-desktop.png");
  color: var(--color-text);
  font-size: var(--font-base);
  overflow-x: hidden;
}

body::after{
    content: url("../assets/images/pattern-squiggly-line-top.svg");
    position: fixed;
    top: 0;
    right: 0;
}
body::before{
    content: url("../assets/images/pattern-squiggly-line-bottom-desktop.svg");
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: -1;
}
.hidden {
  display: none !important;
}

/* ================================================
   BACKGROUND DECORATIVE SHAPES
   ================================================ */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(24px, 5vw, 60px) clamp(16px, 4vw, 24px);
}

.bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
}

.shape-1 {
  width: clamp(200px, 40vw, 500px);
  height: clamp(200px, 40vw, 500px);
  border: 2px solid rgba(245, 114, 97, 0.3);
  bottom: -10%;
  left: -8%;
  /* 
    border-radius مش متساوي → شكل بيضاوي مش دايرة
    ده أسلوب تصميم اسمه Organic Shapes
  */
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.shape-2 {
  width: clamp(150px, 25vw, 300px);
  height: clamp(200px, 30vw, 400px);
  border: 2px solid rgba(130, 80, 200, 0.4);
  top: -5%;
  right: -3%;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

/* ================================================
   LOGO HEADER
   ================================================ */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
  margin-bottom: clamp(24px, 5vw, 48px);
}

.logo span {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ================================================
   FORM CONTAINER
   ================================================
   max-width + width: 100% → responsive بشكل طبيعي
   يعني على الموبايل هياخد كل العرض
   وعلى الـ desktop مش هيتعدى الـ max-width
   ================================================ */
.form-container {
  width: 100%;
  max-width: 500px;
  z-index: 1;
  text-align: center;
}

.form-container h1 {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--color-text-muted);
  font-size: clamp(14px, 2vw, 16px);
  margin-bottom: clamp(24px, 4vw, 36px);
}

/* ================================================
   FIELD GROUP
   ================================================ */
.field-group {
  text-align: left;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: rgba(220, 215, 235, 0.9);
}

/* ================================================
   UPLOAD ZONE
   ================================================
   هي label مش div → عشان لما المستخدم يكليك عليها
   تفتح الـ file picker الخاص بالـ input المخفي
   ده بيسمى "Custom File Upload" pattern
   ================================================ */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 110px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  padding: 20px;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
}

/* 
  لما فيها صورة → نخلي الـ background الـ preview تاعته يملأ المنطقة
  ده بيتحكم فيه JS عن طريق إضافة class "has-image"
*/
.upload-zone.has-image {
  border-style: solid;
  border-color: rgba(245, 114, 97, 0.5);
  padding: 10px;
  min-height: 80px;
}

.upload-icon {
  width: 44px;
  height: 44px;
  background: rgba(245, 114, 97, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone p {
  color: var(--color-text-muted);
  font-size: 13px;
  text-align: center;
}

/* الصورة preview → مخفية في الأول، بتظهر لما المستخدم يختار صورة */
.preview-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(245, 114, 97, 0.5);
}

/* ده الـ input الحقيقي مخفي تماماً من الـ UI */
.hidden-input {
  display: none;
}

/* ================================================
   HINT & ERROR MESSAGES
   ================================================ */
.field-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 12px;
}

/* 
  error-msg → مخفية افتراضياً
  JS هيشيل الـ hidden class لما يلاقي error
  وهيضيفها تاني لما الـ input يبقى valid
*/
.error-msg {
  color: var(--color-error);
  font-size: 12px;
  margin-top: 6px;
}

/* ================================================
   TEXT INPUTS
   ================================================ */
.text-input {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--color-text);
  font-family: 'Inconsolata', monospace;
  font-size: 15px;
  transition: border-color var(--transition), background var(--transition);
}

.text-input::placeholder {
  color: rgba(180, 170, 200, 0.4);
}

/* 
  :focus → لما المستخدم يكون جوه الـ input
  outline: none → بنشيل الـ default blue outline
  وبنضيف border-color أحلى
*/
.text-input:focus {
  outline: none;
  border-color: rgba(245, 114, 97, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

/* 
  لما الـ input فيه error → بنضيف class "input-error" من JS
  ده بيغير لون البـ border عشان المستخدم يشوف المشكلة
*/
.text-input.input-error {
  border-color: var(--color-error);
}

/* ================================================
   GENERATE BUTTON
   ================================================ */
.generate-btn {
  width: 100%;
  background: var(--color-accent);
  color: #1a0a2e;
  border: none;
  border-radius: var(--radius);
  padding: clamp(12px, 2vw, 16px);
  font-family: 'Inconsolata', monospace;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  /* 
    transition على أكثر من property → بيعمل animation سلسة على كلهم
    الفاصلة بتفصل كل property
  */
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.generate-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 114, 97, 0.35);
}

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

/* ================================================
   TICKET PAGE
   ================================================ */
.ticket-container {
  width: 100%;
  max-width: 600px;
  z-index: 1;
  text-align: center;
}

.congrats-title {
    font-family: 'MyCustomFont';
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.accent {
  color: var(--color-accent);
}

.congrats-subtitle {
  color: var(--color-text-muted);
  font-size: clamp(14px, 2vw, 16px);
  margin-bottom: clamp(32px, 6vw, 56px);
  line-height: 1.6;
}

/* ================================================
   TICKET CARD
   ================================================

   */
.ticket-card {

  position: relative;
  animation: fadeSlideUp 0.5s ease both;
  -webkit-animation: fadeSlideUp 0.5s ease both;
}

/* الـ notch اليسارية والـ يمينية للـ ticket shape */
.ticket-card::before {
  left: -10px;
}
.ticket-card::after {
  right: -10px;
}
.ticket-card .teckit-shcem{
    width: 450px;
}

/* ================================================
   TICKET LEFT SECTION
   ================================================ */
.ticket-left {
  flex: 1;
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: absolute;
  top: 0;
  left: 50px;
}

.ticket-header {

}

.ticket-conf-name {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ticket-date {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.ticket-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticket-avatar-wrap {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
  background: rgba(245, 114, 97, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-initials {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-accent);
}

.ticket-full-name {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 700;
}

.ticket-github {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ================================================
   TICKET STUB (الجزء اليميني بالرقم)
   ================================================ */
.ticket-stub {
  width: clamp(50px, 8vw, 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  flex-shrink: 0;
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%) ;
  -webkit-transform: translateY(-50%) ;
  -moz-transform: translateY(-50%) ;
  -ms-transform: translateY(-50%) ;
  -o-transform: translateY(-50%) ;
}

.ticket-num {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(200, 185, 230, 0.5);
}

/* ================================================
   ANIMATIONS
   ================================================
   @keyframes بتعرف الـ animation خطوة بخطوة
   from → الحالة الأولية
   to → الحالة النهائية
   
   fadeSlideUp: العنصر بييجي من تحت ومش مرئي → لفوق ومرئي
   ================================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet → أقل من 768px */
@media (max-width: 768px) {
  .ticket-card {
    /* على الموبايل نخلي الـ overflow: hidden عشان الـ notches ما يبانوش غلط */
    border-radius: 12px;
  }

  .ticket-stub {
    width: 45px;
  }
}

/* Mobile → أقل من 480px */
@media (max-width: 480px) {
  .ticket-card::before,
  .ticket-card::after {
    width: 16px;
    height: 16px;
  }

  .ticket-card::before {
    left: -8px;
  }

  .ticket-card::after {
    right: -8px;
  }
}