/* --- THEME & COLOR PALETTE (CSS VARIABLES) --- */
:root {
    --main-purple: #6e00ff;
    --main-blue: #007bff;
    --main-dark-bg: #121212;
    --main-card-bg: #ffffff;
    --main-text-dark: #050505;
    --main-text-light: #e4e6eb;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --success-green: #2a9a47;
}

/* --- GLOBAL RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

body {
    background-color: var(--main-dark-bg);
    color: var(--main-text-dark);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- DYNAMIC PARTICLE BACKGROUND ANIMATION --- */
.bubble-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bubble {
    position: absolute;
    bottom: -150px;
    background-color: rgba(110, 0, 255, 0.1);
    border-radius: 50%;
    animation: fizz 25s linear infinite;
    opacity: 0;
}

@keyframes fizz {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

.bubble:nth-child(1) {
    width: 35px;
    height: 35px;
    left: 10%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 25px;
    height: 25px;
    left: 20%;
    animation-duration: 12s;
    animation-delay: 2s;
    background-color: rgba(0, 123, 255, 0.1);
}

.bubble:nth-child(3) {
    width: 55px;
    height: 55px;
    left: 35%;
    animation-duration: 22s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 70px;
    height: 70px;
    left: 50%;
    animation-duration: 15s;
    animation-delay: 0s;
    background-color: rgba(0, 123, 255, 0.1);
}

.bubble:nth-child(5) {
    width: 40px;
    height: 40px;
    left: 55%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.bubble:nth-child(6) {
    width: 50px;
    height: 50px;
    left: 65%;
    animation-duration: 16s;
    animation-delay: 4s;
    background-color: rgba(0, 123, 255, 0.1);
}

.bubble:nth-child(7) {
    width: 30px;
    height: 30px;
    left: 80%;
    animation-duration: 13s;
    animation-delay: 2s;
}

.bubble:nth-child(8) {
    width: 65px;
    height: 65px;
    left: 90%;
    animation-duration: 25s;
    animation-delay: 5s;
}

/* --- CORE LAYOUT & TYPOGRAPHY --- */
.screen {
    max-width: 1024px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--main-card-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    /* overflow-x: hidden; */
}

.wrapper {
    padding: 25px;
    max-width: 640px;
    margin: 0 auto;
    flex-grow: 1;
}

h1,
h2,
h3,
h4,
.faq-headline,
.others-say {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--main-text-dark);
    line-height: 1.2;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 900;
}

h3 {
    font-size: 2.25rem;
    margin-bottom: 10px;
}

h4 {
    font-size: 2.75rem;
    margin-bottom: 20px;
    color: var(--main-purple);
}

.intro-txt,
.end-text,
p {
    font-size: 1.05rem;
    margin-bottom: 15px;
    color: #333;
}

.color {
    font-weight: 700;
    color: var(--main-purple);
}

/* --- HEADER & TIMER STYLES --- */
.header {
    padding: 15px 25px;
    background: var(--main-card-bg);
    color: var(--main-text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--main-text-dark);
}

.logo p {
    width: 40px;
    height: 40px;
    background: var(--main-purple);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.logo p span {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1;
    color: #fff;
}

.logo>span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.header button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--main-text-dark);
    font-size: 24px;
    transition: transform 0.2s ease;
}

.header button:hover {
    transform: scale(1.1);
    color: var(--main-purple);
}

.timer-top {
    display: none;
    text-align: center;
    background: var(--main-blue);
    color: #fff;
    padding: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 500;
}

.top-timer {
    font-weight: 900;
}

/* --- STEP 1: INTRODUCTION --- */
.intro-img {
    max-width: 448px;
    margin: 32px auto;
    position: relative;
}

