/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: transparent;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  margin: 0;
  /* Remove default body margin */
}

/* Header styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
}

.logo {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 400;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.affiliate-link {
  text-decoration: none;
  color: #000;
  font-size: clamp(16px, 2vw, 25px);
  font-weight: 400;
}

.app-store-button img {
  height: 40px;
}

/* Hero section */
.hero-section {
  display: flex;
  align-items: flex-start;
  position: relative;
  min-height: 100vh;
  padding: 2rem 0 2rem 4rem;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.left-column {
  width: 43.7%;
  flex: 0 0 43.7%; /* Fixed width - doesn't grow or shrink */
  display: flex;
  flex-direction: column;
  padding-right: 2rem;
  box-sizing: border-box;
}
.hero-content {
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.2;
  white-space: nowrap;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-content p {
  font-size: clamp(20px, 2.5vw, 30px);
  color: #000;
  font-weight: 400;
}

.phone-mockup {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 532px;
  min-width: 300px;
}

.phone-mockup img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Floating image (vision-board-panel) */
.floating-images {
  width: 56.3%;
  flex: 0 0 56.3%; /* Fixed width - doesn't grow or shrink */
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.floating-images img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px 0 0 20px;
  object-fit: cover;
}

/* ----- Medium Screen Behavior ----- */
/* Freeze the vision-board-panel width at 700px so that further viewport narrowing clips its right side */
@media (max-width: 1400px) {
  .floating-images {
    flex: 0 0 700px;
  }
}

/* ----- Small Screen Behavior ----- */
/* When the available space would show less than 30% (~210px) of the frozen panel,
     switch to column layout so the vision-board-panel moves below the left column */
@media (max-width: 1000px) {
  .hero-section {
    flex-direction: column;
    align-items: center;
    padding: 2rem;
  }

  .left-column {
    width: 100%;
    flex: 0 0 100%;
    margin-right: 0;
    margin-bottom: 2rem;
    padding-right: 0;
  }

  .floating-images {
    width: 100%;
    flex: 0 0 100%;
  }
}

/* Background circles */
.background-circles {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: -1;
  background-color: white;
}

.circle-1 {
  position: absolute;
  top: -40vh;
  left: -40vw;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: linear-gradient(to bottom right, rgba(215, 214, 247, 0.5) 75%, rgb(255, 255, 255) 60%);
  filter: blur(60px);
}

.circle-2 {
  position: absolute;
  bottom: -65vh;
  right: -131vw;
  width: 262vw;
  height: 262vw;
  border-radius: 50%;
  background: linear-gradient(to bottom right, rgba(226, 243, 249, 0.5) 7%, rgba(215, 214, 247, 0.5) 96%);
  filter: blur(80px);
}

.circle-3 {
  position: absolute;
  top: -19vh;
  right: -38vw;
  width: 88vw;
  height: 88vw;
  border-radius: 50%;
  background-color: rgba(222, 252, 250, 0.8);
  filter: blur(80px);
}

.circle-4 {
  position: absolute;
  top: 12vh;
  right: -15vw;
  width: 43vw;
  height: 43vw;
  border-radius: 50%;
  background-color: rgba(226, 212, 255, 0.9);
  filter: blur(80px);
}

.circle-5 {
  position: absolute;
  left: 13vw;
  bottom: -30vh;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background-color: rgba(255, 232, 249, 0.6);
  filter: blur(80px);
}

.circle-6 {
  position: absolute;
  left: -15vw;
  bottom: 17vh;
  width: 30vw;
  height: 30vw;
  border-radius: 50%;
  background-color: rgba(230, 255, 250, 0.7);
  filter: blur(80px);
}

/* Popup styles */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: white;
  padding: 2rem 3rem;
  border-radius: 15px;
  position: relative;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(16px, 2vw, 20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.close-popup:hover {
  color: #000;
}

/* Auth form styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 300px;
}

.auth-form h2 {
  font-size: 24px;
  font-weight: 500;
  color: #333;
  text-align: center;
}

.auth-form input {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
}

.auth-form button {
  padding: 12px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-form button:hover {
  background: #0056b3;
}

.auth-form p {
  text-align: center;
  font-size: 14px;
}

.auth-form a {
  color: #007AFF;
  text-decoration: none;
}

.auth-form a:hover {
  text-decoration: underline;
}

#dashboardContent {
  min-width: 300px;
  max-width: 500px;
}

.dashboard-stats {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.stat-item {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-item strong {
  color: #007AFF;
}

/* Dashboard Styles */
.dashboard {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.referral-link {
  margin-bottom: 2rem;
}

.link-box {
  display: flex;
  gap: 1rem;
}

.link-box input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

button {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

.popup ul {
  text-align: left;
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.popup ul li {
  margin: 0.5rem 0;
}

#codeCreationPopup .popup-content {
  max-width: 500px;
}

#codeCreationForm input {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.error-message {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 14px;
  text-align: center;
}

.form-field {
  margin-bottom: 1rem;
}

.form-field input {
  width: 100%;
}

.button-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.button-container button {
  min-width: 120px;
}

.code-input-container {
  margin: 20px 0;
}

.code-input-container input {
  width: 100%;
  padding: 15px;
  border: 1px solid #e1e1e1;
  border-radius: 10px;
  font-size: 16px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.code-input-container input:focus {
  outline: none;
  border-color: #007AFF;
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.button-wrapper {
  margin-top: 20px;
  text-align: center;
}

#codeCreationForm button {
  background: url('assets/button-bg.png') no-repeat center;
  background-size: cover;
  color: black;
  font-weight: 500;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 100%;
  max-width: 300px;
}

#codeCreationForm button:hover {
  transform: translateY(-1px);
}

.language-selector {
  margin-right: 1rem;
}

#languageToggle {
  background: none;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 5px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

#languageToggle:hover {
  background: #f5f5f5;
}

.separator {
  margin: 0 5px;
  color: #999;
}

.current-lang {
  font-weight: 500;
}

.other-lang {
  color: #666;
}