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

body {
  font-family:
    "Poppins",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #f0f4ff;
  color: #333;
}

/* Header */
.main-header {
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo h1 {
  font-size: 28px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo h1 i {
  background: none;
  -webkit-text-fill-color: #f5576c;
}

.logo span {
  font-size: 10px;
  color: #999;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.membership-badge {
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.membership-badge.free {
  background: #e8f4f8;
  color: #3498db;
}

.membership-badge.premium {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: white;
}

.user-menu {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 30px;
  background: #f0f0f0;
}

.user-menu i {
  font-size: 20px;
  color: #f5576c;
}

.logout-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 120px;
  margin-top: 8px;
  z-index: 10;
}

.logout-dropdown button {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  cursor: pointer;
  color: #e74c3c;
}

.login-trigger {
  padding: 8px 20px;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
}

/* Hero Banner KiddStory */
.kiddstory-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 40px;
  border-radius: 0;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  color: white;
}

.hero-text h1 {
  font-size: 48px;
  margin-bottom: 15px;
}

.hero-text .highlight {
  color: #f1c40f;
}

.hero-text p {
  font-size: 18px;
  margin-bottom: 20px;
}

.hero-features {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-features span {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
}

.hero-image {
  flex: 0 0 250px;
}

.hero-image img {
  width: 100%;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Feature Cards - Blok 2 */
.feature-cards {
  padding: 60px 20px;
  background: white;
}

.cards-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.feature-card {
  background: linear-gradient(135deg, #fff, #f8f9fa);
  border-radius: 30px;
  padding: 40px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.coloring-card {
  border-bottom: 5px solid #3498db;
}

.story-card {
  border-bottom: 5px solid #e74c3c;
}

.card-icon {
  font-size: 60px;
  margin-bottom: 20px;
}

.coloring-card .card-icon {
  color: #3498db;
}
.story-card .card-icon {
  color: #e74c3c;
}

.feature-card h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}

.feature-card p {
  color: #666;
  margin-bottom: 20px;
}

.card-preview {
  margin: 20px 0;
}

.card-preview img {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  object-fit: cover;
}

.card-btn {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.card-btn:hover {
  transform: scale(1.05);
}

/* Cartoon Gallery - Blok 3 */
.cartoon-gallery {
  padding: 60px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.section-title {
  text-align: center;
  font-size: 36px;
  color: #333;
  margin-bottom: 40px;
}

.gallery-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.cartoon-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cartoon-card:hover {
  transform: translateY(-5px);
}

.cartoon-card img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
  background: #f0f0f0;
}

.cartoon-card h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.cartoon-card p {
  font-size: 12px;
  color: #999;
}

/* Footer */
.main-footer {
  background: #1a1a2e;
  color: white;
  padding: 50px 20px 20px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 15px;
}

.footer-col p {
  margin-bottom: 10px;
  font-size: 14px;
  opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================
   LOGIN MODAL - KIDDSTORY STYLE
   ========================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  font-family: "Poppins", sans-serif;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
  border-radius: 32px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.9) translateY(-30px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Scrollbar untuk modal */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #f5576c;
  border-radius: 10px;
}

.close {
  position: absolute;
  right: 18px;
  top: 18px;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  background: rgba(0, 0, 0, 0.05);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
}

.close:hover {
  color: #f5576c;
  background: rgba(245, 87, 108, 0.1);
  transform: rotate(90deg);
}

.modal-header {
  text-align: center;
  padding: 40px 20px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 32px 32px 0 0;
  color: white;
}

.modal-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.modal-header h2 i {
  font-size: 32px;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 50%;
}

.modal-header p {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 8px;
}

/* Form Group */
.form-group {
  margin-bottom: 20px;
  padding: 0 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 14px;
}

.form-group label i {
  margin-right: 8px;
  color: #f5576c;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-size: 15px;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s;
  background: white;
}

.form-group input:focus {
  outline: none;
  border-color: #f5576c;
  box-shadow: 0 0 0 3px rgba(245, 87, 108, 0.1);
}

/* Button Primary */
.btn-primary {
  width: calc(100% - 48px);
  margin: 10px 24px 20px;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 40px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

/* Divider */
.divider {
  text-align: center;
  padding: 20px;
  color: #999;
  position: relative;
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ddd, transparent);
}

.divider::before {
  left: 5%;
}

.divider::after {
  right: 5%;
}

/* Google Button */
.btn-google {
  width: calc(100% - 48px);
  margin: 0 24px 20px;
  padding: 12px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s;
  font-family: "Poppins", sans-serif;
  color: #555;
}

.btn-google i {
  font-size: 20px;
  color: #db4437;
}

.btn-google:hover {
  border-color: #db4437;
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(219, 68, 55, 0.2);
}

/* Modal Footer */
.modal-footer {
  text-align: center;
  padding: 20px 24px 30px;
  border-top: 1px solid #f0f0f0;
  background: #fafafa;
  border-radius: 0 0 32px 32px;
}

.modal-footer p {
  font-size: 14px;
  color: #666;
}

.modal-footer a {
  color: #f5576c;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s;
}

.modal-footer a:hover {
  color: #667eea;
  text-decoration: underline;
}

/* Register Content khusus */
.register-content .modal-header {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.register-content .btn-primary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Upgrade Modal khusus */
.upgrade-content {
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.upgrade-header .mascot-premium img {
  width: 100px;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.upgrade-header h2 {
  color: #f1c40f;
  font-size: 28px;
  margin-bottom: 10px;
}

.upgrade-header h2 i {
  margin-right: 10px;
}

.upgrade-features {
  text-align: left;
  margin: 30px 0;
  background: #f8f9fa;
  border-radius: 20px;
  padding: 20px;
}

.upgrade-features .feature {
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eee;
  font-weight: 500;
}

.upgrade-features .feature:last-child {
  border-bottom: none;
}

.upgrade-features .feature i {
  width: 32px;
  font-size: 20px;
  color: #f1c40f;
}

.btn-upgrade {
  background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%);
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  font-size: 16px;
  transition: all 0.3s;
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(241, 196, 15, 0.3);
}

.upgrade-note {
  font-size: 11px;
  color: #999;
  margin-top: 15px;
}

/* Alert/Error message styling */
.error-message {
  background: #fee2e2;
  color: #e74c3c;
  padding: 10px 16px;
  border-radius: 12px;
  margin: 10px 24px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.success-message {
  background: #d4edda;
  color: #27ae60;
  padding: 10px 16px;
  border-radius: 12px;
  margin: 10px 24px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Loading spinner for buttons */
.btn-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.btn-loading i {
  animation: spin 1s linear infinite;
}

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

/* Responsive untuk modal */
@media (max-width: 480px) {
  .modal-header h2 {
    font-size: 22px;
  }

  .modal-header h2 i {
    font-size: 24px;
    padding: 8px;
  }

  .form-group {
    padding: 0 20px;
  }

  .btn-primary {
    width: calc(100% - 40px);
    margin: 10px 20px 20px;
  }

  .btn-google {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
  }

  .upgrade-features .feature {
    font-size: 14px;
  }
}

/* Animasi tambahan untuk modal */
.modal.show {
  display: flex;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Styling untuk select dan option di form */
select.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-size: 15px;
  font-family: "Poppins", sans-serif;
  background: white;
  cursor: pointer;
}

select.form-control:focus {
  outline: none;
  border-color: #f5576c;
}

/* Password strength indicator */
.password-strength {
  margin-top: 8px;
  font-size: 11px;
}

.password-strength.weak {
  color: #e74c3c;
}
.password-strength.medium {
  color: #f39c12;
}
.password-strength.strong {
  color: #27ae60;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 32px;
  }
  .hero-features {
    justify-content: center;
  }
  .cards-wrapper {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-title {
    font-size: 28px;
  }
}

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

.modal-content {
  background: white;
  border-radius: 24px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

.upgrade-content {
  text-align: center;
  padding: 30px;
}

.upgrade-header .mascot-premium img {
  width: 100px;
  margin-bottom: 20px;
}

.upgrade-features {
  text-align: left;
  margin: 20px 0;
}

.upgrade-features .feature {
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #eee;
}

.feature i {
  width: 30px;
  color: #f1c40f;
}

.btn-upgrade {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
}

.upgrade-note {
  font-size: 11px;
  color: #999;
  margin-top: 15px;
}

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