body {
  background-color: #14141b;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  justify-content: center;
  padding-top: 20px;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  padding-bottom: 100px;
}

#game-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0;
}

/* New logo and ad container */
#logo-ad-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 20px;
  margin-bottom: 10px;
}

#logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 400px;
  width: 100%;
  flex-shrink: 0;
}

#logo-container a {
  text-decoration: none;
  display: block;
  width: 100%;
  transition: transform 0.2s;
}

#logo-container a:hover {
  transform: scale(1.01);
  cursor: pointer;
}

#logo-container a:active {
  transform: scale(0.99);
}

/* Language selector styles */
#language-selector {
  position: absolute;
  top: 30px;
  right: 20px;
  z-index: 100;
}

.lang-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background-color 0.2s;
}

.lang-button:hover {
  background-color: #444;
}

.lang-button i {
  font-size: 16px;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  width: 150px;
  margin-top: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lang-option {
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-option:hover {
  background-color: #f5f5f5;
}

.lang-option.active {
  background-color: #e0e0e0;
  font-weight: bold;
  pointer-events: none;
}

.flag-icon {
  width: 18px;
  height: 12px;
  display: inline-block;
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Ad area next to the logo */
#header-ad {
  width: 728px;
  height: 90px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: -40px;
}

#header-ad .ad-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
}

/* AdSense specific styles */
#header-ad .ad-container .adsbygoogle {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

#header-ad .ad-container iframe {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.ad-placeholder {
  color: #666;
  font-size: 14px;
  text-align: center;
  background: #e0e0e0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ASCII title style */
#ascii-title {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

#game-title {
  font-family: monospace;
  font-size: 6px;
  line-height: 1;
  margin: 0;
  color: #333;
  text-align: left;
  white-space: pre;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
  background: linear-gradient(to bottom, #f5f5f5, #e0e0e0);
  padding: 13px;
  border-radius: 5px 5px 0 0;
  border: 1px solid #ccc;
  border-bottom: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  align-content: flex-end;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

#game-website {
  font-family: 'Arial', sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background-color: #4a752c;
  padding: 5px 10px;
  border-radius: 0 0 5px 5px;
  text-align: center;
  border: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  width: 100%;
  box-sizing: border-box;
}

#difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 10px;
  flex-wrap: wrap;
}

.difficulty {
  padding: 8px 12px;
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  cursor: pointer;
  font-size: 14px;
}

.difficulty.active {
  background-color: #a0a0a0;
  border-color: #808080 #ffffff #ffffff #808080;
}

.difficulty:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

#custom-settings {
  display: flex;
  gap: 10px;
  padding: 10px;
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  flex-wrap: wrap;
  max-width: 580px;
  margin: 0 auto 10px;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

.custom-input {
  display: flex;
  align-items: center;
  gap: 5px;
}

.custom-input input {
  width: 50px;
  padding: 3px;
  background-color: #fff;
  border: 2px solid #808080;
  box-shadow: inset 2px 2px #808080, inset -2px -2px #fff;
}

#update-custom {
  padding: 3px 8px;
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  cursor: pointer;
}

#update-custom:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.hidden {
  display: none !important;
}

#game-area {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 5px;
  flex-wrap: wrap;
}

#game-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: auto;
  align-items: center;
  position: relative;
}

#additional-info {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}

.info-panel {
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 10px 15px;
  margin-top: 20px;
  flex-grow: 1;
  flex-basis: 45%;
  min-width: 200px;
  position: relative;
  box-sizing: border-box;
}

.info-panel h3 {
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #808080;
  padding-bottom: 5px;
}

.info-panel ul {
  margin: 0;
  padding-left: 20px;
}

.info-panel li {
  margin-bottom: 6px;
  font-size: 14px;
}