.intro-img img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.intro-img div {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background-color: var(--main-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(12deg);
    border: 4px solid #fff;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    font-family: var(--font-heading);
    text-align: center;
}

.intro-img div p {
    font-size: 1.2rem;
    line-height: 1;
    margin: 0;
    font-weight: 500;
}

.intro-img div p span {
    font-size: 2rem;
    display: block;
    line-height: 1.1;
    font-weight: 900;
}

/* --- ACTION BUTTONS & STICKY GRADIENT --- */
.started {
    padding: 20px 0;
    position: sticky;
    bottom: 0;
    /* background: white; */
    margin-top: 20px;
}

.started button,
.started a {
    cursor: pointer;
    display: block;
    width: 100%;
    background: linear-gradient(145deg, var(--main-blue), var(--main-purple));
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 5px 15px rgba(110, 0, 255, 0.4), inset 0 -4px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.started button:hover,
.started a:hover {
    background: linear-gradient(145deg, #0084ff, #7e20ff);
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(110, 0, 255, 0.55), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

/* --- STEP 2: SURVEY QUESTIONS --- */
.step2 {
    display: none;
}

.question-number {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #ccc;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.question-number span {
    color: var(--main-purple);
}

.question p {
    color: #777;
    margin-bottom: 2rem;
}

.question button {
    display: block;
    width: 100%;
    background: #fff;
    border: 3px solid var(--main-blue);
    color: var(--main-blue);
    padding: 15px 20px;
    margin-bottom: 15px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.question button:hover {
    background: var(--main-blue);
    color: #fff;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* --- STEP 3: LOADING ANIMATION --- */
.step3 {
    display: none;
    text-align: center;
}

.loading-text {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 30px;
}

.loading-list {
    list-style: none;
    padding-left: 0;
}
.loading-steps {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 10px;
  background: #f8f9fa;
  font-size: 1.1rem;
  color: #666;
  transition: all 0.3s ease;
}

.step-icon {
  position: relative;
  width: 24px;
  height: 24px;
}

.spinner, .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.spinner {
  border: 2px solid #e0e0e0;
  border-top: 2px solid var(--samsung-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
}

.checkmark {
  color: var(--success-green);
  opacity: 0;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: draw-check 0.3s ease forwards;
}

.loading-step.working .spinner {
  opacity: 1;
}

.loading-step.done .spinner {
  opacity: 0;
}

.loading-step.done .checkmark {
  opacity: 1;
  animation: draw-check 0.3s ease forwards 0.1s;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

/* --- STEP 4: FINAL CONFIRMATION --- */
.step4 {
    display: none;
}

.step4 .intro-img {
    margin: 0 auto 32px;
    max-width: 384px;
}

.end-list {
    margin-bottom: 20px;
    list-style: none;
    counter-reset: end-list-counter;
}

.end-list li {
    padding: 20px 20px 20px 50px;
    font-size: 1rem;
    border-top: 2px dashed rgba(110, 0, 255, 0.2);
    position: relative;
}

.end-list li::before {
    counter-increment: end-list-counter;
    content: counter(end-list-counter);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--main-purple);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.end-list li:first-child {
    border-top: 0;
}

.end-list li span {
    font-weight: 700;
    color: var(--main-text-dark);
}

/* --- COMMENTS SECTION STYLES --- */
.comments {
    margin-top: 64px;
}

.others-say {
    font-size: 1.75rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--main-purple);
    padding-bottom: 10px;
}

.sorting-box {
    padding: 8px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0, 123, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sorting-box>p {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.inner-sorting-box {
    font-size: 0.9rem;
}

.sort>button {
    cursor: pointer;
    color: var(--main-text-dark);
    background: transparent;
    border: 1px solid var(--main-blue);
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: 700;
}

.dropdown-sort {
    display: none;
    z-index: 50;
    position: absolute;
    background: var(--main-card-bg);
    border: 1px solid var(--main-blue);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dropdown-sort button {
    background: transparent;
    border: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-sort button:hover,
.dropdown-sort button.selected {
    background-color: rgba(0, 123, 255, 0.1);
}

.add-comment {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
}

.comment-input {
    flex: 1;
    padding: 10px;
    border: 2px solid rgba(0, 123, 255, 0.3);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.5);
}

.comment-input:focus {
    outline: none;
    border-color: var(--main-blue);
    background: #fff;
}

.post-button {
    padding: 10px 15px;
    background: var(--main-purple);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.comment {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

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

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

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: bold;
    color: var(--main-purple);
}

.comment-date {
    color: #999;
    font-size: 0.85rem;
}

.comment-text {
    margin-bottom: 10px;
    line-height: 1.5;
}

.comment-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}

.comment-action {
    cursor: pointer;
}

.comment-action:hover {
    color: var(--main-purple);
}

.load-more {
    background: var(--main-blue);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.load-more:hover {
    background-color: var(--main-purple);
}

/* --- FOOTER STYLES --- */
.footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--main-dark-bg);
    color: #ccc;
    margin-top: 40px;
    border-top: 4px solid var(--main-purple);
}

.footer-links {
    margin: 16px 0 24px;
}

.footer-links a {
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.trade-names,
.disclaimer-box p {
    font-size: 0.75rem;
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto 20px;
    color: #aaa;
}

.disclaimer-box p a {
    color: #fff;
    font-weight: 700;
}
.image-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.image-answer-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.image-answer-btn:hover {
    border-color: var(--main-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.image-answer-btn img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.image-answer-btn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--main-text-dark);
}
@media (min-width: 601px) {
    .image-answer-btn img {
        height: 250px;
    }
}
/* --- RESPONSIVE ADJUSTMENTS --- */
@media screen and (max-width: 639px) {
    .wrapper {
        padding: 15px;
        max-width: 100%;
        /* Змінюємо на 100%, щоб контент завжди вміщався */
    }


    h1 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.8rem;
    }

    h4 {
        font-size: 2rem;
    }

    .intro-txt,
    .end-text,
    p {
        font-size: 1rem;
    }

    .question-number {
        font-size: 1.3rem;
    }

    .question p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .question button {
        font-size: 1rem;
        padding: 12px 16px;
    }

    .others-say {
        font-size: 1.5rem;
    }

    .footer-links a {
        display: block;
        margin: 10px 0;
    }

    .intro-img div {
        width: 80px;
        height: 80px;
        right: 0px;
        top: -10px;
    }

    .intro-img div p {
        font-size: 1rem;
    }

    .intro-img div p span {
        font-size: 1.6rem;
    }

    .add-comment {
        flex-direction: column;
    }

    .avatar-placeholder {
        align-self: flex-start;
    }

    .post-button {
        align-self: flex-end;
        width: fit-content;
    }

    .comment {
        flex-direction: column;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    /* ВИПРАВЛЕННЯ ДЛЯ ОСТАННЬОЇ СТОРІНКИ НА МОБІЛЬНИХ ПРИСТРОЯХ */
    .step4 .intro-img {
        margin: 0 auto 20px;
        max-width: 100%;
        width: 100%;
    }

    .step4 .end-list {
        padding: 15px;
    }

    .step4 .end-list li {
        padding: 15px 15px 15px 40px;
        font-size: 0.9rem;
    }

    .step4 .end-list li::before {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }

    .step4 .started {
        padding: 15px 0;
    }

    .step4 .started button,
    .step4 .started a {
        padding: 15px 20px;
        font-size: 1.1rem;
    }
}