/* ============================================
   DETEKTYWI GDYNI - Jasny Motyw Dla Dzieci
   "Słoneczna Przygoda" v2.0
   POPRAWIONA CZYTELNOŚĆ
   ============================================ */

/* === ZMIENNE CSS === */
:root {
  --color-primary: #E85D04;
  --color-primary-dark: #C44D00;
  --color-secondary: #00B4A0;
  --color-secondary-dark: #009688;
  --color-accent: #FFB703;
  --color-text-dark: #1A1A2E;
  --color-text-body: #2D3748;
  --color-bg-sky: #7EC8E3;
  --color-bg-light: #E3F6FF;
}

/* === GŁÓWNE TŁO === */
body.kids-theme {
  background: linear-gradient(180deg, #7EC8E3 0%, #B8E4F0 40%, #D4F1F9 70%, #E8F8FF 100%);
}

body.kids-theme .game-bg {
  background: linear-gradient(180deg, #7EC8E3 0%, #B8E4F0 40%, #D4F1F9 70%, #E8F8FF 100%);
}

/* Słońce - mniejsze, wyżej, nie blokuje tekstu */
body.kids-theme .game-bg::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #FFE97D 0%, #FFD93D 60%, #FFA500 100%);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(255, 200, 0, 0.5);
  z-index: 5;
  pointer-events: none;
}

/* Chmurki - delikatniejsze */
body.kids-theme .game-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30%;
  background-image: 
    url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg viewBox=0 0 200 60%3E%3Cellipse cx=40 cy=40 rx=35 ry=18 fill=rgba(255,255,255,0.5)/%3E%3Cellipse cx=70 cy=35 rx=28 ry=15 fill=rgba(255,255,255,0.5)/%3E%3Cellipse cx=55 cy=42 rx=25 ry=12 fill=rgba(255,255,255,0.6)/%3E%3C/svg%3E);
  background-position: 5% 30%;
  background-size: 150px 45px;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* === LOGO - WYSOKA CZYTELNOŚĆ === */
body.kids-theme .logo-title {
  color: #D84315 !important;
  text-shadow: 
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    3px 3px 6px rgba(0,0,0,0.3) !important;
  font-weight: 900 !important;
}

body.kids-theme .logo-subtitle {
  color: #00897B !important;
  text-shadow: 
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    2px 2px 4px rgba(0,0,0,0.2) !important;
  font-weight: 800 !important;
}

body.kids-theme .logo-badge {
  background: white !important;
  border: 4px solid #FFB703 !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

body.kids-theme .logo-badge-text {
  color: #D84315 !important;
  font-weight: 800 !important;
}

body.kids-theme .logo-badge-years {
  color: #00897B !important;
  font-weight: 700 !important;
}

/* === WSZYSTKIE TEKSTY - CIEMNE I CZYTELNE === */
body.kids-theme h1,
body.kids-theme h2,
body.kids-theme h3,
body.kids-theme .title,
body.kids-theme .card-title {
  color: #1A1A2E !important;
  text-shadow: none !important;
}

body.kids-theme p,
body.kids-theme span,
body.kids-theme div,
body.kids-theme label {
  color: #2D3748;
}

/* Tekst na kolorowym tle - biały z cieniem */
body.kids-theme .text-on-color,
body.kids-theme .hero-text {
  color: white !important;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4) !important;
}

