/* LINKING FONT */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* WEBPAGE LAYOUT */
* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

:root {
  --ordinary-color: #ffffff;
  --main-color: #00abf0;
  --bg-color: #000000;
  --sth-color: rgb(192, 64, 85);
  --secondary-bg-color: #112e42;
  --input-textarea-color: #112e4250;
}

/* HERO LAYOUT */
.hero {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(45deg, var(--secondary-bg-color), var(--sth-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--ordinary-color);
}

.hero h1{
    font-size: 45px;
    font-weight: 500;
    margin-top: -50px;
    margin-bottom: 50px;
}

.hero h1 span {
    color: var(--main-color);
}

textarea {
    width: 600px;
    height: 250px;
    background: var(--input-textarea-color);
    backdrop-filter: blur(15px);
    color: var(--main-color);
    font-size: 15px;
    border: none;
    padding: 20px;
    border-radius: 10px;
    resize: none;
    margin-bottom: 30px;
    outline: 0;
    overflow: auto;
}

textarea::-webkit-scrollbar {
  display: none;
}

textarea:hover {
    border: 2px solid var(--main-color);
}

textarea::placeholder {
    font-size: 14px;
    color: var(--main-color);
}

.row {
    width: 600px;
    display: flex;
    align-items: center;
    gap: 20px;
}

button {
    background: var(--main-color);
    color: var(--bg-color);
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 35px;
    border: 0;
    outline: 0;
    cursor: pointer;
}

button i {
    margin-right: 8px;
}

button i:hover {
    color: var(--sth-color);
}

button:hover {
    background: var(--bg-color);
    color: var(--main-color);
    border: 2px solid var(--main-color);
}

select {
    flex: 1;
    color: var(--main-color);
    background: var(--input-textarea-color);
    height: 50px;
    padding: 0 20px;
    outline: 0;
    border: 0;
    border-radius: 35px;
    cursor: pointer;
}

select:hover {
    border: 2px solid var(--main-color);
}

/* FOOTER LAYOUT */
.footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: var(--bg-color);
    padding: 2rem 9%;
    cursor: pointer;
}

.footer-text p{
    font-size: 16px;
    color: var(--main-color);
}

.footer span {
    color: var(--main-color);
    font-size: 16px;
    cursor: pointer;
}

.footer span:hover {
    color: var(--sth-color);
}

.glitch {
  position: relative;
  font-size: 64px;
  font-weight: 900;
  color: #00abf0;
  letter-spacing: 2px;
  display: inline-block;
  animation: flicker 3s infinite;
}

/* Layers for glitch */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

/* Cyan layer */
.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #00ffff;
  clip: rect(0, 100%, 45%, 0);
  animation: glitchTop 2s infinite linear alternate-reverse;
}

/* Magenta layer */
.glitch::after {
  left: -2px;
  text-shadow: 2px 0 #ff2a6d;
  clip: rect(55%, 100%, 100%, 0);
  animation: glitchBottom 2.5s infinite linear alternate-reverse;
}

/* Flicker base */
@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.1; }
}

/* Top slice glitch */
@keyframes glitchTop {
  0% { transform: translate(0px,0px); }
  10% { transform: translate(-5px,-5px) skew(-5deg); }
  20% { transform: translate(5px,5px) skew(5deg); }
  30% { transform: translate(-5px,5px) skew(-5deg); }
  40% { transform: translate(5px,-5px) skew(5deg); }
  50% { transform: translate(-3px,-3px) skew(-3deg); }
  60% { transform: translate(3px,3px) skew(3deg); }
  70% { transform: translate(-5px,2px) skew(-4deg); }
  80% { transform: translate(4px,-3px) skew(4deg); }
  90% { transform: translate(-2px,5px) skew(-2deg); }
  100% { transform: translate(0px,0px) skew(0deg); }
}

/* Bottom slice glitch */
@keyframes glitchBottom {
  0% { transform: translate(0px,0px); }
  10% { transform: translate(5px,5px) skew(5deg); }
  20% { transform: translate(-5px,-5px) skew(-5deg); }
  30% { transform: translate(5px,-5px) skew(5deg); }
  40% { transform: translate(-5px,5px) skew(-5deg); }
  50% { transform: translate(3px,3px) skew(3deg); }
  60% { transform: translate(-3px,-3px) skew(-3deg); }
  70% { transform: translate(4px,-5px) skew(4deg); }
  80% { transform: translate(-4px,3px) skew(-4deg); }
  90% { transform: translate(2px,-5px) skew(2deg); }
  100% { transform: translate(0px,0px) skew(0deg); }
}




/* ========== RESPONSIVE DESIGN ========== */

/* Mobile-first width behavior */
textarea,
.row {
  width: 100%;
  max-width: 600px;
}

/* Center + spacing on small screens */
.hero {
  padding: 20px;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  margin-top: 10px;
}

/* Stack controls on mobile */
.row {
  flex-direction: column;
}

/* Footer stack layout */
.footer {
  gap: 1rem;
  text-align: center;
}

/* 📱 Small Phones */
@media (max-width: 480px) {
  textarea {
    height: 200px;
    font-size: 14px;
    padding: 15px;
  }

  button {
    width: 100%;
  }

  select {
    width: 100%;
  }
}

/* 📲 Tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .hero h1 {
    font-size: 38px;
  }

  .row {
    flex-direction: column;
  }

  button,
  select {
    width: 100%;
  }
}

/* 💻 Desktop */
@media (min-width: 769px) {
  .row {
    flex-direction: row;
    max-width: 600px;
  }

  textarea {
    max-width: 600px;
  }
}
