/* Modern Registration Form Styles - Canvas Optimized (1200x680) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #002733 !important;
  min-height: 100vh;
  font-family: 'Fredoka', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  position: relative;
  overflow-x: hidden;
  /* Canvas optimization */
  width: 100vw;
  height: 100vh;
  color: #222;
}

/* --- שדרוג תצוגת דמות --- */
.character-preview {
  width: 260px;
  height: 420px;
  margin: 0 auto 32px;
  background: radial-gradient(circle at 60% 40%, #fff6b7 60%, #fcb69f 100%);
  border-radius: 32px;
  box-shadow: 0 8px 40px 0 #fcb69f55, 0 2px 12px #0002;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: box-shadow 0.3s, background 0.3s;
  animation: popIn 0.7s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes popIn {
  0% { transform: scale(0.7) translateY(40px); opacity: 0; }
  80% { transform: scale(1.08) translateY(-8px); opacity: 1; }
  100% { transform: scale(1) translateY(0); }
}

/* --- בועת תגובה קופצת --- */
.speech-bubble {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%) scale(0.7);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  color: #2c3e50;
  border-radius: 50px;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 2px solid #e8f4fd;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  max-width: none;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
  /* Cloud-like shape with multiple border-radius values */
  border-radius: 50px 50px 50px 50px / 60px 60px 40px 40px;
}

.speech-bubble.show {
  opacity: 1;
  animation: cloudBubblePop 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  transform: translateX(-50%) scale(1.05);
}

@keyframes cloudBubblePop {
  0% { 
    transform: translateX(-50%) scale(0.7) translateY(20px);
    opacity: 0;
  }
  50% { 
    transform: translateX(-50%) scale(1.15) translateY(-5px);
    opacity: 1;
  }
  80% { 
    transform: translateX(-50%) scale(0.98) translateY(2px);
  }
  100% { 
    transform: translateX(-50%) scale(1.05) translateY(0);
    opacity: 1;
  }
}

.speech-bubble::before {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 15px solid #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 13px solid #e8f4fd;
  z-index: -1;
}

/* --- שדרוג כפתורים --- */
.continue-btn {
  border-radius: 32px;
  font-size: 1.2rem;
  background: #002733;
  box-shadow: 0 4px 16px rgba(0, 39, 51, 0.3);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  color: #fff;
  font-weight: bold;
  animation: btnPulse 2.5s infinite;
  margin-bottom: 20px;
  margin-top: 20px;
  position: relative;
  z-index: 9999;
  width: 100%;
  max-width: 300px;
  padding: 14px 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(0, 39, 51, 0.3); }
  50% { box-shadow: 0 8px 32px rgba(0, 39, 51, 0.5); }
}

.continue-btn:hover:not(:disabled) {
  background: linear-gradient(90deg, #fcb69f 0%, #f5576c 100%);
  transform: scale(1.08);
  box-shadow: 0 12px 32px #f5576c55;
}

/* --- אנימציות מעבר בין שלבים --- */
.register-step.slide-in {
  animation: slideIn 0.5s forwards;
}
.register-step.slide-out {
  animation: slideOut 0.5s forwards;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(60px);}
  to { opacity: 1; transform: translateX(0);}
}
@keyframes slideOut {
  from { opacity: 1; transform: translateX(0);}
  to { opacity: 0; transform: translateX(-60px);}
}

/* --- רקע דינמי משודרג --- */
.bg-animated {
  display: none;
}

.register-main {
  width: 100%;
  max-width: 1200px;
  height: 680px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Canvas container */
  position: relative;
  overflow: hidden;
}

.register-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
  /* Canvas optimized dimensions */
  width: 100%;
  max-width: 1100px;
  height: 640px;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.register-header {
  background: transparent;
  padding: 20px 40px 0 40px;
  text-align: center;
  color: #fff;
  flex-shrink: 0;
}

.register-stepper {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 15px;
}

.step {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #002733;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 39, 51, 0.3);
}

.step.active {
  background: #004466;
  color: white;
  border-color: #006699;
  box-shadow: 0 4px 16px rgba(0, 39, 51, 0.5);
}

.step.completed {
  background: #002733;
  color: #fff;
  border-color: #43e97b;
}

.register-content {
  padding: 30px 40px 80px 40px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  margin-top: -30px;
}

.register-step {
  display: none !important;
  animation: fadeIn 0.5s ease-in;
  height: 100%;
  flex-direction: column;
  justify-content: flex-start;
  overflow: visible;
  padding-bottom: 60px;
  padding-top: 30px;
}

