.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium) ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 1rem;
  width: 90%;
  max-width: 50rem;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  transition: all var(--transition-medium) ease;
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  background: var(--accent-primary);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: var(--bg-primary);
  font-size: 2.4rem;
}

.close-modal {
  color: var(--bg-primary);
  font-size: 3rem;
  cursor: pointer;
  transition: all var(--transition-fast) ease;
}

.close-modal:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 3rem 2.5rem;
}

.modal-body p {
  margin-bottom: 3rem;
  font-size: 1.8rem;
  color: var(--text-secondary);
  text-align: center;
}

.modal-body .input-container {
  margin-bottom: 3rem;
}

.modal-body input {
  width: 100%;
  padding: 1.5rem 2rem;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-primary);
  transition: all var(--transition-medium) ease;
}

.modal-body input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 204, 153, 0.2);
}

.modal-body input::placeholder {
  color: var(--text-muted);
}

.modal-body button {
  display: block;
  width: 100%;
  padding: 1.5rem;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 0.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium) ease;
}

.modal-body button:hover {
  background: var(--accent-secondary);
  transform: translateY(-3px);
}


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

.modal.active .modal-content {
  animation: modalFadeIn 0.6s ease;
}


@media (max-width: 576px) {
  .modal-header h2 {
    font-size: 2rem;
  }
  
  .modal-body {
    padding: 2.5rem 2rem;
  }
  
  .modal-body p {
    font-size: 1.6rem;
  }
  
  .close-modal {
    font-size: 2.5rem;
  }
}


.name-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.name-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.name-modal {
  width: 90%;
  max-width: 500px;
  background: linear-gradient(135deg, rgba(30, 50, 80, 0.95), rgba(10, 25, 47, 0.98));
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(139, 170, 154, 0.1);
  transform: scale(0.8) translateY(30px);
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.name-modal-overlay.active .name-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.name-modal h2 {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s forwards;
}

.name-modal p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s forwards;
}

.name-input-container {
  position: relative;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.7s forwards;
}

.name-input {
  width: 100%;
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 170, 154, 0.3);
  border-radius: 10px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
}

.name-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(139, 170, 154, 0.2);
}

.name-input-error {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: left;
  display: none;
}

.name-submit-btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent-primary), #4fc3a1);
  color: var(--bg-primary);
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.9s forwards;
}

.name-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.name-modal-decoration {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 170, 154, 0.2), transparent 70%);
  z-index: -1;
}

.decoration-1 {
  top: -50px;
  left: -50px;
}

.decoration-2 {
  bottom: -50px;
  right: -50px;
}


.welcome-popup {
  background: linear-gradient(135deg, rgba(30, 50, 80, 0.95), rgba(10, 25, 47, 0.98)) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(139, 170, 154, 0.1) !important;
}

.welcome-title {
  color: var(--text-primary) !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
}

.welcome-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(139, 170, 154, 0.3) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  padding: 1rem !important;
  font-size: 1.1rem !important;
}

.welcome-input:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 2px rgba(139, 170, 154, 0.2) !important;
}

.welcome-button {
  background: linear-gradient(135deg, var(--accent-primary), #4fc3a1) !important;
  color: var(--bg-primary) !important;
  border-radius: 50px !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  padding: 0.8rem 2rem !important;
  transition: all 0.3s ease !important;
}

.welcome-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.welcome-highlight {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}

.welcome-content {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 1.5rem;
}

.welcome-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: wave 2s infinite;
}


.animated-popup {
  border-radius: 20px !important;
  background: linear-gradient(135deg, rgba(30, 50, 80, 0.95), rgba(10, 25, 47, 0.98)) !important;
  border: 1px solid rgba(139, 170, 154, 0.2) !important;
}

.animated-title {
  margin-top: 1rem !important;
}

.animated-content {
  color: var(--text-primary) !important;
}

.animated-button {
  background: linear-gradient(135deg, var(--accent-primary), #4fc3a1) !important;
  color: var(--bg-primary) !important;
  border-radius: 50px !important;
  padding: 0.8rem 2rem !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(139, 170, 154, 0.3) !important;
}

.animated-button:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(139, 170, 154, 0.5) !important;
}


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

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

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

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.animate__animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.animate__fadeIn {
  animation-name: fadeIn;
}

.animate__fadeInDown {
  animation-name: fadeInDown;
}

.animate__fadeOutUp {
  animation-name: fadeOutUp;
}

.animate__faster {
  animation-duration: 0.5s;
}


@media (max-width: 576px) {
  .name-modal {
    padding: 2rem 1.5rem;
  }
  
  .name-modal h2 {
    font-size: 1.7rem;
  }
}




.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}


.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(18, 26, 52, 0.8));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}


.modal-content {
    position: relative;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(139, 170, 154, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 450px;
    padding: 0;
    overflow: hidden;
    transform: translateY(50px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: modalSlideIn 0.6s ease-out forwards;
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}


.modal-header {
    position: relative;
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(139, 170, 154, 0.1), rgba(183, 110, 121, 0.1));
    border-bottom: 1px solid rgba(139, 170, 154, 0.2);
}

.modal-icon {
    margin-bottom: 1rem;
    font-size: 3rem;
    color: var(--sage-green);
    text-shadow: 0 0 20px rgba(139, 170, 154, 0.5);
    animation: iconPulse 2s infinite ease-in-out;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--sage-green), var(--copper));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-align: center;
    line-height: 1.2;
}


.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
    transform: scale(1.1);
}


.modal-body {
    padding: 1.5rem 2rem 2rem;
}

.modal-subtitle {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    text-align: center;
    opacity: 0.9;
}

.modal-question {
    margin: 0 0 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}


.input-container {
    margin-bottom: 2rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sage-green);
    font-size: 1rem;
    z-index: 1;
}

#visitor-name {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(139, 170, 154, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#visitor-name:focus {
    outline: none;
    border-color: var(--sage-green);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 170, 154, 0.2);
}

#visitor-name::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}


.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--sage-green), var(--copper));
    transition: width 0.3s ease;
    border-radius: 1px;
}

#visitor-name:focus + .input-border {
    width: 100%;
}


.input-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-left: 0.5rem;
}


.modal-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}


.modal-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
    text-align: center;
    padding: 1rem;
    background: rgba(139, 170, 154, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--sage-green);
}

.modal-note i {
    color: var(--sage-green);
    font-size: 0.9rem;
}


@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}


@keyframes modalSlideIn {
    0% {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}


@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .btn {
        padding: 1rem;
    }
}


@media (prefers-color-scheme: dark) {
    .modal-content {
        background: linear-gradient(145deg, #1a2238, #121a34);
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(139, 170, 154, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    #visitor-name {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(139, 170, 154, 0.4);
    }
    
    #visitor-name:focus {
        background: rgba(255, 255, 255, 0.06);
    }
}
