/* ============================================
   Secret Santa Application - Styles
   ============================================ */

/* ============================================
   Google Fonts
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Color Palette */
  --color-primary: #2777FF;
  --color-primary-light: #5294FF;
  --color-primary-dark: #1A5FDB;
  --color-secondary: #10B981;
  --color-secondary-light: #34D399;
  --color-accent: #F59E0B;

  /* Neutral Colors - Light Theme */
  --color-bg-main: #FFFFFF;
  --color-bg-card: #F9FAFB;
  --color-bg-input: #F3F4F6;
  --color-text-primary: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #9CA3AF;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2777FF 0%, #5294FF 100%);
  --gradient-secondary: linear-gradient(135deg, #10B981 0%, #34D399 100%);
  --gradient-bg: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Typography */
  --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(39, 119, 255, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 400ms ease-in-out;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: url('../assets/bg.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 2rem);
  color: #2777FF;
  margin-bottom: var(--spacing-lg);
  max-width: 630px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text-primary);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-text-primary);
}

p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-md);
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg) var(--spacing-md) 0;
  position: relative;
  overflow: hidden;
}

/* Animated background particles */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(39, 119, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite;
  z-index: 0;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.hero-text {
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text h1 {
  margin-bottom: var(--spacing-sm);
}

.hero-text p {
  margin: 0 0 var(--spacing-sm);
  font-size: 1rem;
}

.hero-text h2 {
  color: #2777FF;
  font-size: 28px;
  margin-top: var(--spacing-md);
}

.hero-text-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  align-items: start;
  margin-top: var(--spacing-lg);
  text-align: center;
}

.hero-text-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-dates-box {
  position: fixed;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-card);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  width: calc(100% - var(--spacing-lg) * 2);
  max-width: 1400px;
  z-index: 100;
}

.hero-dates-box h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.hero-dates-box p {
  font-size: 14px;
  margin-bottom: 0;
}

.dates-title {
  color: #2777FF;
  font-weight: 700;
  font-size: 14px;
}

.hero-text ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.hero-text li {
  margin-bottom: var(--spacing-sm);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: end;
}

.hero-image-container {
  display: flex;
  align-items: flex-end;
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition: transform var(--transition-slow);
}

.hero-image:hover {
  transform: scale(1.02) rotate(1deg);
}

/* ============================================
   Form Styles
   ============================================ */
.form-card {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  padding-bottom: 120px;
  box-shadow: none;
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-card h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

label {
  display: block;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--color-bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(39, 119, 255, 0.1);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: var(--color-text-muted);
}

/* Select specific styles */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232777FF' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-sm) center;
  padding-right: calc(var(--spacing-md) + 24px);
}

select option {
  background: var(--color-bg-main);
  color: var(--color-text-primary);
  padding: var(--spacing-sm);
}

/* Flag Selector */
.flag-selector {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.flag-option {
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
}

.flag-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.flag-emoji {
  display: block;
  font-size: 3rem;
  line-height: 1;
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  background: var(--color-bg-input);
  border: 3px solid transparent;
  transition: all var(--transition-base);
  filter: grayscale(0.5) opacity(0.6);
}

.flag-option:hover .flag-emoji {
  transform: scale(1.1);
  filter: grayscale(0) opacity(0.9);
  background: var(--color-bg-card);
}

.flag-option input[type="radio"]:checked+.flag-emoji {
  filter: grayscale(0) opacity(1);
  border-color: var(--color-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(39, 119, 255, 0.1), var(--shadow-lg);
  transform: scale(1.05);
  animation: flagPulse 0.4s ease-out;
}

@keyframes flagPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1.05);
  }
}

/* Password Helper Text */
.password-helper {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
  padding: var(--spacing-sm);
  background: #FFFFFF;
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

/* ============================================
   Current Image Section
   ============================================ */
.current-image-section {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: var(--spacing-xl);
  box-shadow: none;
}

.current-image-section h3 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.current-image-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: var(--spacing-lg);
  align-items: center;
  background: var(--color-bg-input);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
}

.current-image-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.current-image-info {
  flex: 1;
}

.current-image-info p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

.current-image-info strong {
  color: var(--color-text-primary);
}

.info-message {
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
  background: rgba(39, 119, 255, 0.05);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   Buttons
   ============================================ */
.button-group {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.btn {
  flex: 1;
  padding: var(--spacing-md) var(--spacing-lg);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-delete {
  background: linear-gradient(135deg, hsl(0, 70%, 50%) 0%, hsl(0, 70%, 40%) 100%);
  color: white;
  box-shadow: var(--shadow-md);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 0.95rem;
}

.btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 20px hsla(0, 70%, 50%, 0.3);
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   Dashboard Styles
   ============================================ */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.dashboard-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.dashboard-header h1 {
  font-weight: 300;
  max-width: none;
}

.dashboard-header h1 #userName {
  font-weight: 500;
}

.upload-section {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-2xl);
  box-shadow: var(--shadow-lg);
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.upload-column-left {
  display: flex;
  flex-direction: column;
}

.upload-column-right {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.file-input-wrapper {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.file-input-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-xl);
  background: var(--color-bg-input);
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.file-input-label:hover {
  background: var(--color-bg-card);
  border-color: var(--color-primary-light);
  transform: scale(1.02);
}

.file-input-label.drag-over {
  background: rgba(39, 119, 255, 0.1);
  border-color: var(--color-primary);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(39, 119, 255, 0.2);
}

.file-input-label svg {
  width: 2rem;
  height: 2rem;
  color: var(--color-primary);
}

input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.file-preview {
  padding: var(--spacing-md);
  background: var(--color-bg-input);
  border-radius: var(--radius-md);
  border: 1px solid #E5E7EB;
}

.file-preview img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-sm);
}

.file-preview-info {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ============================================
   Your Gift Section (Highlighted)
   ============================================ */
.your-gift-section {
  margin-bottom: var(--spacing-2xl);
  padding: var(--spacing-xl);
  background: linear-gradient(135deg, hsla(355, 78%, 56%, 0.1) 0%, hsla(43, 96%, 56%, 0.1) 100%);
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.your-gift-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.your-gift-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-sm);
}

.your-gift-container {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-xl);
}