/* === PRZYCISKI - ŻYWE KOLORY === */
body.kids-theme .btn-gold,
body.kids-theme button[class*=gold] {
  background: linear-gradient(180deg, #FF8A50 0%, #E85D04 50%, #D84315 100%) !important;
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
  border: none !important;
  box-shadow: 
    0 5px 0 #BF360C,
    0 8px 20px rgba(232, 93, 4, 0.4) !important;
}

body.kids-theme .btn-gold:active {
  transform: translateY(3px);
  box-shadow: 
    0 2px 0 #BF360C,
    0 4px 10px rgba(232, 93, 4, 0.3) !important;
}

body.kids-theme .btn-blue,
body.kids-theme button[class*=blue] {
  background: linear-gradient(180deg, #26A69A 0%, #00897B 50%, #00796B 100%) !important;
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3) !important;
  border: none !important;
  box-shadow: 
    0 5px 0 #004D40,
    0 8px 20px rgba(0, 137, 123, 0.4) !important;
}

/* === KARTY - BIAŁE Z CIENIEM === */
body.kids-theme .card,
body.kids-theme [class*=card] {
  background: white !important;
  border: 3px solid #E0E0E0 !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

body.kids-theme .card:hover {
  border-color: #00B4A0 !important;
}

/* Tekst w kartach */
body.kids-theme .card h1,
body.kids-theme .card h2,
body.kids-theme .card h3,
body.kids-theme .card p,
body.kids-theme .card span,
body.kids-theme .card div {
  color: #1A1A2E !important;
}

/* === FORMULARZE === */
body.kids-theme input[type=text],
body.kids-theme input[type=number],
body.kids-theme input[type=email],
body.kids-theme textarea,
body.kids-theme .input-field {
  background: white !important;
  border: 3px solid #BDBDBD !important;
  color: #1A1A2E !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
}

body.kids-theme input:focus,
body.kids-theme textarea:focus {
  border-color: #00B4A0 !important;
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(0, 180, 160, 0.2) !important;
}

body.kids-theme input::placeholder {
  color: #9E9E9E !important;
}

/* === NAGŁÓWKI SEKCJI === */
body.kids-theme .section-title,
body.kids-theme .screen-title {
  color: #D84315 !important;
  font-weight: 800 !important;
  text-shadow: 
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff !important;
}

/* === IKONY === */
body.kids-theme .icon,
body.kids-theme [class*=icon] {
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

/* === STACJE/BADGES === */
body.kids-theme .station-badge,
body.kids-theme [class*=station] {
  background: white !important;
  font-weight: 700 !important;
  border-width: 3px !important;
  color: inherit !important;
}

/* === PROGRESS BAR === */
body.kids-theme .progress-bar,
body.kids-theme [class*=progress] {
  background: #E0E0E0 !important;
  border-radius: 10px !important;
}

body.kids-theme .progress-fill,
body.kids-theme [class*=progress-fill],
body.kids-theme [class*=progress] > div {
  background: linear-gradient(90deg, #00B4A0, #E85D04) !important;
  border-radius: 10px !important;
}

/* === RANKING === */
body.kids-theme .ranking-item,
body.kids-theme [class*=ranking] li,
body.kids-theme [class*=ranking] > div {
  background: white !important;
  border: 2px solid #E0E0E0 !important;
  border-radius: 15px !important;
  margin: 8px 0 !important;
}

body.kids-theme .ranking-item:first-child,
body.kids-theme [class*=ranking] li:first-child {
  border-color: #FFD700 !important;
  background: linear-gradient(180deg, #FFFDE7 0%, white 100%) !important;
}

/* === PUNKTY/SCORE === */
body.kids-theme .score,
body.kids-theme .points,
body.kids-theme [class*=score],
body.kids-theme [class*=point] {
  color: #D84315 !important;
  font-weight: 900 !important;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.1) !important;
}

/* === MODAL === */
body.kids-theme .modal-overlay,
body.kids-theme [class*=modal-overlay],
body.kids-theme [class*=overlay] {
  background: rgba(0, 0, 0, 0.5) !important;
}

body.kids-theme .modal-content,
body.kids-theme .modal,
body.kids-theme [class*=modal]:not([class*=overlay]) {
  background: white !important;
  border-radius: 25px !important;
  border: 3px solid #00B4A0 !important;
}

/* === SCANNER === */
body.kids-theme .scanner-frame,
body.kids-theme [class*=scanner] {
  border: 4px solid #00B4A0 !important;
  border-radius: 20px !important;
}

/* === INFO/HINT BOXES === */
body.kids-theme .hint,
body.kids-theme .info,
body.kids-theme [class*=hint],
body.kids-theme [class*=info-box] {
  background: white !important;
  border-left: 4px solid #FFB703 !important;
  color: #2D3748 !important;
}

/* === EKRANY SUKCESU/BŁĘDU === */
body.kids-theme #screen-correct,
body.kids-theme .screen-success {
  background: linear-gradient(180deg, #A5D6A7 0%, #C8E6C9 50%, #E8F5E9 100%) !important;
}

body.kids-theme #screen-wrong,
body.kids-theme .screen-error {
  background: linear-gradient(180deg, #FFAB91 0%, #FFCCBC 50%, #FBE9E7 100%) !important;
}

/* === SKYLINE === */
body.kids-theme .skyline {
  opacity: 0.25 !important;
  filter: brightness(0.8) !important;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 400px) {
  body.kids-theme .logo-title {
    font-size: 32px !important;
  }
  
  body.kids-theme .logo-subtitle {
    font-size: 26px !important;
  }
  
  body.kids-theme .btn-gold,
  body.kids-theme .btn-blue {
    padding: 16px 24px !important;
    font-size: 18px !important;
  }
}

/* === ANIMACJE === */
@keyframes bounce-happy {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

body.kids-theme .bounce { animation: bounce-happy 0.5s ease 2; }
body.kids-theme .shake { animation: shake-gentle 0.3s ease 2; }

/* ============================================ */

/* === EKRAN BŁĘDNEJ ODPOWIEDZI - POPRAWIONA CZYTELNOŚĆ === */
body.kids-theme #screen-wrong,
body.kids-theme #screen-wrong .game-bg,
body.kids-theme .screen-wrong {
  background: linear-gradient(180deg, #FFCDD2 0%, #FFEBEE 50%, #FFF8F8 100%) !important;
}

/* Nagłówek NIESTETY, TO NIE TO */
body.kids-theme #screen-wrong h1,
body.kids-theme #screen-wrong h2,
body.kids-theme #screen-wrong .title {
  color: #C62828 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

/* Twoja odpowiedź - box */
body.kids-theme #screen-wrong .answer-box,
body.kids-theme #screen-wrong [class*="answer"],
body.kids-theme #screen-wrong .user-answer {
  background: #D32F2F !important;
  color: white !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 10px 20px !important;
}

/* Spróbuj jeszcze raz i inne teksty */
body.kids-theme #screen-wrong p,
body.kids-theme #screen-wrong span,
body.kids-theme #screen-wrong div {
  color: #5D4037 !important;
}

/* Wykorzystałeś X próby */
body.kids-theme #screen-wrong .attempts,
body.kids-theme #screen-wrong [class*="attempts"],
body.kids-theme #screen-wrong [class*="tries"] {
  color: #8D6E63 !important;
  font-weight: 600 !important;
}

/* Poprawna odpowiedź: XXX */
body.kids-theme #screen-wrong .correct-answer,
body.kids-theme #screen-wrong [class*="correct"] {
  color: #2E7D32 !important;
  font-weight: 700 !important;
}

/* Box ze wskazówką */
body.kids-theme #screen-wrong .hint-box,
body.kids-theme #screen-wrong [class*="hint"],
body.kids-theme #screen-wrong [class*="wskazowka"],
body.kids-theme #screen-wrong .next-hint {
  background: #FFF8E1 !important;
  border: 2px solid #FFB300 !important;
  border-radius: 15px !important;
  color: #5D4037 !important;
}

body.kids-theme #screen-wrong .hint-box p,
body.kids-theme #screen-wrong .hint-box span,
body.kids-theme #screen-wrong [class*="hint"] p {
  color: #4E342E !important;
}

/* === EKRAN POPRAWNEJ ODPOWIEDZI === */
body.kids-theme #screen-correct,
body.kids-theme #screen-correct .game-bg,
body.kids-theme .screen-correct {
  background: linear-gradient(180deg, #C8E6C9 0%, #E8F5E9 50%, #F1F8F1 100%) !important;
}

body.kids-theme #screen-correct h1,
body.kids-theme #screen-correct h2,
body.kids-theme #screen-correct .title {
  color: #2E7D32 !important;
  text-shadow: none !important;
  font-weight: 800 !important;
}

body.kids-theme #screen-correct p,
body.kids-theme #screen-correct span,
body.kids-theme #screen-correct div {
  color: #33691E !important;
}

/* Punkty zdobyte */
body.kids-theme #screen-correct .points,
body.kids-theme #screen-correct [class*="point"],
body.kids-theme #screen-correct .score {
  color: #1B5E20 !important;
  font-weight: 900 !important;
  font-size: 1.2em !important;
}

