/* Сброс и базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #fff;
  overflow-x: hidden;
  font-size: 14px;
}

/* Header */
.header {
  background-color: #587ec9;
  color: white;
  padding: 10px;
  text-align: center;
  position: relative;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__menu,
.header__icon {
  display: inline-block;
  width: 18px;
  height: 16px;
  background-repeat: no-repeat;
  background-size: contain;
  top: 13px;
}

.header__menu {
  background-image: url(../img/icon-menu.png);
  left: 10px;
}

.header__icon {
  background-image: url(../img/icon-mail.png);
  right: 10px;
}

.header__title {
  font-size: 1.1em;
  display: inline-block;
  align-self: center;
  text-align: center;
}

/* Main */
.main {
  padding: 6px 12px 60px;
}

/* First Page */
.date {
  font-size: 0.85em;
  color: #9c9c9c;
  padding-bottom: 10px;
  margin: 0;
}

.subheadline {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.subheadline p {
  margin: 4px 0;
}

.intro {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.4;
}
.intro-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Wheel */
.wheel {
  position: relative;
  text-align: center;
  background-color: #fff;
  border-radius: 3px;
  padding: 5px;
}

.wheel__image {
  width: 100%;
  max-width: 501px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.wheel__button {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 25%;
  aspect-ratio: 1 / 1;
  max-width: 100px;
  background: url(../img/spin-btn.png) no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  background-color: transparent;
}

.wheel__mockup {
    pointer-events: none;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(360deg) scale(0);
    max-width: 200px;
    z-index: 3;
}
.wheel__mockup.active {
    animation: rotate 2s ease forwards;
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(360deg) scale(0); opacity: 0;}
    100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 1;}
}

/* Animations */
.spinAround {
  animation: spin 6.6s forwards;
}

.spinAround2 {
  animation: spin2 6.6s forwards;
}

@keyframes spin {
  0% { transform: rotate(0); }
  90% { transform: rotate(3130deg); }
  95% { transform: rotate(3125deg); }
  100% { transform: rotate(3128deg); }
}

@keyframes spin2 {
  0% { transform: rotate(3128deg); }
  90% { transform: rotate(6415deg); }
  95% { transform: rotate(6412deg); }
  100% { transform: rotate(6410deg); }
}

/* First Page */
.first-page {
  padding-top: 1rem;
}

/* Second Page */
.second-page {
  display: none;
  background: #fff;
  margin-top: 15px;
}

.congrats h4 {
  color: #587ec9;
  text-align: center;
  font-size: 18px;
  line-height: 1.4;
}

.share-content {
  max-width: 400px;
  margin: 0 auto;
  font-size: 13px;
}

.share-action {
    margin-left: auto;
}

.congrats-text {
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 1rem 0;
    line-height: 1.5;
    font-size: 14px;
}

.timer {
  font-size: 16px;
  color: red;
  margin: 15px 0;
  text-align: center;
}

.prize table {
  width: 100%;
  border-collapse: collapse;
}

.prize__image-cell {
  padding: 5px 10px 10px 0;
  text-align: center;
  vertical-align: top;
}

.prize__image-cell img {
  max-width: 100px;
}

.prize__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    line-height: 1.4;
}

.prize__date,
.prize__available {
  margin: 6px 0;
}

.prize-date {
    color: green;
    font-weight: 600;
}

.share-btn {
    margin-top: 1rem;
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 20px;
  background-color: #587ec9;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

/* Comments */
.border-bottom {
  border-bottom: 1px solid #dfe3e8;
}

.likes-summary {
  display: flex;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 10px;
}

.likes-avatars {
  display: flex;
}

.likes-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
}

.likes-avatar:first-child {
  margin-left: 0;
}

.likes-text {
  font-size: 13px;
  color: #909499;
  margin-left: 8px;
}

.actions {
  padding: 10px 0;
}

.actions__wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.action {
  display: flex;
  align-items: center;
  color: #999;
  font-weight: bold;
}

.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url(../img/sprite.png);
  background-size: 100%;
  background-repeat: no-repeat;
  margin-right: 6px;
}

.icon--like { background-position: 0 -60px; }
.icon--share { background-position: 0 -100px; }
.icon--views { background-position: 0 -160px; }

.action__count {
  color: #909499;
  font-size: 15px;
}

/* Comments list */
.comment {
  display: none;
  padding: 10px 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.comment.visible {
  display: flex;
  opacity: 1;
}

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

.comment__content {
  flex: 1;
}

.comment__author {
  font-size: 14px;
  color: #275d9c;
  font-weight: 600;
}

.comment__author-ref {
  font-weight: 600;
}

.comment__text {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 4px;
}

.comment__meta {
  font-size: 13px;
  color: #909499;
  margin-top: 4px;
}

.comment__actions {
  font-size: 13px;
  color: #909499;
  margin-top: 6px;
}

.comment__action {
  color: #4c6b8f;
  cursor: pointer;
}

/* Show more */
.show-more {
  text-align: center;
  margin-top: 15px;
}

.show-more__btn {
  background: none;
  border: none;
  color: #275d9c;
  font-size: 14px;
  padding: 15px 0;
  cursor: pointer;
}

.disclaimer {
  font-size: 9px;
  color: grey;
  margin-top: 10px;
  line-height: 1.4;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 10px;
  display: flex;
  align-items: center;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
  z-index: 10;
}

.footer__clip {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.footer__input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 16px;
}

.footer__send {
  height: 24px;
  margin-left: 10px;
  cursor: pointer;
}

/* Canvas */
#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

/* Utilities */
.text-center { text-align: center; }
.font-bold { font-weight: bold; }
.hidden { display: none !important; }