@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css);

@font-face {
    font-family: "Capture It";
    src: url("fonts/Capture it.ttf") format("truetype");
  }
  @font-face {
    font-family: "Handwriting";
    src: url("fonts/Handwriting.ttf") format("truetype");
  }
  @font-face {
    font-family: "Montserrat";
    src: url("fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
    font-weight: 100 900;
  }
:root {
  font-family: "Montserrat", "Roboto", sans-serif;
}

body {
  background: #232223f5;
  color: white;
  transition: 0.25s;
    min-height: 100vh;
}
.captureIt{
    font-family: "Capture It";
}
.brief {
    font-size: 14pt;
    margin: 0 auto;
    max-width: 50%;
}
header{
    margin-top:5%;
    display: block;
    text-align: center;
}

header img{
    max-width: 50%;
}
main {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  margin-top: 5%;
}

h1,h2,h3{
    margin: 0;
}

main .options {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 600px;
  max-width: 900px;
  width: calc(100% - 100px);
  height: 400px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
  scroll-behavior: smooth;
  cursor: grab;
  padding-right: 20px; /* Extra space for the last option */
}

main .options::-webkit-scrollbar {
  display: none; /* WebKit */
}

main .options.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
@media screen and (max-width: 768px) {
  main .options {
    min-width: 100%;
    max-width: 100vw;
    width: 100vw;
    margin: 0;
    padding: 0 20px;
  }
  .brief {
    max-width: 100%;
    padding: 0 20px;
  }
  
  main .options .option.active {
    max-width: calc(100vw - 40px) !important;
    min-width: auto !important;
    width: calc(100vw - 40px) !important;
  }
}

@media screen and (max-width: 480px) {
  main .options {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 0 10px;
    height: 350px;
  }
  
  main .options .option {
    min-width: 50px;
    margin: 8px;
  }
  
  main .options .option.active {
    max-width: calc(100vw - 20px) !important;
    min-width: auto !important;
    width: calc(100vw - 20px) !important;
  }
}

@media screen and (max-width: 430px) {
  main .options .option.active {
    max-width: calc(100vw - 20px) !important;
    min-width: auto !important;
    width: calc(100vw - 20px) !important;
  }
}

@media screen and (max-width: 360px) {
  main .options {
    padding: 0 5px;
  }
  
  main .options .option.active {
    max-width: calc(100vw - 10px) !important;
    min-width: auto !important;
    width: calc(100vw - 10px) !important;
  }
}

main .options .option {
  position: relative;
  overflow: hidden;
  min-width: 60px;
  flex-shrink: 0;
  margin: 10px;
  background: var(--optionBackground, var(--defaultBackground, #444444));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95);
  user-select: none;
}
main .options .option:nth-child(1) {
  --defaultBackground:#ED5565;
}
main .options .option:nth-child(2) {
  --defaultBackground:#FC6E51;
}
main .options .option:nth-child(3) {
  --defaultBackground:#FFCE54;
}
main .options .option:nth-child(4) {
  --defaultBackground:#2ECC71;
}
main .options .option:nth-child(5) {
  --defaultBackground:#5D9CEC;
}
main .options .option:nth-child(6) {
  --defaultBackground:#AC92EC;
}
main .options .option:nth-child(7) {
  --defaultBackground:#FF6B6B;
}
main .options .option:nth-child(8) {
  --defaultBackground:#4ECDC4;
}
main .options .option:nth-child(9) {
  --defaultBackground:#45B7D1;
}
main .options .option:nth-child(10) {
  --defaultBackground:#96CEB4;
}
main .options .option:nth-child(11) {
  --defaultBackground:#FECA57;
}
main .options .option:nth-child(12) {
  --defaultBackground:#FF9FF3;
}
main .options .option:nth-child(13) {
  --defaultBackground:#54A0FF;
}
main .options .option:nth-child(14) {
  --defaultBackground:#5F27CD;
}
main .options .option:nth-child(15) {
  --defaultBackground:#00D2D3;
}
main .options .option:nth-child(16) {
  --defaultBackground:#FF9F43;
}
main .options .option:nth-child(17) {
  --defaultBackground:#10AC84;
}
main .options .option:nth-child(18) {
  --defaultBackground:#EE5A24;
}
main .options .option:nth-child(19) {
  --defaultBackground:#0984E3;
}
main .options .option.active {
  flex-grow: 10000;
  transform: scale(1);
  max-width: 600px;
  min-width: 500px;
  margin: 0px;
  border-radius: 40px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* Ensure active options don't exceed viewport width on any device */
@media screen and (max-width: 600px) {
  main .options .option.active {
    max-width: calc(100vw - 40px) !important;
    min-width: auto !important;
    width: calc(100vw - 40px) !important;
  }
}
main .options .option.active .shadow {
  box-shadow: inset 0 -120px 120px -120px black, inset 0 -120px 120px -100px black;
}
main .options .option.active .label {
  bottom: 20px;
  left: 20px;
}
main .options .option.active .label .info > div {
  left: 0px;
  opacity: 1;
}
main .options .option:not(.active) {
  flex-grow: 1;
  border-radius: 30px;
}
main .options .option:not(.active) .shadow {
  bottom: -40px;
  box-shadow: inset 0 -120px 0px -120px black, inset 0 -120px 0px -100px black;
}
main .options .option:not(.active) .label {
  bottom: 10px;
  left: 10px;
}
main .options .option:not(.active) .label .info > div {
  left: 20px;
  opacity: 0;
}
main .options .option .shadow {
  position: absolute;
  bottom: 0px;
  left: 0px;
  right: 0px;
  height: 120px;
  transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95);
}
main .options .option .label {
  display: flex;
  position: absolute;
  right: 0px;
  height: 40px;
  transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95);
}
main .options .option .label .icon {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  border-radius: 100%;
  background-color: white;
  color: var(--defaultBackground);
}
main .options .option .label .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 10px;
  color: white;
  white-space: pre;
}
main .options .option .label .info > div {
  position: relative;
  transition: 0.5s cubic-bezier(0.05, 0.61, 0.41, 0.95), opacity 0.5s ease-out;
}
main .options .option .label .info .main {
  font-weight: bold;
  font-size: 1.2rem;
}
main .options .option .label .info .sub {
  transition-delay: 0.1s;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  z-index: 1001;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.modal-image:hover {
  transform: scale(1.02);
}

.modal-close {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: #cc0000;
}

/* Download Button Styles */
.download-section {
  margin: 30px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

@media screen and (min-width: 768px) {
  .download-section {
    flex-direction: row;
    justify-content: center;
    gap: 30px;
  }
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, #5D9CEC, #4A90E2);
  color: white;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(93, 156, 236, 0.3);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-width: 250px;
  justify-content: center;
}

.download-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(93, 156, 236, 0.4);
  background: linear-gradient(135deg, #4A90E2, #357ABD);
}

.download-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.rules-button {
  background: linear-gradient(135deg, #cc9ad7, #b88ac7) !important;
  box-shadow: 0 8px 20px rgba(204, 154, 215, 0.3) !important;
}

.rules-button:hover {
  background: linear-gradient(135deg, #b88ac7, #a47ab7) !important;
  box-shadow: 0 12px 25px rgba(204, 154, 215, 0.4) !important;
}

.contact {
  margin-top: 20px;
  font-size: 18px;
  color: #ccc;
}

.handwriting-greeting {
  font-family: 'Handwriting';
  font-size: 24pt;
  margin: 20px 0;
}

/* Language Switch Styles */
.language-switch {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 5px;
  z-index: 100;
}

.lang-button {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lang-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-button.active {
  background: #2ECC71;
  border-color: #27AE60;
  color: white;
}

.lang-button.active:hover {
  background: #27AE60;
}

/* Rules Page Styles */
.rules-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  margin-top: 20px;
}

.main-heading {
  text-align: center;
  font-size: 4em;
  color: #84a5d2;
  margin: 0 0 40px 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 4px;
  font-weight: 400;
}

.back-navigation {
  text-align: center;
  margin: 20px 0 40px 0;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #84a5d2, #6b8bb8);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 500;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(132, 165, 210, 0.3);
  border: none;
  cursor: pointer;
}

.back-button:hover {
  background: linear-gradient(135deg, #6b8bb8, #5a7ba6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(132, 165, 210, 0.4);
  color: white;
  text-decoration: none;
}

.back-button i {
  font-size: 1.2em;
}

.toc {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 40px;
  backdrop-filter: blur(10px);
}

.toc h2 {
  color: #84a5d2;
  margin-bottom: 20px;
  text-align: center;
  font-family: "Capture It", cursive;
  letter-spacing: 2px;
  font-weight: 400;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.toc-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.toc-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.toc-item a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  display: block;
}

.toc-item a:hover {
  color: #84a5d2;
}

.rules-section {
  margin-bottom: 50px;
  background: rgba(255, 255, 255, 0.05);
  padding: 30px;
  border-radius: 15px;
  border-left: 5px solid #84a5d2;
}

.rules-section h2 {
  color: #84a5d2;
  margin-bottom: 20px;
  font-size: 2em;
  font-family: "Capture It", cursive;
  letter-spacing: 1.5px;
  font-weight: 400;
}

.rules-section h3 {
  color: #cc9ad7;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.5em;
  font-family: "Capture It", cursive;
  letter-spacing: 1px;
  font-weight: 400;
}

.rules-section h4 {
  color: #5D9CEC;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2em;
  font-family: "Capture It", cursive;
  letter-spacing: 0.8px;
  font-weight: 400;
}

.rules-section p {
  line-height: 1.6;
  margin-bottom: 15px;
}

.rules-section ul, .rules-section ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.rules-section li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.highlight {
  background: rgba(132, 165, 210, 0.2);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #84a5d2;
  margin: 20px 0;
}

.warning {
  background: rgba(204, 154, 215, 0.2);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #cc9ad7;
  margin: 20px 0;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #84a5d2;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(132, 165, 210, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  background: #6b8bb8;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(132, 165, 210, 0.4);
}

.language-content {
  display: none;
}

.language-content.active {
  display: block;
}

.category-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.category-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #5D9CEC;
}

.category-item h4 {
  color: #cc9ad7;
  margin: 0 0 10px 0;
  font-size: 1.1em;
  font-family: "Capture It", cursive;
  letter-spacing: 0.8px;
  font-weight: 400;
}

.category-item p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* Search Function Styles */
.search-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 40px;
  backdrop-filter: blur(10px);
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  max-width: 100%;
  padding: 15px 50px 15px 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  border-color: #84a5d2;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(132, 165, 210, 0.3);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  pointer-events: none;
}

.clear-search {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.clear-search:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-results {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  border-left: 4px solid #84a5d2;
  transition: all 0.3s ease;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

.search-result-title {
  color: #84a5d2;
  font-weight: 400;
  margin-bottom: 5px;
  font-size: 1.1em;
  font-family: "Capture It", cursive;
  letter-spacing: 0.8px;
}

.search-result-text {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.search-highlight {
  background: rgba(132, 165, 210, 0.3);
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: bold;
}

.no-results {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  padding: 20px;
}

/* Rules Page Responsive Design */
@media screen and (max-width: 768px) {
  .rules-container {
    margin: 10px;
    padding: 15px;
  }
  
  .main-heading {
    font-size: 3em;
    margin-bottom: 30px;
    letter-spacing: 2px;
  }
  
  .toc-list {
    grid-template-columns: 1fr;
  }
  
  .rules-section {
    padding: 20px;
  }
  
  .category-list {
    grid-template-columns: 1fr;
  }
  
  /* Search function mobile optimization */
  .search-container {
    padding: 20px;
    margin-bottom: 30px;
  }
  
  .search-box {
    max-width: 100%;
  }
  
  .search-input {
    padding: 12px 45px 12px 45px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .search-icon {
    left: 15px;
  }
  
  .clear-search {
    right: 15px;
  }
  
  .search-results {
    max-height: 250px;
  }
  
  .search-result-item {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .search-result-title {
    font-size: 1em;
  }
  
  .search-result-text {
    font-size: 0.9em;
  }
}

@media screen and (max-width: 480px) {
  .main-heading {
    font-size: 2.5em;
    margin-bottom: 20px;
    letter-spacing: 1.5px;
  }
  
  /* Search function small mobile optimization */
  .search-container {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .search-input {
    padding: 10px 40px 10px 40px;
    font-size: 16px;
  }
  
  .search-icon {
    left: 12px;
    font-size: 16px;
  }
  
  .clear-search {
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 16px;
  }
  
  .search-results {
    max-height: 200px;
  }
  
  .search-result-item {
    padding: 10px;
    margin-bottom: 6px;
  }
  
  .search-result-title {
    font-size: 0.95em;
  }
  
  .search-result-text {
    font-size: 0.85em;
    line-height: 1.3;
  }
}

@media screen and (max-width: 360px) {
  /* Search function very small mobile optimization */
  .search-container {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  .search-input {
    padding: 8px 35px 8px 35px;
    font-size: 16px;
  }
  
  .search-icon {
    left: 10px;
    font-size: 14px;
  }
  
  .clear-search {
    right: 10px;
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  
  .search-results {
    max-height: 150px;
  }
  
  .search-result-item {
    padding: 8px;
    margin-bottom: 4px;
  }
  
  .search-result-title {
    font-size: 0.9em;
  }
  
  .search-result-text {
    font-size: 0.8em;
    line-height: 1.2;
  }
}