/* === EKRAN PYTANIA === */
body.kids-theme #screen-question p,
body.kids-theme #screen-question span,
body.kids-theme #screen-question div,
body.kids-theme #screen-question label {
  color: #2D3748 !important;
}

body.kids-theme #screen-question h1,
body.kids-theme #screen-question h2,
body.kids-theme #screen-question .question-title {
  color: #1A1A2E !important;
  font-weight: 800 !important;
}

/* Treść pytania */
body.kids-theme #screen-question .question-text,
body.kids-theme #screen-question [class*="question-text"] {
  color: #1A1A2E !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
}

/* Stacja/kategoria badge */
body.kids-theme .station-name,
body.kids-theme [class*="station"] {
  font-weight: 700 !important;
}

/* === WSZYSTKIE EKRANY - TEKST CZYTELNY === */
body.kids-theme .screen p,
body.kids-theme .screen span:not(.icon):not([class*="emoji"]) {
  color: #2D3748 !important;
}

body.kids-theme .screen h1,
body.kids-theme .screen h2,
body.kids-theme .screen h3 {
  color: #1A1A2E !important;
}

/* Emoji i ikony - bez zmian koloru */
body.kids-theme .emoji,
body.kids-theme [class*="icon"],
body.kids-theme [class*="emoji"] {
  color: inherit !important;
}

