/* ====== BASE ====== */
* { box-sizing: border-box; }

.card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    animation: cardIn 0.4s ease-out;
}

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

.survey-step.hidden { display: none; }

/* ====== TYPOGRAPHY ====== */
.prose-section p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: #4b5563;
    font-size: 0.95rem;
}

.step-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #818cf8;
    background: #eef2ff;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.question-text {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ====== BUTTONS ====== */
.btn-next {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.btn-next:active { transform: translateY(0); }

.btn-back {
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.btn-back:hover { background: #f9fafb; border-color: #d1d5db; }

/* ====== RADIO / OPTION CARDS ====== */
.radio-dot {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    position: relative;
    transition: all 0.2s;
}
.radio-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #6366f1;
    transition: transform 0.2s;
}

.option-card.selected > div {
    border-color: #6366f1 !important;
    background: #f5f3ff;
}
.option-card.selected .radio-dot {
    border-color: #6366f1;
}
.option-card.selected .radio-dot::after {
    transform: translate(-50%,-50%) scale(1);
}

/* ====== LIKERT SCALE ====== */
.likert-scale { margin-top: 0.5rem; }

.likert-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.likert-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.likert-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.likert-btn:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
    color: #4f46e5;
    transform: scale(1.08);
}
.likert-btn.selected {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: #4f46e5;
    color: white;
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(99,102,241,0.35);
}

@media (max-width: 480px) {
    .likert-btn { width: 40px; height: 40px; font-size: 0.875rem; }
    .likert-buttons { gap: 0.35rem; }
}

/* ====== DILEMMA CARDS ====== */
.dilemma-card {
    cursor: pointer;
    transition: all 0.2s;
}
.dilemma-card:hover { transform: translateX(4px); }
.dilemma-card.selected {
    border-color: #6366f1 !important;
    background: #f5f3ff !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.dilemma-card .dilemma-check {
    width: 22px; height: 22px; min-width: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    font-size: 0;
}
.dilemma-card.selected .dilemma-check {
    background: #6366f1;
    border-color: #6366f1;
    font-size: 0.75rem;
    color: white;
}

/* ====== 3D COIN – Real Polish Zloty photo ====== */
.coin {
    width: 180px;
    height: 180px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Heads = Orzeł (orzel.png) */
.coin-heads {
    background-image: url('../img/orzel.png');
}

/* Tails = 1 ZŁOTY (reszka.png) */
.coin-tails {
    background-image: url('../img/reszka.png');
    transform: rotateY(180deg);
}

.coin-inner {
    display: none;
}

.coin.flipping {
    animation: coinFlip 2.5s ease-out forwards;
    cursor: default;
}

.coin.flipping-tails {
    animation: coinFlipTails 2.5s ease-out forwards;
    cursor: default;
}

@keyframes coinFlip {
    0%   { transform: rotateY(0deg)    translateY(0);    }
    15%  { transform: rotateY(540deg)  translateY(-120px); }
    30%  { transform: rotateY(1080deg) translateY(-80px);  }
    50%  { transform: rotateY(1620deg) translateY(-40px);  }
    70%  { transform: rotateY(2160deg) translateY(-10px);  }
    85%  { transform: rotateY(2520deg) translateY(0);      }
    100% { transform: rotateY(2880deg) translateY(0);      }
}

@keyframes coinFlipTails {
    0%   { transform: rotateY(0deg)    translateY(0);    }
    15%  { transform: rotateY(540deg)  translateY(-120px); }
    30%  { transform: rotateY(1080deg) translateY(-80px);  }
    50%  { transform: rotateY(1620deg) translateY(-40px);  }
    70%  { transform: rotateY(2160deg) translateY(-10px);  }
    85%  { transform: rotateY(2520deg) translateY(0);      }
    100% { transform: rotateY(2700deg) translateY(0);      }
}

.coin.landed-heads { transform: rotateY(0deg); }
.coin.landed-tails { transform: rotateY(180deg); }

/* Coin shadow */
.coin::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 10%;
    width: 80%;
    height: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    filter: blur(4px);
}

/* ====== TOAST ====== */
#toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ====== QUESTION BLOCK ====== */
.question-block {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}
.question-block:last-child { border-bottom: none; padding-bottom: 0; }

/* ====== VALIDATION ERROR ====== */
.validation-error {
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%  { transform: translateX(-8px); }
    40%  { transform: translateX(8px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
