/* Host Screen */
#hor-host-screen {
  background: linear-gradient(135deg, #f5e8ff, #e3f5ff);
  padding: 40px 20px;
  text-align: center;
  border-radius: 20px;
  animation: fadeIn 0.6s ease-out;
  max-width: 650px;
  margin: 50px auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Title */
.hor-host-title {
  font-size: 28px;
  color: #4a148c;
  margin-bottom: 15px;
}

/* Description */
.hor-host-description {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 30px;
}

/* Gender Buttons Container */
.hor-gender-options {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

/* Gender Button Labels */
.hor-gender-label {
  background-color: #ffffff;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 180px;
  max-width: 60%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-weight: 600;
  font-size: 16px;
}

/* Visually hide the radio inputs but keep them functional */
.hor-gender-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Style when selected (touch/clicked) */
.hor-gender-label input[type="radio"]:checked + .hor-radio-icon {
  background-color: transparent;
}

.hor-gender-label.selected {
  background-color: #e1bee7;
  border-color: #6a1b9a;
  color: #6a1b9a;
  box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.2);
  transition: all 0.3s ease;
}

.hor-gender-label:hover {
  background-color: #f3e5f5;
  border-color: #ba68c8;
}

/* Hide radio buttons */
.hor-gender-label input[type="radio"] {
  display: none;
}

/* Radio icon (text with emoji) */
.hor-radio-icon {
  display: inline-block;
  padding: 8px 12px;
}

/* Generated Link Section */
.hor-link-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hidden {
  display: none !important;
}

#hor-generated-link {
  width: 100%;
  max-width: 420px;
  padding: 10px 15px;
  font-size: 14px;
  border: 2px solid #ccc;
  border-radius: 8px;
  outline: none;
  text-align: center;
  background-color: #fdfdfd;
}

/* Copy & Open Buttons */
#hor-copy-link,
#hor-open-link {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background-color: #6a1b9a;
  color: white;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 130px;
}

#hostbuttons {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

#hor-copy-link:hover,
#hor-open-link:hover {
  background-color: #8e24aa;
}

#hor-game-container {
    max-width: 100%;
    margin: auto;
    padding: 10px;
    text-align: center;
    overflow: hidden;
	position: relative;
}

#hor-instructions {
    text-align: center;
    padding: 12px 16px;
    background: linear-gradient(to right, #ffecd2, #fcb69f);
    color: #4b2e2e;
    font-weight: 600;
    border-bottom: 2px solid #f5c6aa;
    border-radius: 6px;
    margin: 10px;
    font-size: 1.05rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#hor-instructions.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Progress Bar */
#hor-progress-container {
    width: 100%;
    max-width: 500px;
    margin: 25px auto 10px;
    text-align: center;
}

#hor-progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 5px;
}

#hor-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    transition: width 0.4s ease;
}

#hor-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

#hor-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

#hor-scene {
    width: 100%;
    border-radius: 10px;
}

#hor-overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
	width: 100%;
    height: 100%;
}

#hor-object-list ul {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#hor-object-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
}

.hor-object-icon {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.hor-object-icon:hover {
    transform: scale(1.1);
}

#hor-end-screen.hidden {
    display: none;
}

/* End Screen Styling */
#hor-end-screen {
    text-align: center;
    padding: 40px 20px 50px;
    background: linear-gradient(135deg, #ffdde1 0%, #ee9ca7 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-top: 30px;
    animation: popIn 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* End screen reveal message */
#hor-result-message {
    font-size: 36px !important;
    font-weight: bold !important;
    color: #d63384;
    margin-bottom: 15px;
    text-shadow: 1px 1px #fff;
}

/* Gender Reveal Text Styling */
#hor-gender-text {
    font-size: 37px !important;
    font-weight: bold !important;
    color: #1e3a8a;
    margin-top: 20px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Gender Highlight */
.gender-placeholder {
    color: #ff69b4;
    font-size: 75px;
    font-weight: 900;
}

/* Proper Spacing Between Share Buttons and Play Again */
#hor-share-buttons {
    margin-top: 30px;
    display: flex !important;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#hor-play-again {
    margin-top: 25px;
    padding: 12px 24px;
    background-color: #198754;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
	animation: fadeIn 1.2s ease-in-out;
}

#hor-play-again:hover {
    background-color: #157347;
    transform: scale(1.06);
}

/* End screen entry animation */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.hor-fail-tip {
	font-size: 16px;
	color: #555;
	margin-top: 10px;
	margin-bottom: 20px;
	font-style: italic;
}

#hor-sparkle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

#hor-timer-bar {
    height: 30px;
    background-color: #4CAF50;
    transition: width 0.1s linear;
    border-radius: 5px;
    margin-top: 25px;
    position: relative;
    width: 100%;
	margin-bottom: 30px;
}

#hor-timer-text {
    position: absolute;
    right: 10px;
    top: 0;
    color: white;
    font-weight: bold;
}

/* Timer color changes */
#hor-timer-bar.green {
    background-color: #4CAF50;
}

#hor-timer-bar.orange {
    background-color: #ff9800;
}

#hor-timer-bar.red {
    background-color: #f44336;
    animation: bounce 0.6s infinite;
}

/* Bounce animation */
@keyframes bounce {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.08); }
}

#hor-share-buttons a {
    padding: 8px 16px;
    border-radius: 5px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
	font-size: 16px;
}

#hor-image-wrapper.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    0% { transform: translate(0px, 0px); }
    25% { transform: translate(5px, -5px); }
    50% { transform: translate(-5px, 5px); }
    75% { transform: translate(5px, 5px); }
    100% { transform: translate(0px, 0px); }
}

/* End Screen Analytics */
#hor-stats-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hor-stat-box {
  border-radius: 10px;
  padding: 15px 20px;
  margin: 10px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 80%;
  max-width: 300px;
  text-align: center;
  font-size: 16px;
}

#hor-game-container {
  transition: opacity 0.4s ease;
}
#hor-game-container[style*="display: none"] {
  opacity: 0;
}

@media (max-width: 600px) {
    #hor-share-buttons {
        flex-direction: column;
        align-items: center;
    }

    #hor-share-buttons a {
        width: 65%;
        text-align: center;
		display: block;
		margin: 0 auto;
    }
	#hor-timer-text {
		font-size: 15px;
	}
	.hor-gender-label {
    width: 60%;
  }

  #hor-copy-link,
  #hor-open-link {
    width: 80%;
  }
}

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

@media (max-width: 480px) {
    #hor-object-list ul {
        gap: 8px;
    }

    #hor-object-list ul li img {
        height: 40px;
    }
}