/* TeenyTiny.Art Styles */

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

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Utility Classes */
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  -webkit-touch-callout: none;
}

.cloud-bg {
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}

/* Font Base Classes */
.fredoka-base {
  font-family: "Fredoka", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

.baloo-2-base {
  font-family: "Baloo 2", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

/* Font Weight Classes */
.fredoka-light { font-weight: 300; }
.fredoka-regular { font-weight: 400; }
.fredoka-medium { font-weight: 500; }
.fredoka-semibold { font-weight: 600; }
.fredoka-bold { font-weight: 700; }

.baloo-2-regular { font-weight: 400; }
.baloo-2-medium { font-weight: 500; }
.baloo-2-semibold { font-weight: 600; }
.baloo-2-bold { font-weight: 700; }
.baloo-2-extrabold { font-weight: 800; }

/* Button Base Class */
.btn-primary {
  background: #2DB15B;
  box-shadow: 0px 5px 0px #179B4D;
  border-radius: 128px;
  border: none;
  cursor: pointer;
  transition: all 0.1s ease;
  transform: translateY(0px);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0px 6px 0px #179B4D;
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0px 2px 0px #179B4D;
}

/* Large Label Shared Styles */
.large-label {
  font-family: 'Baloo 2';
  font-style: normal;
  font-weight: 600;
  font-size: 64px;
  line-height: 103px;
  display: flex;
  align-items: center;
  text-align: center;
  color: #FFFFFF;
}

/* Main Layout */
.home {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  background: #00A9FF;
}

/* Fixed Background Container */
.home::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #00A9FF;
  z-index: -1;
}

/* Background Elements */
.hill {
  position: fixed;
  left: 0px;
  right: 0px;
  top: 60vh;
  bottom: 0px;
  /* Use the SVG strictly as a mask so the color fills the shape */
  -webkit-mask: url('assets/Hill.svg') no-repeat;
  -webkit-mask-size: cover;
  -webkit-mask-position: center bottom;
  mask: url('assets/Hill.svg') no-repeat;
  mask-size: cover;
  mask-position: center bottom;
  background-color: #FFC300;
  z-index: 1;
}

.cloud {
  position: fixed;
  z-index: 2;
}

.cloud-1 {
  width: 237px;
  height: 129px;
  left: 58px;
  top: 135px;
  background-image: url('assets/Cloud_1.svg');
}

.cloud-2 {
  width: 143px;
  height: 71px;
  left: calc(50% - 143px/2 - 126.5px);
  top: 99px;
  background-image: url('assets/Cloud_2.svg');
}

.cloud-3 {
  width: 276px;
  height: 144px;
  right: 13px;
  top: 112px;
  background-image: url('assets/Cloud_3.svg');
}

/* Header */
.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 32px;
  position: fixed;
  height: 167px;
  left: 0px;
  right: 0px;
  top: 0px;
  z-index: 10;
}

.coins {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 0px 16px 0px 16px;
  gap: 0px;
  height: 103px;
  flex: none;
  order: 0;
  flex-grow: 0;
  width: fit-content;
  overflow: hidden;
}

.coin {
  width: 78px;
  height: 78px;
  background: url('assets/Coin.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0px 3px 0px #F77E10);
  flex-shrink: 0;
  pointer-events: none;
}

.account {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 48px;
  gap: 32px;
  width: 320px;
  max-width: 40vw;
  height: 103px;
  flex: none;
  order: 1;
  flex-grow: 0;
}

.header .label {
  flex: none;
  flex-grow: 0;
}

.coins .label {
  width: auto;
  height: 103px;
  order: 1;
  margin-left: 32px;
  margin-right: 16px;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}

.account .label {
  width: 224px;
  height: 103px;
  order: 0;
  justify-content: center;
  text-align: center;
}

/* Content Container */
.content {
  position: relative;
  z-index: 5;
  padding-top: 167px; /* Header height */
  min-height: 100vh;
}

/* Main Panels */
.panels {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 32px;
  gap: 32px;
  width: 100%;
  min-height: calc(100vh - 167px); /* Full height minus header */
  transition: all 0.3s ease;
}

/* Responsive Layout */
.panels.vertical {
  flex-direction: column;
  padding: 16px;
  gap: 16px;
}

.panels.vertical .image-panel {
  order: 0;
}

.panels.vertical .prompt-panel {
  order: 1;
}

.prompt-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
  gap: 32px;
  width: 540px;
  max-width: calc(100vw - 64px);
  height: 550px;
  background: #FBF7EA;
  border-radius: 64px;
  flex: none;
  order: 0;
  flex-shrink: 0;
}

