/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background-color: #f0f2f5;
  color: #1c1e21;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  user-select: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
  border-bottom: 1px solid #dddfe2;
  padding: 8px 16px;
  height: 56px;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: 40px;
  height: 40px;
}

/* Container */
.container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Post Header */
.post-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e4e6eb;
}

.post-user {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  flex: 1;
}

.name-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.name {
  font-weight: 600;
  font-size: 15px;
  color: #050505;
}

.options {
  color: #65676b;
  font-size: 20px;
  font-weight: bold;
}

.meta {
  font-size: 13px;
  color: #65676b;
}

.globe-icon {
  margin-left: 4px;
}

.post-caption {
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.3333;
}

/* Content */
.content {
  width: 100%;
}

/* Content Box */
.content-box {
  background-color: #fff;
  border: none;
  padding-bottom: 20px;
  width: 100%;
  margin: 0 auto;
}

/* Image Container */
.image-container {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.profile-image {
  width: 100%;
  display: block;
  max-height: 350px;
  object-fit: cover;
  object-position: top;
}

.name-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #DFF0D8;
  color: #3C763D;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
}

/* Text Content */
.text-content {
  padding: 0 15px;
  text-align: center;
}

.title {
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 18px;
  color: #1c1e21;
  margin-bottom: 10px;
  text-align: center;
}

.subtitle {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 15px;
  color: #1c1e21;
}

.highlight {
  color: #1877f2;
}

.uppercase {
  text-transform: uppercase;
}

.block {
  display: block;
  margin-bottom: 5px;
}

/* Pagination Dots */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #ccc;
  border-radius: 50%;
}

.dot.active {
  background-color: #1877f2;
}

/* Action Buttons */
.action-container {
  padding: 0 15px;
  margin-top: 20px;
}

.action-button {
  display: block;
  width: 100%;
  height: 48px;
  padding: 10px;
  background-color: #1877f2;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  line-height: 28px;
}

.action-button:hover {
  background-color: #166fe5;
}

.action-button.secondary {
  background-color: #e4e6eb;
  color: #050505;
}

.action-button.secondary:hover {
  background-color: #d8dadf;
}

.double-button {
  display: flex;
  gap: 15px;
}

.double-button .action-button {
  flex: 1;
}

.disclaimer {
  font-size: 12px;
  color: #65676b;
  text-align: center;
  margin-top: 12px;
}

/* Selection Grid */
.selection-subtitle {
  font-size: 13px;
  color: #65676b;
  margin-bottom: 20px;
}

.selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 15px;
}

.selection-item {
  position: relative;
}

.selection-item input[type="checkbox"] {
  display: none;
}

.selection-item label {
  display: flex;
  flex-direction: column;
  border: 1px solid #e4e6eb;
  background-color: #f7f8fa;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.selection-item label img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: top;
}

.selection-item label span {
  padding: 8px 5px;
  text-align: center;
  font-size: 13px;
  color: #1877f2;
}

.selection-item input[type="checkbox"]:checked + label {
  border: 2px solid #1877f2;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 16px;
  background-color: #e4e6eb;
  border: 1px solid #1877f2;
  border-radius: 20px;
  overflow: hidden;
  margin: 15px 0;
}

.progress-fill {
  width: 0;
  height: 100%;
  background-color: #1877f2;
  border-radius: 20px;
  transition: width 4s ease-in-out;
}

/* Final Result Box */
.result-box {
  background-color: #f7f8fa;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  text-align: left;
}

.result-box p {
  margin-bottom: 15px;
  line-height: 1.5;
}

.result-box .highlight {
  margin: 10px 0;
}

/* Step Visibility */
.step {
  display: none;
  width: 100%;
}

.step.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

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

.hidden-btn {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Reactions */
.reactions {
  padding: 10px 16px;
  border-top: 1px solid #e4e6eb;
}

.reaction-counts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.reaction-icons {
  display: flex;
}

.reaction-text, .comments-count {
  font-size: 13px;
  color: #65676b;
}

.reaction-buttons {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #e4e6eb;
}

.reaction-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 2px;
  background: none;
  border: none;
  border-radius: 4px;
  color: #65676b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.reaction-button:hover {
  background-color: #f2f2f2;
}

.reaction-button.active {
  background-color: #f0f2f5;
  color: #1877f2;
}