/* Classic Windows Minesweeper style borders and corners */
.border-container {
  position: relative;
  padding: 6px;
  margin: 10px 0;
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

/* Using classic Windows border instead of corners and edges */
.border-top, .border-bottom, .border-left, .border-right,
.corner-top-left, .corner-top-right, .corner-bottom-left, .corner-bottom-right {
  display: none;
}

#container {
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 10px;
  width: fit-content;
  margin: 0 auto;
  position: relative;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.25);
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #c0c0c0;
  padding: 5px 8px;
  border: 5px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  margin-bottom: 12px;
  box-sizing: border-box;
}

/* Digital clock style counters */
.display {
  background-color: #000;
  padding: 2px 4px;
  width: 65px;
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  border: 2px inset #808080;
  overflow: hidden;
  box-sizing: border-box;
}

.display img {
  display: inline-block;
  height: 30px;
  width: 18px;
  margin: 0 1px;
  vertical-align: middle;
}

/* Emoji face button */
#reset-button {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  background: url('/assets/svg/smile.svg');
  background-size: cover;
  background-color: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border-radius: 2px;
  cursor: pointer;
  box-sizing: content-box;
}

#reset-button.pressed {
  width: 30px;
  height: 30px;
  background: url('/assets/svg/surprised.svg');
  background-size: cover;
  background-color: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border-radius: 2px;
  box-sizing: content-box;
}

#reset-button.win {
  width: 30px;
  height: 30px;
  background: url('/assets/svg/cool.svg');
  background-size: cover;
  background-color: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border-radius: 2px;
  box-sizing: content-box;
}

#reset-button.lose {
  width: 30px;
  height: 30px;
  background: url('/assets/svg/sad.svg');
  background-size: cover;
  background-color: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  border-radius: 2px;
  box-sizing: content-box;
}

/* Game board */
#board {
  display: grid;
  gap: 0;
  border: 5px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background-color: #c0c0c0;
}

/* Cell styles */
.cell {
  width: 30px;
  height: 30px;
  background: url('/assets/svg/closed.svg');
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;
}

.cell.revealed {
  background: url('/assets/svg/pressed.svg');
  background-size: cover;
}

.cell.flagged {
  background: url('/assets/svg/flag.svg');
  background-size: cover;
}

.cell.mine {
  background: url('/assets/svg/mine_red.svg') !important;
  background-size: cover !important;
}

.cell.wrong-flag {
  background: url('/assets/svg/mine_wrong.svg') !important;
  background-size: cover !important;
}

/* Number styles */
.cell[data-value="1"] { background: url('/assets/svg/type1.svg'); background-size: cover; color: transparent; }
.cell[data-value="2"] { background: url('/assets/svg/type2.svg'); background-size: cover; color: transparent; }
.cell[data-value="3"] { background: url('/assets/svg/type3.svg'); background-size: cover; color: transparent; }
.cell[data-value="4"] { background: url('/assets/svg/type4.svg'); background-size: cover; color: transparent; }
.cell[data-value="5"] { background: url('/assets/svg/type5.svg'); background-size: cover; color: transparent; }
.cell[data-value="6"] { background: url('/assets/svg/type6.svg'); background-size: cover; color: transparent; }
.cell[data-value="7"] { background: url('/assets/svg/type7.svg'); background-size: cover; color: transparent; }
.cell[data-value="8"] { background: url('/assets/svg/type8.svg'); background-size: cover; color: transparent; }

/* Screenshot button */
#screenshot-container {
  margin-top: 15px;
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  width: 100%;
}

#screenshot-button {
  padding: 10px 20px;
  background-color: #4a752c;
  color: white;
  border: 3px solid;
  border-color: #5b8a39 #3a5a22 #3a5a22 #5b8a39;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#screenshot-button:hover {
  background-color: #5b8a39;
}

#screenshot-button:active {
  background-color: #3a5a22;
  border-color: #3a5a22 #5b8a39 #5b8a39 #3a5a22;
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Statistics Panel Styles - New Layout */
#stats-panel {
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 10px 15px 15px;
  width: 90%;
  max-width: 400px;
  font-size: 14px;
  position: relative;
}

#stats-panel h3 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  font-size: 16px;
  color: #333;
  border-bottom: 1px solid #808080;
  padding-bottom: 5px;
}