.panel-label {
  width: 100%;
  height: 70px;
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-size: 48px;
  line-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #4A3366;
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.textbox {
  box-sizing: border-box;
  width: 100%;
  height: 215px;
  background: #FFFFFF;
  border: 6px solid #EFE2CE;
  border-radius: 32px;
  flex: none;
  order: 1;
  align-self: stretch;
  flex-grow: 0;
  font-family: 'Fredoka';
  font-size: 24px;
  font-weight: 400;
  color: #4A3366;
  padding: 24px;
  resize: none;
  outline: none;
}

.textbox::placeholder {
  color: #A8A8A8;
  font-family: 'Fredoka';
  font-size: 24px;
  font-weight: 400;
}

.textbox:focus {
  border-color: #2DB15B;
}

.button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 0px 64px;
  gap: 10px;
  width: 345px;
  height: 103px;
  flex: none;
  order: 2;
  flex-grow: 0;
}

.button-label {
  height: 103px;
  justify-content: center;
  flex: 1;
  order: 0;
}

.image-panel {
  width: 540px;
  max-width: calc(100vw - 64px);
  height: 550px;
  background: #FBF7EA;
  border-radius: 64px;
  flex: none;
  order: 1;
  flex-shrink: 0;
  position: relative;
}

.generated-image {
  position: absolute;
  width: 476px;
  height: 486px;
  left: 32px;
  top: 32px;
  background: #F0E3D1;
  border-radius: 32px;
  object-fit: cover;
  object-position: center;
}

/* Mobile Responsive Styles */
@media (max-width: 1200px) {
  .panels {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  
  .panels .image-panel {
    order: 0;
  }
  
  .panels .prompt-panel {
    order: 1;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 16px;
    height: auto;
    min-height: 103px;
  }
  
  .content {
    padding-top: 135px; /* Reduced header height */
  }
  
  .large-label {
    font-size: 48px;
    line-height: 77px;
  }
  
  .panel-label {
    font-size: 36px;
    line-height: 52px;
    height: auto;
  }
  
  .prompt-panel, .image-panel {
    width: 100%;
    max-width: calc(100vw - 32px);
    height: auto;
    min-height: 400px;
  }
  
  .generated-image {
    position: relative;
    width: calc(100% - 64px);
    height: 300px;
    left: 32px;
    top: 32px;
    margin-bottom: 32px;
  }
}

/* Authentication Styles */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 167px);
  padding: 32px;
}

.auth-card {
  background: #FBF7EA;
  border-radius: 64px;
  padding: 48px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 10;
  position: relative;
}

.auth-card h1 {
  font-family: 'Fredoka';
  font-weight: 600;
  font-size: 48px;
  line-height: 60px;
  color: #4A3366;
  text-align: center;
  margin-bottom: 16px;
}

