@font-face {
  font-family: "Surial";
  src: url(Fonts/Surial-Regular.otf);
}

@font-face {
  font-family: "Timid";
  src: url(Fonts/Timid-Regular.otf);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial;
  background: #ffffff;
  color: #000000;
  margin: 0;
  user-select: none;
  -webkit-user-drag: none;
  cursor: url(img/background/cursors/Cursor.svg),
    url(img/background/cursors/Pointer.svg), pointer;
}

a:hover,
img[onClick],
div[onclick],
button[onclick],
.concol:hover {
  cursor: url("img/background/Pointer.svg"), pointer;
}

img {
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
}

/* Top header with menu and search */
.top-header {
  background: #ffffff;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
}

.menu-icon {
  font-size: 24px;
  cursor: url("img/background/Pointer.svg"), pointer;
  margin-right: 20px;
}

.search-bar {
  flex: 1;
  max-width: 300px;
}

.search-bar input {
  width: 100%;
  padding: 8px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
}

/* Mobile Menu Overlay */
#menuOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 998;
}

#menuOverlay.overlay-active {
  opacity: 1;
  visibility: visible;
}

/* Slide-out Menu */
#mobileMenu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transition: left 0.3s ease;
  z-index: 9990000000000000000;
  overflow-y: auto;
}

#mobileMenu.menu-open {
  left: 0;
}

.mobile-menu-header {
  background: #000000;
  color: #ffffff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #dc3545;
}

.mobile-menu-title {
  font-weight: bold;
  font-size: 18px;
  text-transform: uppercase;
}

.close-menu {
  font-size: 28px;
  cursor: url("img/background/Pointer.svg"), pointer;
  color: #ffffff;
}

.mobile-menu-content {
  padding: 0;
}

.mobile-menu-section {
  border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-section-title {
  background: #f5f5f5;
  padding: 15px 20px;
  font-weight: bold;
  font-size: 14px;
  text-transform: uppercase;
  color: #000000;
}

.mobile-menu-links {
  padding: 10px 0;
}

.mobile-menu-links a {
  display: block;
  padding: 12px 30px;
  color: #000000;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s;
  cursor: url("img/background/Pointer.svg"), pointer;
}

.mobile-menu-links a:hover {
  background: #f5f5f5;
  color: #dc3545;
}

/* Logo */
.logo-container {
  text-align: center;
  padding: 20px 0;
  background: #ffffff;
}

.conlogo {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  letter-spacing: -2px;
  color: #000000;
  text-transform: uppercase;
  margin: 0;
}

/* Categories navigation */
.categories-nav {
  background: #ffffff;
  padding: 15px 30px;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
}

.categories-label {
  font-size: 14px;
  margin-bottom: 10px;
  display: block;
}

.categories-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.categories-links a {
  color: #000000;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.categories-links a:hover {
  color: #dc3545;
}

/* Main navigation */
#connavigationbar {
  background: #ffffff;
  padding: 15px 30px;
  text-align: center;
  border-bottom: 2px solid #000000;
}

#connavigationbar a {
  color: #000000;
  font-family: Timid;
  font-size: clamp(16px, 2.5vw, 24px);
  text-decoration: none;
  padding: 10px 20px;
  margin: 0 5px;
  display: inline-block;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#connavigationbar a:hover {
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

/* Breaking news ticker */

.breaking-ticker {
  background: #000000;
  color: #ffffff;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
  min-height: 48px;
}

.breaking-label {
  background: #dc3545;
  color: #ffffff;
  padding: 12px 30px;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 900000000;
  display: flex;
  align-items: center;
}

.ticker-text {
  font-size: 14px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  display: flex;
  align-items: center;
  padding: 12px 30px 12px 0;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Main content */
#containercon {
  width: 100%;
  text-align: center;
  max-width: 800px;
  margin: 50px auto;
  padding: 20px;
}

@media screen and (max-width: 768px) {
  #containercon {
    padding: 10px;
  }
}

@media screen and (max-width: 480px) {
  #containercon {
    padding: 5px;
  }
}

.game-title {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  font-weight: 900;
}

/* Alert box */
.red-alert {
  background: #dc3545;
  color: #ffffff;
  padding: 20px;
  margin: 0 auto 30px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  max-width: 600px;
}

/* Category rows */
.connectionscontainercategories {
  margin: 0 auto 20px;
  width: 100%;
}

.conrow {
  width: 100%;
  padding: 15px;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  color: #000000;
  margin-bottom: 10px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
}

.category-title {
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  color: #fdf38e;
}

.category-words {
  font-size: 14px;
  font-weight: 500;
  color: #fdf38e;
  text-align: center;
}