.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-row {
  display: grid;
  grid-template-columns: 180px 1fr 180px 1fr;
  gap: 10px;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  background-color: #d5d5d5;
  padding: 5px 8px;
  border-radius: 3px;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
  position: relative;
}

.info-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  border-radius: 50%;
  background-color: #808080;
  color: #fff;
  margin-left: 5px;
  cursor: help;
  font-weight: bold;
}

.info-icon:hover::after {
  content: attr(title);
  position: absolute;
  right: 0;
  bottom: 100%;
  padding: 5px 8px;
  background-color: #333;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-weight: normal;
}

.stat-label {
  font-weight: bold;
  color: #333;
  min-width: 100px;
}

.stat-value {
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: #222;
  margin-left: auto;
}

.stat-unit {
  font-size: 12px;
  color: #555;
  margin-left: 3px;
}

/* This class is no longer used because we added info icons */
.stat-explanation {
  display: none;
}

.stats-help {
  margin-top: 15px;
  font-size: 12px;
  background-color: #d5d5d5;
  padding: 8px;
  border-radius: 3px;
  border: 1px solid #aaa;
}

.stats-help p {
  margin: 0 0 5px 0;
  text-align: center;
}

.stats-help ul {
  margin: 0;
  padding-left: 15px;
}

.stats-help li {
  margin-bottom: 3px;
}

/* Game and panel row style */
.gameplay-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

/* Player Bar Styles */
#player-bar {
  background-color: #c0c0c0;
  border: 5px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  margin-top: 15px;
  padding: 10px;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

#player-controls {
  display: flex;
  gap: 5px;
  margin-right: 10px;
}

.player-button {
  background-color: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  padding: 0;
}

.player-button:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.player-button.active {
  background-color: #a0a0a0;
  border-color: #808080 #ffffff #ffffff #808080;
}

#player-progress-container {
  flex-grow: 1;
  background-color: #808080;
  height: 12px;
  position: relative;
  border: 3px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

#player-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%; /* Başlangıçta sıfır genişlikte */
  background-color: #4a752c;
  transition: width 0.1s linear;
}

#player-time {
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: #000;
  margin-left: 10px;
  white-space: nowrap;
}

/* The speed setting will no longer be visible */
#player-speed {
  display: none;
}

#playback-speed {
  background-color: #c0c0c0;
  border: 3px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 2px;
  font-size: 12px;
}

/* Ad banner */
#ad-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #bdbdbd;
  text-align: center;
  z-index: 1000;
  display: none;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  border-top: 1px solid #8b8b8b;
  background-color: #222222;
}

.ad-container {
  width: 728px;
  height: 90px;
  margin: 0 auto;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: #666;
}

.close-ad {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  width: 25px;
  height: 25px;
  line-height: 25px;
  text-align: center;
  border-radius: 50%;
  background-color: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.close-ad:hover {
  background-color: #a0a0a0;
}

/* Responsive design for media queries */
@media (max-width: 1200px) {
  #logo-ad-container {
    flex-direction: column;
    align-items: center;
  }
  
  #logo-container {
    max-width: 100%;
    margin-bottom: 15px;
  }
  
  #header-ad {
    width: 100%;
    max-width: 728px;
  }
}

@media (max-width: 768px) {
  #header-ad {
    height: auto;
    min-height: 90px;
  }
  
  .ad-placeholder {
    padding: 15px;
  }
  
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  #stats-panel {
    width: 100%;
    max-width: 100%;
  }
  
  .stat-item {
    padding: 8px;
  }
  
  .stat-label {
    min-width: 90px;
  }
  
  /* Special arrangement for game rules and tips */
  #additional-info {
    width: 100%;
    flex-direction: column;
  }
  
  .info-panel {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
    margin: 10px 0;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  #difficulty-selector {
    flex-direction: column;
    align-items: center;
  }
  
  .difficulty {
    width: 100%;
    max-width: 250px;
    text-align: center;
    margin-bottom: 5px;
  }
  
  #custom-settings {
    flex-direction: column;
    align-items: center;
  }
  
  .custom-input {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 5px;
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
}

