/* =====================================================
   🌹 GÜL BAHÇESİ — Ana Tema (Küçük Prens Evreni)
   ===================================================== */

:root {
  --rose: #E8537C;
  --rose-soft: #F6B8CB;
  --rose-deep: #8B2B4A;
  --gold: #E8B86B;
  --gold-soft: #F4D9A8;
  --gold-deep: #8A6019;
  --sky: #2A3A7A;
  --sky-deep: #0F1635;
  --sky-night: #06092B;
  --star: #FFF4D6;
  --moon: #E8E4D0;
  --leaf: #6B8E5A;
  --fox: #D4724F;
  --paper: #F5EEDC;
  --ink: #2C2B3D;
}

html, body {
  font-family: 'Quicksand', system-ui, sans-serif;
  background: var(--sky-night);
  color: var(--paper);
  overflow-x: hidden;
}

.font-serif { font-family: 'Cormorant Garamond', 'Georgia', serif; }
.font-hand { font-family: 'Caveat', cursive; }
.font-sans { font-family: 'Quicksand', sans-serif; }

/* === GECE GÖKYÜZÜ === */
.bg-night {
  background:
    radial-gradient(ellipse 80% 50% at 20% 15%, rgba(232,184,107,0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 85%, rgba(232,83,124,0.06), transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(42,58,122,0.4), transparent 70%),
    linear-gradient(180deg, #06092B 0%, #0F1635 50%, #1A1B3E 100%);
}

/* === ANIMASYONLAR === */
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(8px, -5px) rotate(2deg); }
  50% { transform: translate(-4px, -10px) rotate(-1deg); }
  75% { transform: translate(-8px, 3px) rotate(1deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes pulse-rose {
  0%, 100% { box-shadow: 0 0 30px rgba(232,83,124,0.3); }
  50% { box-shadow: 0 0 60px rgba(232,83,124,0.6); }
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes bloom {
  0% { transform: scale(0.85) rotate(-5deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.animate-drift { animation: drift 8s ease-in-out infinite; }
.animate-twinkle { animation: twinkle 2s ease-in-out infinite; }
.animate-pulse-rose { animation: pulse-rose 3s ease-in-out infinite; }
.animate-float { animation: float-gentle 4s ease-in-out infinite; }
.animate-bloom { animation: bloom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* === KARTLAR === */
.card-glass {
  background: linear-gradient(145deg, rgba(245,238,220,0.07), rgba(245,238,220,0.03));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245,238,220,0.15);
  border-radius: 24px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
/* B8: Rol bazli hover border'lar - Tailwind utility'leri override etmek icin */
.card-glass-teacher:hover {
  border-color: rgba(141,210,168,0.65) !important;
  box-shadow: 0 12px 32px rgba(107,142,90,0.20);
}
.card-glass-parent:hover {
  border-color: rgba(240,153,123,0.65) !important;
  box-shadow: 0 12px 32px rgba(212,114,79,0.20);
}
.card-glass-student:hover {
  border-color: rgba(246,184,203,0.70) !important;
  box-shadow: 0 12px 32px rgba(232,83,124,0.22);
}

.card-paper {
  background: linear-gradient(160deg, #F5EEDC 0%, #EDE2C4 100%);
  color: var(--ink);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* === BUTONLAR === */
.btn-gold {
  background: linear-gradient(135deg, #E8B86B 0%, #D4A052 100%);
  color: #2C2B3D;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232,184,107,0.4);
}

.btn-rose {
  background: linear-gradient(135deg, #E8537C 0%, #D43E68 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  font-weight: 600;
}
.btn-rose:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(232,83,124,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(245,238,220,0.25);
  transition: all 0.3s ease;
}
.btn-ghost:hover {
  background: rgba(245,238,220,0.08);
  border-color: rgba(245,238,220,0.4);
}

/* === ÖZEL UNSURLAR === */
.divider-stars {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(245,238,220,0.4);
}
.divider-stars::before, .divider-stars::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,238,220,0.2), transparent);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(245,238,220,0.05); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--rose), var(--gold));
  border-radius: 4px;
}

/* === GEZEGEN === */
.planet-glow {
  background: radial-gradient(circle at 30% 30%,
    #F4D9A8 0%, #E8B86B 30%, #D4724F 60%, #8A6019 100%);
  border-radius: 50%;
  box-shadow:
    0 0 80px rgba(232,184,107,0.4),
    inset -20px -20px 40px rgba(0,0,0,0.3);
  position: relative;
}
.planet-glow::before {
  content: '';
  position: absolute;
  top: 15%;
  left: 25%;
  width: 30%;
  height: 12%;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  filter: blur(8px);
}

/* === MODAL === */
.modal-backdrop {
  background: rgba(6,9,43,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* === STAR FIELD === */
.star-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--star);
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.star.big {
  width: 3px;
  height: 3px;
  box-shadow: 0 0 6px rgba(255,244,214,0.8);
}

/* === ÖĞRENCİ KARTI === */
.student-card-bg {
  background: linear-gradient(145deg, rgba(245,238,220,0.95), rgba(237,226,196,0.95));
  border: 1px solid rgba(232,184,107,0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.student-card-bg:hover {
  transform: translateY(-4px);
  border-color: var(--rose);
  box-shadow: 0 15px 40px rgba(232,83,124,0.2);
}
.student-card-bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--gold), var(--leaf));
  opacity: 0.6;
}
.student-absent { opacity: 0.35; filter: grayscale(60%) sepia(20%); }
.student-late { background: linear-gradient(145deg, #FAEDC4, #F4D9A8) !important; }

/* === ROZET === */
.badge-stars {
  background: linear-gradient(135deg, #E8B86B, #D4A052);
  color: #4A2A0E;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(232,184,107,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}
.badge-rose {
  background: linear-gradient(135deg, #E8537C, #B92C5C);
  color: white;
  box-shadow: 0 4px 12px rgba(232,83,124,0.4);
}

/* === BAHÇE GRID === */
.garden-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
@media (max-width: 640px) {
  .garden-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 10px;
  }
}

/* === SIDEBAR === */
.sidebar-night {
  background: linear-gradient(180deg, rgba(15,22,53,0.97) 0%, rgba(6,9,43,0.97) 100%);
  border-right: 1px solid rgba(232,184,107,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-item {
  transition: all 0.25s ease;
  border-left: 3px solid transparent;
}
.nav-item:hover {
  background: rgba(245,238,220,0.05);
  border-left-color: var(--gold);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(232,83,124,0.15), transparent);
  border-left-color: var(--rose);
  color: var(--rose-soft);
}

/* === TOAST === */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  padding: 16px 24px;
  border-radius: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(calc(100% + 40px));
  max-width: min(360px, calc(100vw - 48px));
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 90vw;
}
.toast.show { transform: translateX(0); }
.toast.success { background: linear-gradient(135deg, rgba(107,142,90,0.95), rgba(86,118,72,0.95)); color: white; }
.toast.error { background: linear-gradient(135deg, rgba(212,114,79,0.95), rgba(176,90,60,0.95)); color: white; }
.toast.info { background: linear-gradient(135deg, rgba(232,184,107,0.95), rgba(212,160,82,0.95)); color: #2C2B3D; }
.toast.rose { background: linear-gradient(135deg, rgba(232,83,124,0.95), rgba(180,60,90,0.95)); color: white; }

/* === MAĞAZA === */
.shop-item {
  background: linear-gradient(145deg, rgba(245,238,220,0.95), rgba(237,226,196,0.95));
  color: var(--ink);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.shop-item:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(232,184,107,0.25);
}
.shop-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.shop-item-icon {
  font-size: 56px;
  margin-bottom: 12px;
  display: inline-block;
  animation: float-gentle 3s ease-in-out infinite;
}

/* === DİL TOGGLE === */
.lang-toggle {
  display: inline-flex;
  background: rgba(245,238,220,0.08);
  border: 1px solid rgba(245,238,220,0.15);
  border-radius: 999px;
  padding: 3px;
  font-size: 12px;
  font-weight: 600;
}
.lang-toggle a, .lang-toggle button {
  padding: 4px 12px;
  border-radius: 999px;
  color: rgba(245,238,220,0.6);
  transition: all 0.3s;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.lang-toggle a.active, .lang-toggle button.active {
  background: linear-gradient(135deg, var(--gold), #D4A052);
  color: #2C2B3D;
}

/* === MOBİL SIDEBAR === */
@media (max-width: 1023px) {
  #sidebar {
    position: fixed;
    height: 100%;
    width: 200px;
    max-width: 65vw;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 50;
    top: 0;
    left: 0;
  }
  #sidebar.open { transform: translateX(0); }
}

/* === AVATAR === */
.avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-soft), var(--gold-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(232,184,107,0.3);
}
@media (max-width: 640px) {
  .avatar-circle { width: 56px; height: 56px; font-size: 30px; border-width: 2px; }
}

/* === CATEGORY PILL === */
.cat-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(245,238,220,0.2);
  background: rgba(245,238,220,0.05);
  color: rgba(245,238,220,0.7);
  cursor: pointer;
  transition: all 0.2s;
}
.cat-pill.active {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: white;
  border-color: var(--rose);
}

/* === STUDENT SHELL === */
.student-shell {
  background:
    radial-gradient(ellipse 50% 60% at 50% 20%, rgba(232,184,107,0.15), transparent 70%),
    linear-gradient(180deg, #06092B 0%, #1A1B3E 100%);
  min-height: 100vh;
  padding: 24px;
}

/* =====================================================
   B-613 GERÇEKÇİ ASTEROID GEZEGEN
   ===================================================== */

.planet-wrapper {
  width: 280px;
  height: 320px;
  position: relative;
  display: block;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .planet-wrapper { width: 220px; height: 250px; }
}

.planet-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 20px 50px rgba(232,184,107,0.25));
  overflow: visible;
}

/* Tüm animasyonlar artık SVG <animate> ile yapılıyor */

/* =====================================================
   PORTAL BUTONLARI (rol bazlı renkler)
   ===================================================== */

.btn-portal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  font-family: 'Quicksand', sans-serif;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-portal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-portal:hover::before { transform: translateX(100%); }
.btn-portal:hover { transform: translateY(-2px); }

.btn-portal-teacher {
  background: linear-gradient(135deg, #6B8E5A 0%, #4A6B3E 100%);
  color: #F5EEDC;
  border-color: rgba(141,210,168,0.4);
  box-shadow: 0 6px 20px rgba(107,142,90,0.3);
}
.btn-portal-teacher:hover {
  box-shadow: 0 10px 30px rgba(107,142,90,0.5);
  border-color: rgba(141,210,168,0.7);
}

.btn-portal-parent {
  background: linear-gradient(135deg, #D4724F 0%, #B05A38 100%);
  color: #FFF5E8;
  border-color: rgba(240,153,123,0.4);
  box-shadow: 0 6px 20px rgba(212,114,79,0.3);
}
.btn-portal-parent:hover {
  box-shadow: 0 10px 30px rgba(212,114,79,0.5);
  border-color: rgba(240,153,123,0.7);
}

.btn-portal-student {
  background: linear-gradient(135deg, #E8537C 0%, #B92C5C 100%);
  color: #FFFFFF;
  border-color: rgba(246,184,203,0.4);
  box-shadow: 0 6px 20px rgba(232,83,124,0.3);
}
.btn-portal-student:hover {
  box-shadow: 0 10px 30px rgba(232,83,124,0.5);
  border-color: rgba(246,184,203,0.7);
}