.your-gift-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px hsla(355, 78%, 56%, 0.2);
  transition: all var(--transition-base);
  max-width: 500px;
  width: 100%;
  animation: fadeInScale 0.6s ease-out;
  cursor: pointer;
  position: relative;
}

.your-gift-card::after {
  content: '🔍 Clic para abrir';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 5;
}

.your-gift-card:hover::after {
  opacity: 1;
}

.your-gift-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 0 60px hsla(355, 78%, 56%, 0.4);
}

.your-gift-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.your-gift-card-info {
  padding: var(--spacing-xl);
  text-align: center;
}

.your-gift-card-info .gift-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-xs);
}

.your-gift-card-info .gift-sender {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-light);
  font-family: var(--font-display);
}

/* ============================================
   Image Grid
   ============================================ */
.gallery-section {
  margin-top: var(--spacing-2xl);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.image-card {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  animation: fadeInScale 0.5s ease-out backwards;
  cursor: pointer;
  position: relative;
}

.image-card::after {
  content: '🔍 Clic para abrir';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 5;
}

.image-card:hover::after {
  opacity: 1;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.image-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.image-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.image-card-info {
  padding: var(--spacing-md);
}

.image-card-recipient {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-primary-light);
  margin-bottom: var(--spacing-xs);
}

.image-card-uploader {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Locked Image Card */
.image-card-locked {
  position: relative;
  cursor: not-allowed !important;
}

.image-card-locked::after {
  display: none !important;
}

.image-card-locked img.blurred {
  filter: blur(20px);
  opacity: 0.3;
}

.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 10;
  border-radius: var(--radius-lg);
}

.locked-content {
  text-align: center;
  padding: var(--spacing-lg);
  max-width: 90%;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.locked-content h4 {
  color: var(--color-primary-light);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  font-family: var(--font-display);
}

.locked-content p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* User's Own Uploaded Image */
.image-card-mine {
  position: relative;
  border: 2px solid var(--color-accent);
  box-shadow: var(--shadow-lg), 0 0 30px hsla(43, 96%, 56%, 0.3);
  animation: subtleGlow 3s ease-in-out infinite;
}

@keyframes subtleGlow {

  0%,
  100% {
    box-shadow: var(--shadow-lg), 0 0 30px hsla(43, 96%, 56%, 0.3);
  }

  50% {
    box-shadow: var(--shadow-lg), 0 0 40px hsla(43, 96%, 56%, 0.5);
  }
}

.image-card-mine:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-lg), 0 0 50px hsla(43, 96%, 56%, 0.6);
}

.my-photo-badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  background: linear-gradient(135deg, var(--color-accent), hsl(43, 96%, 46%));
  color: var(--color-bg-main);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
  box-shadow: var(--shadow-md);
  animation: fadeInScale 0.5s ease-out;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h3 {
  color: var(--color-primary-light);
  margin-bottom: var(--spacing-md);
  font-size: 1.5rem;
}

.modal-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  font-size: 1.125rem;
}

.modal-buttons {
  display: flex;
  gap: var(--spacing-md);
}

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

/* ============================================
   Loading & States
   ============================================ */
.loading {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-gallery {
  display: inline-block;
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(39, 119, 255, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
}

.alert-success {
  background: hsla(142, 71%, 45%, 0.2);
  border-left: 4px solid var(--color-secondary);
  color: var(--color-secondary-light);
}

.alert-error {
  background: hsla(355, 78%, 56%, 0.2);
  border-left: 4px solid var(--color-primary);
  color: var(--color-primary-light);
}

.hidden {
  display: none !important;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero-text {
    text-align: center;
  }

  .button-group {
    flex-direction: column;
  }

  .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
  }

  .current-image-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .current-image-card img {
    margin: 0 auto;
  }
}

/* Mobile Layout for Hero Section */
@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero-text p {
    font-size: 0.95rem;
  }

  .hero-text-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero-text-main {
    text-align: center;
  }

  .hero-text-main h1,
  .hero-text-main h2,
  .hero-text-main p {
    margin-left: auto;
    margin-right: auto;
  }

  .form-card {
    padding: var(--spacing-md);
  }

  .flag-emoji {
    font-size: 2.5rem;
    padding: var(--spacing-xs);
  }

  .upload-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

@media (max-width: 640px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
  }

  .form-card {
    padding: var(--spacing-lg);
  }

  .radio-group {
    flex-direction: column;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: var(--spacing-xs);
}

.mt-2 {
  margin-top: var(--spacing-sm);
}

.mt-3 {
  margin-top: var(--spacing-md);
}

.mt-4 {
  margin-top: var(--spacing-lg);
}

.mb-1 {
  margin-bottom: var(--spacing-xs);
}

.mb-2 {
  margin-bottom: var(--spacing-sm);
}

.mb-3 {
  margin-bottom: var(--spacing-md);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}