html { background-color: #999999; }
body { margin : 0 auto; max-width : 600px; word-wrap: break-word; overflow-wrap: break-word; }
body {
  background-color: #e4d1b3;
  background-image: 
  /* linear-gradient(rgba(228, 209, 179, 0.01), rgba(228, 209, 179, 0.01)), */
    url("img/bg-top2.jpg?v=3");
  background-repeat: repeat;
  background-position: top center;
  background-size: 100% auto;
}

  
body,td,th { 
color: #1f1307; /* Minkštesnė, labai tamsi ruda vietoj grynų akių rėžiančios juodos */
font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;  
}
a:link, a:visited { 
    color: #1e522a; /* Gili miško žalia – solidi ir aiškiai matoma */
    transition: color 0.2s ease;
}
a:hover, a:active { 
    color: #388e4c; /* Ryškesnė, gyvesnė žalia užvedus pele */
}
p { margin:5px; }
.title { 
  text-align: center;
  font-family: Arial, Helvetica, sans-serif; 
  font-weight: bold;
  padding: 6px 8px;
  color: #f4eccf; 
  border-bottom: 2px solid #1a110b; 
  background: linear-gradient(to bottom, #3c2719 0%, #21150e 100%); 
  text-shadow: 1px 1px 2px #000;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4);
}
.pavad { color: #446600; }
input, select, textarea { 
    background: #f2e8d9; 
    border: 1px solid #977135; 
    /* Didesnis padding suteikia laukeliui "oro" ir solidumo (tekstas nesirems į kraštus) */
    padding: 6px 10px; 
    margin-top: 4px; 
    margin-bottom: 4px; 
    color: #3d2511; /* Šiek tiek tamsesnis tekstas geresniam įskaitomumui */
    border-radius: 4px; /* Lengvai užapvalinti kampai atrodo profesionaliau */
    
    /* Šis šešėlis sukuria įdubusio į pergamentą laukelio efektą */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); 
    
    outline: none; /* Nuimam standartinį naršyklės mėlyną rėmelį */
    transition: all 0.2s ease-in-out; /* Kad perėjimas paspaudus būtų švelnus */
}

/* Efektas, kai žaidėjas paspaudžia ant laukelio (Focus) */
input:focus, select:focus, textarea:focus {
    background: #fdf7ed; /* Laukelis šiek tiek pašviesėja, rodydamas, kad čia rašoma */
    border-color: #ff9d00; /* Kraštelis nušvinta šilta, magiška auksine spalva */
    
    /* Švelnus išorinis švytėjimas */
    box-shadow: 0 0 6px rgba(255, 157, 0, 0.4), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
input.button { 
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 8px; 
  padding: 8px;
  cursor: pointer; 
  border: 1px solid #334d00; 
  background: linear-gradient(to bottom, #558000 0%, #3a5400 100%); 
  color: white;
  text-decoration: none; 
  margin : 4px 4px; 
  display: inline-block; 
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7);
  box-shadow: 1.8px 3.5px 3.5px hsl(0deg 0% 0% / 0.45); 
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation; 
/* APSAUGA TELEFONAMS: Išjungiam gamyklinius naršyklės mygtukų stilius */
  -webkit-appearance: none;
  appearance: none;
  /* Kad paspaudimas telefone suveiktų švelniai */
  transition: all 0.12s ease;
}
input.button:hover { 
  background: linear-gradient(to bottom, #3a5400 0%, #253600 100%);
}
input.button:active {
  background: linear-gradient(to bottom, #253600 0%, #3a5400 100%);
  box-shadow: 0.5px 1px 1px rgba(0,0,0,0.6), inset 0px 2px 3px rgba(0,0,0,0.6);
  transform: translateY(1px);
}
a.butonas { 
  border-radius: 8px; 
  padding: 8px; 
  font-family: Arial, Helvetica, sans-serif; 
  cursor: pointer; 
  border: 1px solid #334d00; 
  background: linear-gradient(to bottom, #558000 0%, #3a5400 100%);
  color: white; 
  text-decoration: none; 
  margin : 4px 4px; 
  display: inline-block; 
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7);
  box-shadow: 1.8px 3.5px 3.5px hsl(0deg 0% 0% / 0.45); 
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: all 0.12s ease;
  }
a.butonas:hover { 
  background: linear-gradient(to bottom, #3a5400 0%, #253600 100%);
}
a.butonas:active {
  background: linear-gradient(to bottom, #253600 0%, #3a5400 100%);
  box-shadow: 0.5px 1px 1px rgba(0,0,0,0.6), inset 0px 2px 3px rgba(0,0,0,0.6);
  transform: translateY(1px);
}
.centre { vertical-align: middle; }
.tcentre { text-align:center; }
a.veiksmai { 
  border: 1px solid #e1cca5; 	
  margin : 4px 4px;
  background: linear-gradient(to bottom, #f8ebd3 0%, #e8d7b9 100%);
  box-shadow: 1.8px 3.5px 3.5px hsl(0deg 0% 0% / 0.45);
  color: #4B0094;
  padding: 8px;
  border-radius: 8px; 
  background: #f8ebd3;
  text-decoration: none; 
  display: inline-block; 
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation; 
  transition: all 0.12s ease; /* Švelniam paspaudimui */
 }
a.veiksmai:hover { 
  background: linear-gradient(to bottom, #e8d7b9 0%, #d4bf9c 100%); 
 }
 a.veiksmai:active {
  background: linear-gradient(to bottom, #d4bf9c 0%, #e8d7b9 100%); /* Apverčiam spalvas */
  box-shadow: 0.5px 1px 1px rgba(0,0,0,0.6), inset 0px 2px 3px rgba(0,0,0,0.4); /* Įspaudimas */
  transform: translateY(1px);
}
/* --- PUSLAPIAVIMAS (Pritaikytas prie žaidimo stiliaus) --- */
.pagination { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  gap: 8px; 
  margin-top: 10px; 
} 

/* Aktyvūs puslapių mygtukai (Pakeista žalia spalva į RPG samanų/miško žalią su tavo atrastu permatomumu) */
a.btn { 
  font-family: Arial, Helvetica, sans-serif; 
  background: rgba(76, 175, 80, 0.25); /* Pusiau permatomas žalsvas fonas */
  border: 1px solid #6b8e23; /* Samanų žalias rėmelis */
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  color: #1e3a1f; 
  padding: 8px; 
  font-size: 17px; 
  cursor: pointer; 
  text-decoration: none; 
  border-radius: 8px; 
  display: inline-block; 
  margin: 2px 2px; 
  min-width: 44px; 
  text-align: center;
  box-shadow: 1px 2px 3px rgba(0,0,0,0.3);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: all 0.1s ease;
} 
a.btn:hover { 
  background-color: #6b8e23; 
  color: white;
} 
a.btn:active {
  background-color: #4f6b1a;
  box-shadow: inset 0px 2px 3px rgba(0,0,0,0.4);
  transform: translateY(1px);
}

/* Neaktyvus puslapio mygtukas (Pakeista pilka spalva į išblukusį pergamentą) */
.btn-disabled { 
  font-family: Arial, Helvetica, sans-serif; 
  background-color: rgba(0, 0, 0, 0.05); 
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #777; 
  padding: 8px; 
  font-size: 17px; 
  border-radius: 8px; 
  display: inline-block; 
  margin: 2px; 
  min-width: 44px; 
  text-align: center; 
  pointer-events: none; 
  opacity: 0.5;
}

/* Puslapių informacija (Pvz: 1 iš 10) */
.info { 
  font-family: Arial, Helvetica, sans-serif; 
  font-size: 16px; 
  font-weight: bold; 
  color: #3d2511; /* Tamsi medžio ruda */
  min-width: 40px; 
  text-align: center; 
  padding: 8px 6px; 
}


/* ========================================================
   📋 TOP SĄRAŠAS (Tavo pergamento stilius su naujais efektais)
   ======================================================== */

.top-row { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  background: rgba(244, 224, 187, 0.4); /* Švelnus permatomas gelsvas sluoksnis */
  border: 1px solid rgba(61, 37, 17, 0.15);
  margin: 6px 0; 
  padding: 8px 10px; 
  border-radius: 6px; 
  font-family: Arial, Helvetica, sans-serif; 
  font-size: 16px; 
}

/* Kas antra eilutė – šiek tiek tamsesnė geresniam skaitomumui */
.top-row:nth-child(even) { 
  background: rgba(244, 224, 187, 0.65); 
}

/* Naujas laukelis, kuris laiko medalį (kad vardai idealiai lygiuotųsi) */
.top-num-container { 
  width: 50px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}

/* Paprastas skaičius nuo 4 vietos */
.plain-num {
  font-weight: bold; 
  color: #3d2511; 
  font-size: 16px;
}

/* Žaidėjo vardas (Numatytasis stilius) */
.top-name { 
  flex: 1; 
  text-align: left; 
  padding-left: 10px; 
  color: #000;
}

/* Žaidėjo taškai (Numatytasis stilius – tavo graži žalia spalva) */
.top-val { 
  width: 80px; 
  text-align: right; 
  font-weight: bold; 
  color: #265400; 
}


/* ========================================================
   🏆 MEDALIŲ BAZINIS STILIUS (Apskritimai)
   ======================================================== */

.css-medal {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Impact', 'Arial Black', sans-serif;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  position: relative;
  box-shadow: 
    inset 0 -3px 4px rgba(0, 0, 0, 0.4), 
    inset 0 3px 4px rgba(255, 255, 255, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3);
}


/* ========================================================
   🥇 1-OS VIETOS ULTRA IŠSKYRIMAS (Eilutė, medalis, tekstas)
   ======================================================== */

/* 1. Eilutės fono pašviesėjimas (dydis nesikeičia) */
.top-row.gold {
  background: rgba(255, 239, 185, 0.9) !important;
  border: 1px solid #f1c40f !important;
  animation: gold-row-glow 1.5s infinite alternate ease-in-out;
}
/* Pakeista animacija: dabar ji juda pirmyn ir atgal (alternate), todėl nėra staigaus šuolio */
@keyframes gold-flash-fast {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.gold .css-medal {
  width: 36px; 
  height: 36px;
  font-size: 17px;
  border: 2px solid #fff;
  filter: drop-shadow(0 0 8px #ffcc00);
  background: linear-gradient(90deg, #d4ac0d 0%, #f1c40f 40%, #ffffff 50%, #f1c40f 60%, #9a7d0a 100%);
  background-size: 200% 100%; /* Pakeistas dydis geresniam judesiui */
  animation: gold-flash-fast 2s infinite alternate ease-in-out; /* Pridėta 'alternate' ir sulėtinta */
}
@keyframes gold-flash-fast {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 3. Vardo tekstas – auksinis gradientas */
.gold .top-name {
  font-weight: bold;
  font-family: 'Arial Black', Gadget, sans-serif;
  font-size: 17px;
  background: linear-gradient(to bottom, #d4ac0d 0%, #3d2511 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(1px 1px 0px rgba(255, 255, 255, 0.8));
}

/* 4. Taškai – degančios oranžinės spalvos su švytėjimu */
.gold .top-val {
  font-size: 18px; 
  color: #ff6600; 
  text-shadow: 0 0 5px rgba(255, 102, 0, 0.4), 1px 1px 1px rgba(0,0,0,0.2);
}


/* ========================================================
   🥈 IR 🥉 VIETOS (Gražios, bet ramios – nežiba)
   ======================================================== */

/* 2-a vieta: Vidutinis sidabro medalis */
.silver .css-medal {
  width: 30px; 
  height: 30px;
  font-size: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #bdc3c7 50%, #7f8c8d 100%);
  border: 1.5px solid #fff;
}
.top-row.silver {
  border-left: 4px solid #bdc3c7; /* Sidabrinis brūkšnys eilutės šone */
}

/* 3-ia vieta: Mažiausias bronzos medalis */
.bronze .css-medal {
  width: 25px; 
  height: 25px;
  font-size: 12px;
  background: linear-gradient(135deg, #f5cba7 0%, #d35400 50%, #873600 100%);
  border: 1.5px solid #fff;
}
.top-row.bronze {
  border-left: 4px solid #e67e22; /* Bronzinis brūkšnys eilutės šone */
}



/* --- IŠŠOKANTYS LANGAI (MODALAI) --- */
.langas { 
  display: none; 
  text-align: left; 
  position: fixed; 
  z-index: 100; /* Padidintas z-index, kad tikrai būtų virš visko */
  margin: 0 auto; 
  left: 0; 
  top: 0; 
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(26, 17, 11, 0.7); /* Tamsus medžio/odos atspalvio užtamsinimas vietoj juodo */
}
.langas2 { 
  max-width: 600px; 
  margin: auto; 
}
/* Paties lango turinys (Pakeista balta dėžė į prabangų stiklo/pergamento hibridą) */
.langas-content { 
  background: rgba(253, 248, 239, 0.95); /* Šviesus pergamento pagrindas */
  border: 2px solid #3d2511; /* Solidus tamsaus medžio rėmelis */
  box-shadow: 0px 10px 25px rgba(0,0,0,0.6);
  margin: 50px 10px; /* Daugiau vietos nuo ekrano viršaus telefonuose */
  padding: 15px; 
  border-radius: 12px;
}
/* Uždarymo "X" mygtukas */
.close { 
  color: #3d2511; 
  font-size: 35px; 
  font-weight: bold; 
  float: right; 
  line-height: 24px;
  user-select: none;
  -webkit-user-select: none;
}
.close:hover, .close:focus { 
  color: #b52222; 
  cursor: pointer; 
}


/* --- RODYKLĖ ŽEMYN --- */
.arrow { 
  border: solid #3d2511; /* Pakeista iš juodos į medžio rudą */
  border-width: 0 2.5px 2.5px 0; /* Šiek tiek pastorinta, kad geriau matytųsi telefone */
  display: inline-block; 
  padding: 3px; 
  transform: rotate(45deg); 
  -webkit-transform: rotate(45deg);
}