.auth-card p {
  font-family: 'Fredoka';
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
  color: #4A3366;
  text-align: center;
  margin-bottom: 32px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.auth-form.hidden {
  display: none;
}

.auth-form input {
  width: 100%;
  height: 56px;
  background: #FFFFFF;
  border: 3px solid #EFE2CE;
  border-radius: 16px;
  padding: 0 20px;
  font-family: 'Fredoka';
  font-size: 18px;
  font-weight: 400;
  color: #4A3366;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.auth-form input::placeholder {
  color: #A8A8A8;
  font-family: 'Fredoka';
  font-size: 18px;
  font-weight: 400;
}

.auth-form input:focus {
  border-color: #2DB15B;
}

.auth-form .button {
  width: 100%;
  max-width: none;
  height: 64px;
  margin: 8px 0;
}

.auth-form .button-label {
  font-size: 24px;
  line-height: 64px;
  height: 64px;
}

.auth-switch {
  font-family: 'Fredoka';
  font-size: 16px;
  font-weight: 400;
  color: #4A3366;
  text-align: center;
  margin: 8px 0 0 0;
}

.auth-switch a {
  color: #2DB15B;
  text-decoration: none;
  font-weight: 500;
}

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

.forgot-password {
  font-family: 'Fredoka';
  font-size: 16px;
  font-weight: 400;
  color: #4A3366;
  text-align: center;
  margin: 0;
}

.forgot-password a {
  color: #2DB15B;
  text-decoration: none;
  font-weight: 500;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.loading {
  text-align: center;
  padding: 32px;
}

.loading.hidden {
  display: none;
}

.loading p {
  font-family: 'Fredoka';
  font-size: 20px;
  font-weight: 500;
  color: #4A3366;
  margin: 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #2DB15B;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  margin: 0 auto 24px auto;
  font-weight: bold;
}

.auth-form h2, .auth-form h3 {
  font-family: 'Fredoka';
  font-weight: 600;
  color: #4A3366;
  text-align: center;
  margin: 0 0 16px 0;
}

.auth-form h2 {
  font-size: 32px;
  line-height: 40px;
}

.auth-form h3 {
  font-size: 28px;
  line-height: 36px;
}

.email-note {
  font-family: 'Fredoka';
  font-size: 14px;
  font-weight: 400;
  color: #6B7280;
  text-align: center;
  margin: 16px 0;
}

.email-note a {
  color: #2DB15B;
  text-decoration: none;
  font-weight: 500;
}

.email-note a:hover {
  text-decoration: underline;
}

/* Error Messages */
.error-message {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: #DC2626;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-family: 'Fredoka';
  font-size: 16px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 90vw;
  text-align: center;
}

.error-message.hidden {
  display: none;
}

.success-message {
  background: #2DB15B !important;
}

/* Secondary Button Style */
.btn-secondary {
  background: #6B7280;
  box-shadow: 0px 5px 0px #4B5563;
  border-radius: 128px;
  border: none;
  cursor: pointer;
  transition: all 0.1s ease;
  transform: translateY(0px);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0px 6px 0px #4B5563;
}

.btn-secondary:active {
  transform: translateY(3px);
  box-shadow: 0px 2px 0px #4B5563;
}

@media (max-width: 768px) {
  .auth-container {
    padding: 16px;
    min-height: calc(100vh - 135px);
  }
  
  .auth-card {
    padding: 32px 24px;
    border-radius: 32px;
  }
  
  .auth-card h1 {
    font-size: 36px;
    line-height: 45px;
  }
  
  .auth-card p {
    font-size: 18px;
    line-height: 24px;
  }
  
  .auth-form input {
    height: 52px;
    font-size: 16px;
  }
  
  .auth-form .button {
    height: 56px;
  }
  
  .auth-form .button-label {
    font-size: 20px;
    line-height: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 8px;
  }
  
  .account {
    max-width: 45vw;
    padding: 0px 8px;
  }
  
  .coins {
    padding: 0px 8px;
  }
  
  .large-label {
    font-size: 32px;
    line-height: 51px;
  }
  
  .panel-label {
    font-size: 28px;
    line-height: 40px;
  }
  
  .textbox {
    font-size: 18px;
    padding: 16px;
  }
  
  .button {
    width: 100%;
    max-width: 280px;
    padding: 0px 32px;
  }
  
  .auth-card {
    padding: 24px 16px;
  }
  
  .auth-card h1 {
    font-size: 28px;
    line-height: 36px;
  }
  
  .auth-card p {
    font-size: 16px;
    line-height: 22px;
  }
  
  .auth-form input {
    height: 48px;
    font-size: 16px;
    padding: 0 16px;
  }
  
  .auth-form .button {
    height: 52px;
  }
  
  .auth-form .button-label {
    font-size: 18px;
    line-height: 52px;
    height: 52px;
  }
}
