:root {
  --primary-color: #00d4ff;
  --primary-hover: #00b8e6;
  --secondary-color: #8b5cf6;
  --accent-color: #ff6b6b;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --border-color: #27272a;
  --error-color: #ef4444;
  --success-color: #22c55e;
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
  --gradient-secondary: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 100%);
  --gradient-dark: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #111111 100%);
  --gradient-card: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(26, 26, 26, 0.6) 100%);
  --glow-primary: 0 0 20px rgba(0, 212, 255, 0.3);
  --glow-secondary: 0 0 20px rgba(139, 92, 246, 0.3);
  --glass-bg: rgba(17, 17, 17, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Floating NFT Background */
.floating-nfts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-nft {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  opacity: 0.1;
  animation: float 20s infinite linear;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.floating-nft:hover {
  opacity: 0.3;
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.floating-nft:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.floating-nft:nth-child(2) {
  top: 20%;
  right: 15%;
  animation-delay: -5s;
  animation-duration: 30s;
  animation-direction: reverse;
}

.floating-nft:nth-child(3) {
  top: 40%;
  left: 5%;
  animation-delay: -10s;
  animation-duration: 35s;
}

.floating-nft:nth-child(4) {
  top: 60%;
  right: 20%;
  animation-delay: -15s;
  animation-duration: 28s;
  animation-direction: reverse;
}

.floating-nft:nth-child(5) {
  top: 80%;
  left: 20%;
  animation-delay: -20s;
  animation-duration: 32s;
}

.floating-nft:nth-child(6) {
  top: 30%;
  right: 5%;
  animation-delay: -25s;
  animation-duration: 26s;
  animation-direction: reverse;
}

.floating-nft:nth-child(7) {
  top: 50%;
  left: 15%;
  animation-delay: -30s;
  animation-duration: 38s;
}

.floating-nft:nth-child(8) {
  top: 70%;
  right: 10%;
  animation-delay: -35s;
  animation-duration: 24s;
  animation-direction: reverse;
}

.floating-nft:nth-child(9) {
  top: 15%;
  left: 50%;
  animation-delay: -40s;
  animation-duration: 33s;
}

.floating-nft:nth-child(10) {
  top: 85%;
  right: 40%;
  animation-delay: -45s;
  animation-duration: 29s;
  animation-direction: reverse;
}

@keyframes float {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) translateX(10px) rotate(2deg);
  }
  50% {
    transform: translateY(-10px) translateX(-5px) rotate(-1deg);
  }
  75% {
    transform: translateY(-30px) translateX(15px) rotate(1deg);
  }
  100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--bg-secondary);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
  box-shadow: var(--glow-primary);
}

.loading-spinner.cooking {
  border-top-color: var(--accent-color);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.loading-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.navbar:hover::before {
  opacity: 1;
}

.nav-brand {
  height: 40px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.nav-brand:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.5));
}

.nav-text {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Main Container */
.main-container {
  padding-top: 80px;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  padding-right: 2rem;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.1); }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.05);
}

/* Form Card */
.form-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: rotate(45deg);
}

.form-card:hover::before {
  opacity: 1;
  animation: shimmer 2s infinite;
}

.form-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 35px 60px -12px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(0, 212, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.label-text {
  font-size: 0.95rem;
}

.label-badge {
  background: var(--gradient-primary);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

#pname, .form-select {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#pname:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow:
    0 0 0 3px rgba(0, 212, 255, 0.1),
    var(--glow-primary);
  background: rgba(0, 0, 0, 0.8);
}

#pname::placeholder {
  color: var(--text-muted);
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

#custom_width, #custom_height {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#custom_width:focus, #custom_height:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow:
    0 0 0 3px rgba(0, 212, 255, 0.1),
    var(--glow-primary);
  background: rgba(0, 0, 0, 0.8);
}

/* Primary Button */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 40px -12px rgba(0, 212, 255, 0.4),
    var(--glow-primary);
}

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

.btn-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(26, 26, 26, 0.8);
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 212, 255, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Alert Styles */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #86efac;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

/* Flash Messages */
.flash-messages {
  margin-bottom: 1.5rem;
}

/* Preview Section */
.preview-section {
  padding: 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  text-align: center;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* iPhone Preview Styles */
.iphone-container {
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iphone-x {
  position: relative;
  width: 300px;
  height: 600px;
  background: var(--bg-secondary);
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  box-shadow:
    0 0 0 8px #0a0a0a,
    0 0 0 10px #050505,
    0 0 0 15px #000000,
    0 25px 50px -12px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(0, 212, 255, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.iphone-x:hover {
  transform: scale(1.02);
  box-shadow:
    0 0 0 8px #0a0a0a,
    0 0 0 10px #050505,
    0 0 0 15px #000000,
    0 30px 60px -12px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(0, 212, 255, 0.3);
}

.iphone-x::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 25px;
  background: #0a0a0a;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.iphone-x::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: #f2f2f2;
  border-radius: 2px;
  z-index: 10;
}

.iphone-x i {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 20%;
  height: 6px;
  background: #000000;
  border-radius: 3px;
  z-index: 15;
}

.iphone-x b {
  position: absolute;
  top: 4px;
  right: 20%;
  width: 10px;
  height: 10px;
  background: #000000;
  border-radius: 50%;
  z-index: 15;
}

.iphone-x b::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 6px;
  height: 6px;
  background: #00d4ff;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.iphone-x s {
  position: absolute;
  top: 40px;
  width: 100%;
  text-align: center;
  font-size: 2rem;
  color: white;
  text-decoration: none;
  z-index: 15;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Create Page Styles */
.create-body {
  padding: 2rem 0;
  min-height: calc(100vh - 80px);
}

.nft-info {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.nft-info-details {
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.art-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text-primary);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.img-container {
  margin-bottom: 2rem;
}

.src-img {
  max-width: 300px;
  width: 100%;
  border-radius: 16px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 212, 255, 0.2);
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
}

.src-img:hover {
  transform: scale(1.05);
  box-shadow:
    0 30px 60px -12px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(0, 212, 255, 0.3);
}

/* Wallpaper Info Styles */
.wallpaper-info {
  margin-bottom: 2rem;
}

.info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.info-card:hover::before {
  transform: scaleX(1);
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 15px 40px -5px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 212, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.info-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.info-item:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--glass-border);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.1);
}

.info-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.info-value {
  font-weight: 600;
  color: var(--text-primary);
}

.button-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn-a {
  text-decoration: none;
  flex: 1;
  max-width: 200px;
}

.btn {
  padding: 0.75rem 2rem;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow:
    0 10px 30px -5px rgba(0, 212, 255, 0.3),
    var(--glow-primary);
}

.btn-download {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-download:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow:
    0 15px 35px -5px rgba(0, 212, 255, 0.4),
    var(--glow-primary);
}

.btn-home {
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

.btn-home:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow:
    0 10px 30px -5px rgba(255, 107, 107, 0.3),
    0 0 20px rgba(255, 107, 107, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .navbar {
    padding: 1rem;
  }

  .iphone-x {
    width: 250px;
    height: 500px;
  }

  .button-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-a {
    max-width: none;
  }

  .btn {
    width: 100%;
  }

  .art-title {
    font-size: 2rem;
  }

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

  .info-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .preview-section {
    padding: 1rem;
  }

  .nft-info {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .hero-content {
    padding-right: 0;
    margin-bottom: 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .form-card {
    padding: 1rem;
  }

  .iphone-x {
    width: 200px;
    height: 400px;
  }

  .art-title {
    font-size: 1.5rem;
  }

  .src-img {
    max-width: 250px;
  }

  .info-card {
    padding: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}