/* General Body Styles */
/* General Body Styles */
/* General Body Styles */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh !important;
  font-family: 'Poppins', sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}


/* Loading Placeholder */
#loading-placeholder {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff03;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  backdrop-filter: blur(10px);
}
#loading-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #fff;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Start Screen & Main Container */
#start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 20, 30, 0.5);
  color: white;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  transition: opacity 2s ease;
}
.top-bar {
  width: 100%;
  padding: 0 5px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  margin-top: env(safe-area-inset-top); 
}
.brand-name {
  font-size: 1.25rem;
}
.brand-name a {
  color: white;
  text-decoration: none;
}
#views-container {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: flex-start;
    padding-top: 1em;
}

/* Business Card */
.business-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 0px;
    /* box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37); */
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.card-flipper {
  position: relative;
  width: 100%;
  min-height: 30rem;
}
.card-content, .info-content, .share-content {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.info-content, .share-content {
  display: none;
}
.business-card.is-flipped:not(.share-view) .card-content { display: none; }
.business-card.is-flipped:not(.share-view) .info-content { display: flex; }
.business-card.is-flipped.share-view .card-content { display: none; }
.business-card.is-flipped.share-view .info-content { display: none; }
.business-card.is-flipped.share-view .share-content { display: flex; }

.info-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.6s;
    transform: scaleX(-1);
    background: #ffffff33;
    border-radius: 10em;
    padding: .5em .563em;
}
.business-card.is-flipped:not(.share-view) .info-icon {
  transform: scaleX(1);
}
.share-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.3s ease;
    background: #ffffff33;
    border-radius: 10em;
    padding: .5em;
}
.share-content {
    justify-content: flex-start;
}
#qrcode-container {
    background: white;
    padding: 10px;
    border-radius: 15px;
    margin-bottom: 10px;
    border: 4px solid #ededed;
}
#qrcode-img {
    display: block;
    width: 150px;
    height: 150px;
}
.shortcode {
  font-size: 0.9rem;
  color: #eee;
  margin-bottom: 1.3em;
  font-weight: 600;
  gap: .5em;
  display: inline-flex;
  align-items: baseline; /* Changed for better vertical alignment */
  margin-top: 0em;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-all; /* More aggressive breaking for random strings */
}
p#shortcode-text {
    text-align: left;
}
.scan-me-text {
    font-size: 1.2rem;
    color: white;
    margin-top: 15px;
}

.profile-wrapper {
  margin: 0 auto 15px auto;
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}
.profile-wrapper::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(#ffffff3d 0deg 324deg, transparent 324deg 360deg);
  animation: rotateBorder 10s linear infinite;
}
.profile-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}
@keyframes rotateBorder {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.card-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: .1em 0 0 0;
}
.card-title {
    font-size: 1rem;
    font-weight: 300;
    color: #fff;
    margin-top: 0;
}
.contact-info {
  text-align: left;
  width: 100%;
}
.contact-info a {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    margin-bottom: .5em;
    font-size: 0.95rem;
    border-radius: 5em;
    padding: .75em;
    background: #ffffff29;
}
.contact-info i {
  width: 30px;
  text-align: center;
  margin-right: 15px;
}
.social-links {
  display: flex;
  margin: 20px 0;
  justify-content: space-evenly;
  gap: 1rem;
}
.social-links a {
  color: #fff;
  font-size: 1.5rem;
}
#start-button, .info-content button, #share-button {
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}
#start-button, .info-content button {
  color: #000000;
  background: #ffffff;
  width: 100%;
}
#share-button {
  color: #ffffff;
  background: #ffffff33;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px;
}
/* --- Keyframe animation for the shine effect --- */
@keyframes shineMove {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Main wrapper for the combined button --- */
#start-button-wrapper {
  display: flex;
  position: relative;
  overflow: hidden;
  min-height: 3.5em;
  border-radius: 50px;
  background: transparent;
}

/* The shining gradient effect, applied ONLY to the wrapper */
#start-button-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.47) 0%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.47) 80%);
    background-size: 200% 200%;
    animation: shineMove 3s linear infinite;
    z-index: 0; /* Places shine effect behind the button text/icon */
}

/* --- Simplified style for the inner "Launch VR" button --- */
#start-button {
  flex-grow: 1; /* Fills available space */
  background: transparent;
  border: none;
  z-index: 1; /* Ensures text is on top of the shine effect */
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  padding: 15px 30px;
}

/* --- Style for the inner reset icon button --- */
#start-screen-reset-button {
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 1em;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 1; /* Ensures icon is on top of the shine effect */
  transition: background-color 0.2s ease;
}

#start-screen-reset-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* --- Spin Animation for Reset Icon --- */
@keyframes spin-once-anim {
  to {
    transform: rotate(360deg);
  }
}

#start-screen-reset-button.spin-once i {
  animation: spin-once-anim 0.5s ease-out;
}
/* Info Content */
.info-content h1 {
  font-size: 1.5rem;
  margin: 0;
}
.info-content p {
    font-size: 0.95rem;
    color: #eee;
    line-height: 1.6;
    margin: 10px 0;
}
.brand-name2 {
    font-size: 1rem;
    padding-top: 15px;
}
.brand-name2 a {
    color: white;
    text-decoration: none;
}