/* Comments */
.comments-section {
  padding: 10px 16px;
  border-top: 1px solid #e4e6eb;
}

.comment {
  display: flex;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
  overflow: hidden;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-content {
  background-color: #f0f2f5;
  border-radius: 18px;
  padding: 8px 12px;
  max-width: 85%;
}

.comment-name {
  font-weight: 600;
}

.comment-text {
  margin-top: 2px;
}

/* Landscape Warning */
.mobile-landscape-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.mobile-landscape-warning__box {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  text-align: center;
}

.mobile-landscape-warning__icon-box {
  height: 60px;
  margin-bottom: 20px;
  background-image: url('../img/landscape-warning.svg');
  background-repeat: no-repeat;
  background-position: center;
}

.mobile-landscape-warning p {
  color: white;
  font-size: 16px;
}

@media (orientation: landscape) and (max-width: 900px) {
  .mobile-landscape-warning {
    display: flex;
  }
}

/* Touch feedback */
.active-touch {
  opacity: 0.7;
  transition: opacity 0.1s;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
  .header {
    height: auto;
    padding: 15px 0;
    background-color: #f0f2f5;
  }
  
  .header-logo {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .logo {
    width: 180px;
    height: 40px;
  }
  
  body {
    background-color: #fff;
  }
  
  .container {
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    width: 100%;
  }
  
  .post-header {
    padding: 8px 12px;
  }
  
  .post-caption {
    font-size: 14px;
    line-height: 1.3;
  }
  
  .avatar {
    width: 36px;
    height: 36px;
  }
  
  .name {
    font-size: 14px;
  }
  
  .meta {
    font-size: 12px;
  }
  
  .title {
    font-size: 16px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .action-button {
    height: 42px;
    font-size: 15px;
    line-height: 24px;
  }
  
  .selection-grid {
    gap: 8px;
    padding: 0 10px;
  }
  
  .selection-item label img {
    height: 110px;
  }
  
  .selection-item label span {
    font-size: 12px;
    padding: 6px 4px;
  }
  
  .result-box {
    padding: 12px;
    font-size: 13px;
  }
  
  .comment-content {
    max-width: 80%;
    font-size: 13px;
  }
  
  .reaction-button {
    font-size: 12px;
  }
  
  /* Footer Mobile Improvements */
  .reactions {
    padding: 8px 12px;
  }
  
  .reaction-counts {
    margin-bottom: 8px;
  }
  
  .reaction-text, 
  .comments-count {
    font-size: 12px;
  }
  
  .comments-section {
    padding: 8px 12px;
  }
  
  .comment {
    margin-bottom: 10px;
  }
  
  .comment-avatar {
    width: 28px;
    height: 28px;
    margin-right: 6px;
  }
}

/* Very Small Screen Adjustments */
@media (max-width: 360px) {
  .post-user {
    margin-bottom: 4px;
  }
  
  .avatar {
    width: 32px;
    height: 32px;
  }
  
  .selection-grid {
    gap: 6px;
  }
  
  .selection-item label img {
    height: 100px;
  }
  
  .comment-avatar {
    width: 26px;
    height: 26px;
  }
  
  .comment-content {
    padding: 6px 10px;
    max-width: 75%;
    font-size: 12px;
  }
  
  .action-button {
    height: 38px;
    font-size: 14px;
    line-height: 20px;
  }
  
  .reaction-button {
    padding: 4px 2px;
    font-size: 11px;
  }
  
  .reaction-text, 
  .comments-count {
    font-size: 11px;
  }
}

/* Tablet & Desktop Adjustments */
@media (min-width: 768px) {
  .container {
    max-width: 500px;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  
  .title {
    font-size: 22px;
  }
  
  .subtitle {
    font-size: 16px;
  }
  
  .selection-grid {
    gap: 15px;
  }
  
  .selection-item label img {
    height: 140px;
  }
  
  /* Improved Footer for Desktop */
  .reactions {
    padding: 12px 18px;
  }
  
  .reaction-buttons {
    padding-top: 12px;
  }
  
  .reaction-button {
    font-size: 14px;
    padding: 8px 4px;
  }
  
  .comments-section {
    padding: 12px 18px;
  }
  
  .comment {
    margin-bottom: 14px;
  }
  
  .comment-content {
    max-width: 90%;
  }
}