html,
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: linear-gradient(180deg, #a8d0e6, #f76c6c);
  min-height: 100vh;
}

/* typography and icons */

h1 {
  color: #0f8cdf;
  margin-bottom: 10px;
  font-size: 24px;
  letter-spacing: 1px;
  font-weight: 600;
}

i {
  font-size: 15px;
  cursor: pointer;
}

.fa-solid {
  color: #999;
}

.liked {
  color: red;
}

.retweeted {
  color: rgb(71, 124, 223);
}

.fa-heart.liked,
.fa-retweet.retweeted {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

/*Comments icon*/

.fa-regular.fa-comment-dots:hover {
  color: #1da1f2;
  transform: scale(1.08);
}

/*Heart icon*/

.fa-solid.fa-heart {
  color: rgb(223, 140, 140);
}

.fa-solid.fa-heart:hover {
  transform: scale(1.12);
  color: #e0245e;
}

/*Retweet icon*/

.fa-solid.fa-retweet {
  color: rgb(79, 167, 218);
}

.fa-solid.fa-retweet:hover {
  color: rgb(219, 159, 29);
  transform: scale(1.06);
}

/*Trash icon*/

.fa-solid.fa-trash:hover {
  color: #e74c3c;
  transform: scale(1.06);
}

/*Emojis*/
.emoji-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.emoji-btn {
  width: auto;
  padding: 6px 10px;
  font-size: 18px;
  background: #f0f8ff;
  border: 1px solid #1da1f2;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emoji-btn:hover {
  background: #e8f6ff;
  transform: scale(1.1);
}
/* layout */

main,
header {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

header {
  padding-bottom: 25px;
}

.tweet-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* textareas + btn */

textarea {
  border: none;
  padding: 10px;
  margin: 0 0 20px 0;
  height: 60px;
  width: 100%;
  font-size: 20px;
  line-height: 30px;
  background-color: #f7faff;
  border: 1px solid #1da1f2;
  border-radius: 4px;
}

button {
  background-color: #1da1f2;
  border: none;
  color: white;
  padding: 10px 19px;
  border-radius: 20px;
  width: 100%;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
}

button:hover {
  background-color: #0d8ddb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

button:focus,
.reply-btn:focus,
.fa-solid:focus,
.fa-regular:focus {
  outline: 3px solid rgba(29, 161, 242, 0.18);
  outline-offset: 2px;
  border-radius: 6px;
}

.reply-btn {
  padding: 8px 12px;
  width: auto;
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  color: #1da1f2;
  border: 1px solid #1da1f2;
  cursor: pointer;
  display: block;
  margin: 8px auto 0;
  text-align: center;
}
.reply-btn:hover {
  background: #e8f6ff;
  transform: translateY(-1px);
}

.reply-input-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.reply-input-area textarea {
  width: 100%;
  max-width: 520px;
}

/* tweet */

.tweet {
  border-top: 1px solid lightgray;
  padding: 20px 0 0 0;
  width: 100%;
  margin: 15px 0;
  transform: translateY(-2px);
}

.tweet:hover {
  background-color: #f0f8ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease-in-out;
}

.tweet-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tweet-details {
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  width: 160px;
}

.tweet-detail {
  display: flex;
  gap: 12px;
  font-size: 13px;
  align-items: center;
}

.tweet-reply {
  background: #f9fcff;
  border-left: 3px solid #1da1f2;
  border-radius: 6px;
  padding: 10px 15px;
  margin-top: 20px;
}

.tweet-reply:hover {
  background-color: #f0f8ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease-in-out;
}

.handle {
  font-size: 12px;
  font-weight: 500;
  color: #555;
  margin-top: 0;
}

.tweet-text {
  width: auto;
  max-width: 400px;
  line-height: 1.6;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.tweet,
.tweet-reply,
.tweet-inner img,
.fa-solid,
.fa-regular,
button,
.reply-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

/* images */

.chirper-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #1da1f2;
}

.chirper-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(15, 140, 223, 0.3);
  transition: all 0.3s ease;
}

.profile-pic {
  border: 1px solid #1da1f2;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  object-fit: cover;
  align-self: flex-start;
  margin-top: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* utility */
.hidden {
  display: none;
}

/*tablet frame*/

.tablet-frame {
  width: 600px;
  min-height: 800px;
  margin: 40px auto;
  border: 1px solid #ddd;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 30px;
  overflow-y: auto;
  background-color: #f7faff;
}

/*Media*/

@media (max-width: 600px) {
  body {
    background: linear-gradient(180deg, #dceefb, #fef6f6);
    font-size: 16px;
  }

  .tablet-frame {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 20px;
  }

  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  h1 {
    font-size: 22px;
    margin-top: 10px;
  }

  .chirper-logo {
    width: 36px;
    height: 36px;
  }

  .tweet-input-area {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-pic {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
  }

  textarea {
    font-size: 16px;
    height: 80px;
  }

  button {
    font-size: 18px;
    padding: 12px;
    border-radius: 16px;
  }

  .tweet-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tweet-text {
    width: 100%;
    font-size: 15px;
  }

  .tweet-details {
    width: 100%;
    justify-content: space-around;
    margin-top: 10px;
  }

  /* Dark-mode fallback for users who prefer it */
  @media (prefers-color-scheme: dark) {
    body {
      background: linear-gradient(180deg, #071427, #0b1220);
      color: #e6eef8;
    }
    .tablet-frame {
      background: #071427;
      border-color: #16202b;
    }
    textarea {
      background: #04202a;
      color: #e6eef8;
      border-color: #2b8be6;
    }
    .tweet-reply {
      background: rgba(255, 255, 255, 0.03);
      border-left-color: #1da1f2;
    }
  }
}