/* Grid */
.connectionscontainer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 auto 30px;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .connectionscontainer {
    gap: 6px;
  }
}

@media screen and (max-width: 480px) {
  .connectionscontainer {
    gap: 4px;
  }
}

.concol {
  height: 80px;
  border: 2px solid #000000;
  align-items: center;
  justify-content: center;
  display: flex;
  background: #ffffff;
  color: #000000;
  font-weight: bold;
  font-size: clamp(24px, 2.4vw, 24px);
  border-radius: 4px;
  transition: all 0.2s ease;
  padding: 5px;
  text-align: center;
}

.concol:hover {
  background: #f5f5f5;
  border-color: #dc3545;
}

.concol.selected {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

/* Submit button */
button {
  width: 100%;
  max-width: 400px;
  background: #dc3545;
  border: none;
  color: #ffffff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(18px, 3vw, 28px);
  padding: 18px 40px;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 900;
  margin: 0 auto;
}

button:hover {
  background: #c82333;
}

button:active {
  transform: translateY(1px);
}

/* Shake animation */
.shake {
  animation: horizontal-shaking 0.5s;
}

@keyframes horizontal-shaking {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(5px);
  }
  50% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0);
  }
}

.mistakes-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.mistakes-label {
  font-size: 14px;
  font-weight: 600;
  color: #000000;
}

.mistakes-dots {
  display: flex;
  gap: 8px;
}

.mistake-dot {
  width: 16px;
  height: 16px;
  border: 2px solid #000000;
  border-radius: 50%;
  background: #ffffff;
  transition: background-color 0.3s ease;
}

.mistake-dot.filled {
  background: #000000;
}

/* Game Over Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  border: 4px solid #000000;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  animation: slideDown 0.4s;
  overflow: hidden;
}

@keyframes slideDown {
  from {
    transform: translateY(-100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background: #dc3545;
  color: #ffffff;
  padding: 20px;
  text-align: center;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-body {
  padding: 30px;
  text-align: center;
}

.modal-body h2 {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 28px;
  color: #000000;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-body p {
  font-size: 16px;
  color: #000000;
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-footer {
  padding: 20px;
  text-align: center;
  background: #f5f5f5;
  border-top: 2px solid #e0e0e0;
}

.modal-button {
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 15px 40px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 18px;
  border-radius: 4px;
  cursor: url("img/background/Pointer.svg"), pointer;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.modal-button:hover {
  background: #dc3545;
  transform: scale(1.05);
}

.modal-button:active {
  transform: scale(0.98);
}

.one-away-message {
  background: #faa61a;
  color: #ffffff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: slideInDown 0.3s ease;
  transition: opacity 0.3s ease;
}

@keyframes slideInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#completionModal .modal-header {
  background: #6ab023;
  animation: pulse 1s ease infinite;
}

#completionModal .modal-button {
  background: #6ab023;
}

#completionModal .modal-button:hover {
  background: #5a9c1f;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* Score Display - NEW STYLES FOR SCORE SHARING */
.score-display {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
}

.score-display h3 {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 12px, 2dvw, 18px;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: #000000;
}

.score-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.score-row {
  display: flex;
  gap: 6px;
  font-size: 24px;
  justify-content: center;
}

.score-square {
  width: 30px;
  height: 30px;
  border-radius: 3px;
  display: inline-block;
}

.score-text {
  font-size: 14px;
  color: #000000;
  line-height: 1.6;
}

.share-button {
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 12px 30px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 16px;
  border-radius: 4px;
  cursor: url("img/background/Pointer.svg"), pointer;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.share-button:hover {
  background: #dc3545;
}

.share-button:active {
  transform: scale(0.98);
}

.copy-notification {
  display: inline-block;
  margin-left: 10px;
  color: #6ab023;
  font-weight: bold;
  animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0;
  }
  10%,
  90% {
    opacity: 1;
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .categories-links {
    gap: 15px;
  }

  .categories-links a {
    font-size: 13px;
  }

  #connavigationbar a {
    font-size: 16px;
    padding: 8px 12px;
    margin: 5px 3px;
  }

  .concol {
    height: 60px;
  }

  .top-header {
    padding: 10px 15px;
  }

  .breaking-ticker {
    min-height: 44px;
  }

  .category-title {
    font-size: 14px;
  }

  .category-words {
    font-size: 12px;
  }

  .score-row {
    font-size: 20px;
  }
}

@media screen and (max-width: 480px) {
  .concol {
    height: 50px;
  }

  button {
    font-size: 20px;
    padding: 15px 30px;
  }

  .search-bar {
    max-width: 200px;
  }

  .score-row {
    font-size: 18px;
    gap: 4px;
  }

  .share-button {
    font-size: 14px;
    padding: 10px 20px;
  }
}