.register-step.active {
  display: flex !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.register-title {
  font-size: 1.7rem;
  font-weight: bold;
  color: #f5576c;
  text-align: center;
  margin-bottom: 25px;
  margin-top: 40px;
  line-height: 1.4;
  text-shadow: 0 2px 8px #fff8, 0 1px 0 #fcb69f44;
}

.skin-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 12px;
  margin-bottom: 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.skin-option {
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 6px;
  background: linear-gradient(135deg, #a1ffce 0%, #fbc2eb 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 80px;
  animation: skinBounce 0.7s;
}

@keyframes skinBounce {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.skin-option.selected {
  border-color: #f5576c;
  background: linear-gradient(135deg, #fff6b7 0%, #fcb69f 100%);
  box-shadow: 0 8px 20px #fcb69f55;
  transform: translateY(-2px) scale(1.05);
}

.skin-option img {
  width: 50px;
  height: 65px;
  border-radius: 8px;
  pointer-events: none;
  object-fit: contain;
}

.continue-btn:active:not(:disabled) {
  transform: translateY(0);
}

.continue-btn:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.continue-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.continue-btn:active::before {
  width: 300px;
  height: 300px;
}

/* Form Styles */
.details-form {
  display: none;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.details-form.active {
  display: flex;
  flex-direction: column;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.reg-input {
  width: 100%;
  min-width: 260px;
  max-width: 400px;
  box-sizing: border-box;
  margin-bottom: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  background: #f8f9fa;
  transition: border-color 0.2s;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.reg-input:focus {
  border-color: #f5576c;
  background: #fff;
}

.reg-input.error {
  border-color: #ff4757;
  background: #fff5f5;
}

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.reg-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #667eea;
  margin-top: 2px;
  flex-shrink: 0;
}

.success-screen {
  text-align: center;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
  animation: bounce 1s ease-in-out;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.success-message {
  font-size: 1.3rem;
  font-weight: bold;
  color: #4b3869;
  margin-bottom: 15px;
}

.success-coins {
  font-size: 1rem;
  color: #7c8aff;
  margin-bottom: 15px;
}

.success-redirect {
  color: #666;
  font-size: 0.85rem;
}

.verification-notice {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
}

.verification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.verification-text {
  color: #856404;
  font-size: 0.9rem;
  line-height: 1.4;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: #2ed573;
}

.toast.error {
  background: #ff4757;
}

.toast.info {
  background: #3742fa;
}

.toast.blocked {
  background: #e74c3c;
  border-left: 4px solid #c0392b;
}

.toast.delay {
  background: #f39c12;
  border-left: 4px solid #e67e22;
}

/* Responsive Design for Canvas */
@media (max-width: 1200px) {
  .register-main {
    max-width: 100vw;
    height: 100vh;
    padding: 10px;
  }
  
  .register-card {
    max-width: 95vw;
    height: 95vh;
  }
  
  .register-header {
    padding: 15px 30px;
  }
  
  .register-content {
    padding: 20px 30px;
  }
  
  .register-title {
    font-size: 1.4rem;
  }
  
  .skin-options {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
  }
  
  .skin-option {
    min-height: 70px;
  }
  
  .skin-option img {
    width: 45px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .register-main {
    padding: 5px;
  }
  
  .register-card {
    max-width: 98vw;
    height: 98vh;
  }
  
  .register-header {
    padding: 10px 20px;
  }
  
  .register-app-title {
    font-size: 1.8rem;
  }
  
  .register-stepper {
    gap: 8px;
  }
  
  .step {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;
  }
  
  .register-content {
    padding: 15px 20px;
  }
  
  .register-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }
  
  .character-preview {
    width: 100px;
    height: 130px;
    margin-bottom: 20px;
  }
  
  .character-preview canvas {
    width: 60px;
    height: 80px;
  }
  
  .skin-options {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
    gap: 8px;
  }
  
  .skin-option {
    min-height: 60px;
    padding: 4px;
  }
  
  .skin-option img {
    width: 40px;
    height: 55px;
  }
  
  .continue-btn {
    max-width: 250px;
    padding: 12px 0;
    font-size: 1rem;
  }
  
  .form-fields {
    gap: 12px;
  }
  
  .reg-input {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
  
  .terms-label {
    font-size: 0.85rem;
  }
  
  .success-icon {
    font-size: 3rem;
  }
  
  .success-message {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .register-stepper {
    gap: 6px;
  }
  
  .step {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
  
  .character-preview {
    width: 80px;
    height: 110px;
  }
  
  .character-preview canvas {
    width: 50px;
    height: 70px;
  }
  
  .skin-options {
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 6px;
  }
  
  .skin-option {
    min-height: 50px;
  }
  
  .skin-option img {
    width: 35px;
    height: 50px;
  }
  
  .continue-btn {
    max-width: 200px;
    padding: 10px 0;
    font-size: 0.95rem;
  }
  
  .register-title {
    font-size: 1.1rem;
  }
  
  .success-icon {
    font-size: 2.5rem;
  }
  
  .success-message {
    font-size: 1rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 680px) and (orientation: landscape) {
  .register-main {
    height: 100vh;
  }
  
  .register-card {
    height: 95vh;
  }
  
  .register-header {
    padding: 10px 30px;
  }
  
  .register-app-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }
  
  .register-stepper {
    margin-top: 10px;
  }
  
  .register-content {
    padding: 15px 30px;
  }
  
  .register-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }
  
  .character-preview {
    width: 90px;
    height: 120px;
    margin-bottom: 15px;
  }
  
  .skin-options {
    margin-bottom: 15px;
  }
  
  .continue-btn {
    padding: 10px 0;
    font-size: 1rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .register-card {
    border-radius: 20px;
  }
  
  .skin-option {
    border-radius: 10px;
  }
  
  .continue-btn {
    border-radius: 10px;
  }
  
  .reg-input {
    border-radius: 10px;
  }
}

.divider {
  position: relative;
  text-align: center;
  margin: 20px 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  background: #fff;
  padding: 0 15px;
  color: #666;
  font-size: 0.9rem;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.google-login-btn:hover {
  background: #f8f9fa;
  border-color: #4285f4;
  box-shadow: 0 4px 8px rgba(66,133,244,0.2);
  transform: translateY(-1px);
}

/* Google mode styles */
.google-info-display {
  background: linear-gradient(135deg, #fff6b7 0%, #fcb69f 100%);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.google-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.google-details h3 {
  color: #f5576c;
  margin: 0 0 5px 0;
  font-size: 1.2rem;
}

.google-details p {
  color: #666;
  margin: 0;
  font-size: 1rem;
} 