:root {
  --turquoise: #20808D;
  --paper: #FBFAF4;
  --off-black: #091717;
  --accent: #00D9FF;
  --light-gray: #E8E8E8;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--paper);
  color: var(--off-black);
}

/* Mobile alert */
.mobile-alert {
  position: fixed;
  inset: 0;
  background: rgba(9, 23, 23, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.mobile-alert-box {
  background: var(--paper);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
}

.mobile-alert-box h2 {
  margin: 0 0 16px;
  color: var(--turquoise);
  font-size: 1.8rem;
}

.mobile-alert-box p {
  margin: 8px 0;
  color: var(--off-black);
  line-height: 1.6;
}

.mobile-alert-box strong {
  color: var(--turquoise);
}

.btn-mobile {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  background: var(--turquoise);
  color: var(--paper);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-mobile:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 217, 255, 0.3);
}

/* Desktop view */
.desktop-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hero {
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(9, 23, 23, 0.4) 0%,
    rgba(32, 128, 141, 0.15) 100%
  );
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  padding-top: 420px;
}

.counter-top-right {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(251, 250, 244, 0.12);
  border: 1px solid rgba(251, 250, 244, 0.2);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  z-index: 100;
}

.title {
  display: none;
}

.subtitle {
  display: none;
}

.link-section {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 750px;
}

.link-input {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
  padding: 14px 20px;
  border: 2px solid rgba(251, 250, 244, 0.7);
  border-radius: 12px;
  font-size: 0.95rem;
  background: rgba(251, 250, 244, 0.2);
  color: var(--paper);
  font-weight: 600;
  cursor: text;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: normal;
}

.link-input::placeholder {
  color: rgba(251, 250, 244, 0.5);
}

.link-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.3);
  border-color: var(--accent);
  background: rgba(251, 250, 244, 0.3);
}

.btn {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-copy {
  background: rgba(0, 217, 255, 0.9);
  color: var(--off-black);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 217, 255, 0.5);
}

.btn-copy:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 217, 255, 0.5);
}

.btn-copy:active {
  transform: translateY(-1px);
}

.btn-open {
  background: rgba(9, 23, 23, 0.85);
  color: var(--paper);
  text-decoration: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(251, 250, 244, 0.3);
}

.btn-open:hover {
  background: rgba(32, 128, 141, 0.95);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(32, 128, 141, 0.5);
}

.btn-open:active {
  transform: translateY(-1px);
}

.btn-guide {
  background: rgba(0, 217, 255, 0.8);
  color: var(--off-black);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 217, 255, 0.4);
  margin-top: 12px;
}

.btn-guide:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 217, 255, 0.5);
}

.stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(251, 250, 244, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(251, 250, 244, 0.2);
  backdrop-filter: blur(8px);
  margin-bottom: 24px;
}

.stat-label {
  color: var(--paper);
  font-weight: 500;
  opacity: 0.95;
  font-size: 0.9rem;
}

.stat-value {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 700;
}

.guide {
  background: rgba(251, 250, 244, 0.1);
  border: 1px solid rgba(251, 250, 244, 0.2);
  padding: 20px 28px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  text-align: center;
  max-width: 600px;
}

.guide h3 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.guide ol {
  margin: 0 0 14px;
  padding-left: 1.8rem;
  color: var(--paper);
  opacity: 0.9;
  line-height: 1.8;
  text-align: left;
}

.guide li {
  margin-bottom: 8px;
}

.guide-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--paper);
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

/* Guide Modal Popup */
.guide-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 23, 23, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.guide-modal-content {
  background: rgba(251, 250, 244, 0.95);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 60px rgba(9, 23, 23, 0.4);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--off-black);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.close-btn:hover {
  opacity: 1;
}

.guide-modal-content h2 {
  margin: 0 0 20px;
  color: var(--turquoise);
  font-size: 1.8rem;
}

.guide-modal-content ol {
  margin: 0 0 20px;
  padding-left: 1.5rem;
  color: var(--off-black);
  line-height: 1.8;
}

.guide-modal-content li {
  margin-bottom: 12px;
}

.guide-modal-content .guide-note {
  color: var(--off-black);
  opacity: 0.8;
}

/* Notifications */
.copy-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--turquoise);
  color: var(--paper);
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  animation: slideIn 0.3s ease;
  z-index: 1000;
}

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

/* Tablet */
@media (max-width: 1024px) {
  .hero {
    height: auto;
    min-height: 100vh;
  }

  .card {
    padding: 40px;
  }

  .title {
    font-size: 2.8rem;
  }

  .link-section {
    flex-direction: column;
  }

  .link-input {
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .card {
    padding: 30px 20px;
  }

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .link-section {
    flex-direction: column;
    gap: 10px;
  }

  .link-input {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .stats {
    flex-direction: column;
    gap: 8px;
  }
}

