@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --bg-light: url('lightbg.jpg');
  --bg-dark: url('drkbg.png');
  
  --text-light: #1c0003;  
  --text-dark: #FF4C4C;   
  
  --accent-light: #1c0003;
  --accent-dark: #FF4C4C;  
  
  --btn-bg-light: #1c0003; 
  --btn-bg-dark: #FF1A1A;  
  --btn-text-light: #fff;
  --btn-text-dark: #000;
  
  --shop-bg-light: #E0E0E0;
  --shop-bg-dark: #000;
  --border-light: #660000;
  --border-dark: #FF1A1A;
}

body {
  font-family: 'Share Tech Mono', monospace;
  text-align: center;
  padding: 40px;
  background: var(--bg-light) no-repeat center center fixed;
  background-size: cover;
  color: var(--text-light);
  user-select: none;
  transition: background 0.3s, color 0.3s;
}

img.sword-img {
  width: 300px;  
  height: auto;  
  margin: 20px 0;
  cursor: pointer;
  transition: transform 0.1s;
}

img.sword-img:active {
  transform: scale(0.85) rotate(-25deg);
}

body.dark-mode {
  background: var(--bg-dark) no-repeat center center fixed;
  background-size: cover;
  color: var(--text-dark);
}

h1, h2, h3 {
  color: #1c0003;  
  text-transform: uppercase;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3 {
  color: var(--accent-dark); 
}


button {
  padding: 14px 30px;
  font-size: 20px;
  cursor: pointer;
  margin-top: 25px;
  font-weight: bold;
  border-radius: 12px;  
}

.top-bar button {
  background-color: var(--btn-bg-light);
  color: var(--btn-text-light);
}
body.dark-mode .top-bar button {
  background-color: var(--btn-bg-dark);
  color: var(--btn-text-dark);
}


.shop-item {
  margin: 10px auto;
  padding: 15px;
  width: 60%;
  background-color: var(--shop-bg-light);
  border: 2px solid var(--border-light);
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.dark-mode .shop-item {
  background-color: var(--shop-bg-dark);
  border: 2px solid var(--border-dark);
  color: var(--text-dark);
}


#miniGameOverlay {
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.9);
  z-index:1000;
  color: #FF4C4C;
  text-align:center;
  padding-top:50px;
}

#overlayContent {
  display:inline-block;
  background:#111;
  padding:20px;
  border-radius:12px;
  border:2px solid #FF1A1A;
}

#gameCanvas { 
  background:#111; 
  border:2px solid #FF1A1A; 
  display:block; 
  margin:20px auto; 
  border-radius:12px;
}

#fillBarContainer { 
  width:80%; 
  height:20px; 
  background:#330000; 
  margin:10px auto; 
  border-radius:12px; 
  overflow:hidden; 
}

#fillBar { 
  width:0%; 
  height:100%; 
  background:#FF0000;
  border-radius:12px;
}

#timer { 
  font-size:18px; 
  margin-top:10px; 
  color: #FF3B3B; 
}

#messageMini { 
  margin-top:10px; 
  font-size:18px; 
  color: #B30000; 
}


#resetBtn {
  background: #8B0000;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  border: 2px solid #FF1A1A;
  padding: 16px 36px;
  margin-top: 40px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease-in-out;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

#resetBtn:hover {
  background: #FF1A1A;
  color: #000;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.9);
  transform: scale(1.05);
}

#resetBtn:active {
  background: #FF0000;
  transform: scale(0.95);
  box-shadow: 0 0 25px rgba(255, 0, 0, 1);
}


.topright {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.topright button {
  background: #8B0000;
  color: #fff;
  font-weight: bold;
  padding: 12px 24px;
  border: 2px solid #FF1A1A;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.topright button:hover {
  background: #FF1A1A;
  color: #000;
  transform: scale(1.05);
}


.topleft {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

.topleft button {
  background: #8B0000;
  color: #fff;
  font-weight: bold;
  padding: 12px 24px;
  border: 2px solid #FF1A1A;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.topleft button:hover {
  background: #FF1A1A;
  color: #000;
  transform: scale(1.05);
}


* {
  border-radius: 12px !important;
}