/* === NADPISANIE INLINE STYLES - EKRAN BŁĘDU === */
body.kids-theme #screen-wrong h1[style],
body.kids-theme #screen-wrong h1 {
  color: #B71C1C !important;
  text-shadow: 1px 1px 0 white, -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white !important;
}

body.kids-theme #screen-wrong .result-box,
body.kids-theme #screen-wrong .result-box span,
body.kids-theme #screen-wrong .result-box span[style] {
  background: #C62828 !important;
  color: white !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
}

body.kids-theme #screen-wrong p[style],
body.kids-theme #screen-wrong p {
  color: #5D4037 !important;
  text-shadow: none !important;
  font-weight: 600 !important;
}

body.kids-theme #screen-wrong .hint-box,
body.kids-theme #screen-wrong .hint-box[style],
body.kids-theme #screen-wrong #hint-box-wrong {
  background: #FFF8E1 !important;
  border: 3px solid #FFB300 !important;
  border-radius: 15px !important;
  padding: 15px !important;
}

body.kids-theme #screen-wrong .hint-box span,
body.kids-theme #screen-wrong .hint-text,
body.kids-theme #screen-wrong #hint-text-wrong {
  color: #4E342E !important;
  font-weight: 600 !important;
}

/* === NADPISANIE INLINE STYLES - EKRAN SUKCESU === */
body.kids-theme #screen-correct h1[style],
body.kids-theme #screen-correct h1 {
  color: #1B5E20 !important;
  text-shadow: 1px 1px 0 white, -1px -1px 0 white !important;
}

body.kids-theme #screen-correct p[style],
body.kids-theme #screen-correct p {
  color: #33691E !important;
}

body.kids-theme #screen-correct .result-box,
body.kids-theme #screen-correct .result-box span[style] {
  background: #388E3C !important;
  color: white !important;
}

/* === NADPISANIE INLINE STYLES - INNE EKRANY === */
body.kids-theme #screen-station-complete h1[style],
body.kids-theme #screen-station-complete h1 {
  color: #1565C0 !important;
  text-shadow: 1px 1px 0 white, -1px -1px 0 white !important;
}

body.kids-theme #screen-station-complete h1 span[style],
body.kids-theme #screen-station-complete #completed-station-name {
  color: #E65100 !important;
}

body.kids-theme #screen-station-complete p[style],
body.kids-theme #screen-station-complete div[style] {
  color: #37474F !important;
}

body.kids-theme #screen-gameover h1[style],
body.kids-theme #screen-gameover h1 {
  color: #1565C0 !important;
  text-shadow: 1px 1px 0 white !important;
}

body.kids-theme #screen-gameover p[style],
body.kids-theme #screen-gameover div[style] {
  color: #37474F !important;
}

/* === KARTY NA WSZYSTKICH EKRANACH === */
body.kids-theme .screen .card,
body.kids-theme .screen .card[style] {
  background: white !important;
  border: 2px solid #E0E0E0 !important;
}

body.kids-theme .screen .card div[style],
body.kids-theme .screen .card span[style],
body.kids-theme .screen .card p[style] {
  color: #37474F !important;
}

/* ========== KierunekSP46 - Dzien Otwarty ========== */
.kierunek-progress {
  padding: 20px;
}

.kierunek-counter {
  text-align: center;
  margin-bottom: 30px;
  padding: 25px;
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
}

.counter-big {
  font-size: 3.5rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.counter-label {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.counter-remaining {
  font-size: 1.2rem;
  color: #ff6b6b;
  margin-top: 15px;
  font-weight: bold;
}

.kierunek-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.kierunek-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px;
  border-radius: 15px;
  background: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.kierunek-item.completed {
  background: rgba(78, 205, 196, 0.3);
  border: 2px solid #4ecdc4;
}

.kierunek-item.pending {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.2);
}

.kierunek-item .item-number {
  font-size: 1.4rem;
  font-weight: bold;
  color: rgba(255,255,255,0.9);
}

.kierunek-item .item-status {
  font-size: 1.5rem;
  margin-top: 5px;
}

.kierunek-item.completed .item-number {
  color: #4ecdc4;
}