/* --- New Styles for Multi-User UI --- */
.view {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.hidden {
    display: none !important;
}
.nav-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    z-index: 1002;
    border-radius: 50%;
}
#nav-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #ffffff14;
    z-index: 1001;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}
#nav-menu.open {
    right: 0;
}
#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
#nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: env(safe-area-inset-top); 
}
#nav-user-shortcode {
    font-weight: 600;
    color: #ffffff;
}
.nav-content {
    display: flex;
    flex-direction: column;
    padding: 10px;
}
.nav-content button {
    background: #ffffff29;
    border: none;
    color: white;
    text-align: left;
    padding: 15px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Poppins', sans-serif;
    margin-bottom: .5em;
}
.nav-content button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Add User & Saved Cards Views */
.form-container, #saved-cards-view {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    box-sizing: border-box;
}
#add-user-form textarea#shortcode-input {
    width: 100%;
    min-height: 110px; /* Provides enough height for about 4 lines of wrapped text */
    padding: 15px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4; /* Improves readability of wrapped text */
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    box-sizing: border-box;
    resize: none; /* Prevents the user from resizing the box */
    word-wrap: break-word; /* Ensures the long hash wraps correctly */
}
#add-user-form button {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: white;
    color: black;
}
#saved-cards-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
    margin-top: 20px;
}
.saved-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.saved-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.saved-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.saved-card-info h3 {
    margin: 0;
    font-size: 1.1rem;
}
.saved-card-info p {
    margin: 0;
    color: #a9a9b3;
    font-size: 0.9rem;
}

/* A-Frame & UI Icons */
.a-modal { display: none !important; }
.ui-icon {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 2em;
    text-align: center;
    line-height: 2em;
    cursor: pointer;
    background: #ffffff38;
    border-radius: 50rem;
    pointer-events: none;
     margin-top: env(safe-area-inset-top); 
     backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.start-screen-active .ui-icon {
  display: none !important;
}
.ui-icon.visible {
  opacity: 0.75;
  pointer-events: auto;
}
#target-icon {
    z-index: 10000;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
#rotate-icon {
    right: 25px;
    left: auto;
    bottom: 25px;
    top: unset;
}
/* Download Progress View */
#download-progress-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff14;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
    backdrop-filter: blur(10px);
}
.progress-content {
    text-align: center;
    max-width: 300px;
}
#progress-profile-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid rgba(255, 255, 255, 0.5);
}
.progress-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}
.progress-content p {
    margin: 0 0 20px 0;
    color: #a9a9b3;
}
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}
#progress-bar {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Confirmation Modal */
#confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}
.modal-content p {
    margin: 0 0 25px 0;
    color: #333333;
    line-height: 1.6;
}
.modal-buttons {
    display: flex;
    gap: 15px;
}
.modal-buttons button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.modal-buttons button:hover {
    transform: scale(1.05);
}
#modal-cancel-button {
    background: rgb(55 55 55);
    color: #ffffff;
}
#modal-confirm-button {
    background: #e53935;
    color: white;
}

/* Saved Card Delete Icon */
.saved-card {
    justify-content: space-between;
}
.saved-card-main {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}
.delete-user-icon {
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 10em;
    transition: opacity 0.2s ease;
    background: #ffffff1f;
}
.delete-user-icon:hover {
    opacity: 1;
}

/* --- Saved Cards Search --- */
.saved-cards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.saved-cards-header h2 {
    margin: 0;
}
#search-icon {
    font-size: 1.2rem;
    cursor: pointer;
    color: #a9a9b3;
    padding: 5px;
}
#search-cards-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    box-sizing: border-box;
    outline: none;
}

body.start-screen-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
    margin-left:0% !important;
     
}

/* Updating View */
#updating-vision-card-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 30, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

/* QR Scanner */
#qr-scanner-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
}
#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#cancel-scan-button {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: 1px solid white;
    border-radius: 50px;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    color: white;
}

#back-icon {
    bottom: 25px;
    left: 25px;
    z-index: 10000;
    opacity: .75;
    pointer-events: auto;
}

#grab-icon {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.add-user-input-group {
    display: flex;
    gap: .5em;
    margin-bottom: 30px;
    flex-direction: column;
}

.user-nav {
    display: flex;
    flex-direction: column;
    gap: .25em;
}

#reset-button {
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.6s;
    border: none;
    background: #ffffff3d;
    border-radius: .4em;
    padding: .25em 1em;
}

.brand-name {
    cursor: pointer;
}

.fa-solid.fa-comment-dots {
    margin-right: 0;
}

.nav-spacer {
    color: white;
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 2em;
}

#xvoox-icon {
    bottom: 30px;
    left: 25px;
    position: fixed;
    color: white;
    font-size: 1.25em;
    opacity: 1;
    top: unset;
    height: unset;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: 30%;
    text-align: left;
}