/**
 * Стилі для модуля ворожінь Таро
 * Версія: 1.0
 */

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Загальні стилі для всіх ворожінь - основні стилі в gadai-black.css */

.question-container {
    margin-top: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.question-input {
    padding: 16px 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 15px auto;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    display: block;
}

.question-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.question-input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1), 0 8px 20px rgba(139, 92, 246, 0.15);
    transform: translateY(-1px);
}

.draw-button {
    padding: 14px 32px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.draw-button:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.result-container {
    margin: 10px auto 20px;
    padding: 20px 20px;
    font-size: 18px;
    color: #e6e6e6;
    min-height: 50px;
    max-width: 900px;
    background-color: rgba(20, 20, 40, 0.5);
    border-radius: 10px;
    border: 1px solid #4a4a6a;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
}

.result-container h3 {
    color: #d4af37;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.result-container p {
    line-height: 1.6;
    text-align: left;
}

/* Стилі для карт Таро */
.card {
    width: 150px;
    height: 250px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.8s, box-shadow 0.3s, opacity 0.4s;
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 12px;
}

/* Двостороння карта для всіх ворожінь */
.card-wrapper {
    width: 140px;
    height: 233px;
    perspective: 1000px;
    cursor: pointer;
}

/* Одна карта Так/Ні — великий розмір на десктопі */
.tarot-yesno .card-position {
    width: 175px;
    min-height: 310px;
}

.tarot-yesno .card-position .card-wrapper {
    width: 155px;
    height: 258px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.card-wrapper.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    border: 2px solid #4a0068;
}

.card-front {
    z-index: 2;
}

.card-back {
    transform: rotateY(180deg);
}

.card-front img,
.card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стилі для img всередині простих карт (без card-wrapper) */
.card>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Ефект світіння при наведенні на card-wrapper */
.card-wrapper:hover {
    transform: translateY(-8px);
}

.card-wrapper:hover .card-front {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.5);
}

/* Стилі для карт Карти Дня */
.cardofday-card,
.card-position .cardofday-card,
.card-position .card.cardofday-card {
    width: 140px !important;
    height: 233px !important;
    transition: transform 0.4s, box-shadow 0.3s, opacity 0.4s;
}

.cardofday-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

.cardofday-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.cardofday-spread {
    gap: 15px;
}

.cardofday-spread .card-position {
    min-height: auto;
    width: auto;
}

/* Контейнер обраної карти - по центру */
#selected-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#selected-card-container .card-position {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Двостороння карта для Карти Дня */
.selected-card-wrapper {
    width: 180px;
    height: 300px;
    perspective: 1000px;
}

.selected-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.selected-card-wrapper.flipped .selected-card-inner {
    transform: rotateY(180deg);
}

.selected-card-front,
.selected-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
    border: 2px solid #4a0068;
}

.selected-card-front {
    z-index: 2;
}

.selected-card-back {
    transform: rotateY(180deg);
}

.selected-card-front img,
.selected-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Адаптивність для Карти Дня */
@media (max-width: 768px) {

    .cardofday-card,
    .card-position .cardofday-card,
    .card-position .card.cardofday-card {
        width: 110px !important;
        height: 183px !important;
    }

    .cardofday-spread {
        gap: 12px !important;
    }

    .selected-card-wrapper {
        width: 170px;
        height: 283px;
    }
}

@media (max-width: 480px) {

    .cardofday-card,
    .card-position .cardofday-card,
    .card-position .card.cardofday-card {
        width: 90px !important;
        height: 150px !important;
    }

    .cardofday-spread {
        gap: 8px !important;
        padding: 0 5px;
    }

    .selected-card-wrapper {
        width: 160px;
        height: 267px;
    }

    #selected-card-container h3 {
        font-size: 18px;
    }
}

@media (max-width: 360px) {

    .cardofday-card,
    .card-position .cardofday-card,
    .card-position .card.cardofday-card {
        width: 70px !important;
        height: 117px !important;
    }

    .selected-card-wrapper {
        width: 140px;
        height: 233px;
    }
}

/* Ефект світіння при наведенні */
.card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #8b5cf6, #d4af37, #8b5cf6);
    border-radius: 14px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(10px);
}

.card:hover::before {
    opacity: 0.5;
    animation: cardGlowPulse 2s ease-in-out infinite;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

@keyframes cardGlowPulse {

    0%,
    100% {
        opacity: 0.4;
        filter: blur(8px);
    }

    50% {
        opacity: 0.7;
        filter: blur(12px);
    }
}


.card-name {
    font-style: italic;
    color: #e6e6e6;
}

/* Стилі для розкладів з кількома картами */
.cards-spread {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px auto 20px;
    padding: 10px 15px 20px;
    position: relative;
    min-height: 250px;
    max-width: 1000px;
}

.cards-spread-3 {
    max-width: 700px;
}
.cards-spread-3 .card-position {
    flex: 0 1 180px;
}

.cards-spread::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, rgba(26, 26, 46, 0) 70%);
    z-index: -1;
    border-radius: 50%;
}

.card-position {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
    min-height: 280px;
    transition: transform 0.3s;
    font-weight: bold;
    color: #d4af37;
}

.card-position:hover {
    transform: translateY(-5px);
}

.card-position .card {
    width: 140px;
    height: 233px;
    margin-bottom: 10px;
}

/* Уніфіковані розміри для всіх карт */
.card-position .card.cardofday-card,
.card-position .card.horoscope-card {
    width: 140px !important;
    height: 233px !important;
}

.position-label {
    font-size: 14px;
    color: #d4af37;
    text-align: center;
    margin-top: 10px;
    padding: 5px 8px;
    text-shadow: 0 0 3px rgba(212, 175, 55, 0.3);
    font-style: italic;
    font-weight: 600;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для карт-значений */
.card-meaning {
    background-color: rgba(30, 30, 50, 0.7);
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #8a2be2;
    text-align: left;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.card-meaning:hover {
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.card-meaning h4 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: normal;
    letter-spacing: 1px;
}

.card-meaning p {
    margin: 0;
    color: #e6e6e6;
    line-height: 1.5;
}

/* Специфічні стилі для різних типів ворожінь */

/* Ворожіння Так/Ні */
.tarot-yesno .result-container h3 {
    color: #d4af37;
    margin-bottom: 20px;
    font-size: 22px;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.tarot-yesno .result-container .tarot-answer {
    font-size: 28px;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
    letter-spacing: 1px;
}

.tarot-yesno .result-container .tarot-answer.positive {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.tarot-yesno .result-container .tarot-answer.negative {
    color: #f44336;
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
    background-color: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.tarot-card-info {
    background-color: rgba(30, 30, 50, 0.7);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    border-left: 3px solid #8a2be2;
    text-align: left;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.tarot-card-info h4 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

.tarot-card-info p {
    color: #e6e6e6;
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    text-align: justify;
}

/* Ворожіння на ситуацію */
.tarot-situation .cards-spread {
    max-width: 600px;
    margin: 0 auto;
}

/* Ворожіння на людину */

/* Адаптивні стилі */
@media (max-width: 768px) {
    .tarot-container {
        padding: 15px 10px;
        width: 98%;
    }

    /* Оптимізація контейнера результату для мобільних */
    .result-container {
        padding: 12px 10px;
        margin: 5px auto 15px;
        font-size: 16px;
        border-radius: 8px;
        border: none;
        background-color: rgba(20, 20, 40, 0.4);
    }

    .result-container h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .result-container p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .cards-spread {
        gap: 12px;
    }

    .card-position {
        width: 120px;
        min-height: 230px;
    }

    .card-position .card {
        width: 110px;
        height: 183px;
    }

    /* Уніфіковані розміри для всіх карт */
    .card-position .card.cardofday-card,
    .card-position .card.horoscope-card {
        width: 110px !important;
        height: 183px !important;
    }

    .card-position .card-wrapper {
        width: 110px;
        height: 183px;
    }

    /* Одна карта (Так/Ні) — великий розмір на мобільних */
    .tarot-yesno .card-position {
        width: 180px;
        min-height: 330px;
    }

    .tarot-yesno .card-position .card-wrapper {
        width: 160px;
        height: 267px;
    }

    .position-label {
        font-size: 12px;
        margin-top: 8px;
        padding: 5px 8px;
        min-height: 35px;
    }

    .question-input {
        width: 90%;
    }

    .tarot-yesno .result-container h3 {
        font-size: 20px;
    }

    .tarot-yesno .result-container .tarot-answer {
        font-size: 24px;
        padding: 4px 12px;
    }

    .tarot-card-info {
        padding: 15px;
    }

    .tarot-card-info h4 {
        font-size: 18px;
    }

    .tarot-card-info p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tarot-container {
        padding: 10px 5px 50px 5px;
    }

    .tarot-container h2 {
        font-size: 18px;
    }

    /* Максимальна оптимізація контейнера результату для малих екранів */
    .result-container {
        padding: 10px 8px;
        margin: 3px auto 10px;
        font-size: 14px;
        border-radius: 6px;
    }

    .result-container h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .result-container p {
        font-size: 14px;
        line-height: 1.45;
        margin-bottom: 6px;
    }

    .cards-spread {
        gap: 8px;
        padding-bottom: 30px;
        min-height: 250px;
    }

    /* 5-картні розклади: flex-wrap дозволяє 3+2 розташування */
    .card-position {
        width: 100px;
        min-height: 200px;
    }

    .card-position .card {
        width: 90px;
        height: 150px;
        margin-bottom: 5px;
    }

    /* Уніфіковані розміри для всіх карт */
    .card-position .card.cardofday-card,
    .card-position .card.horoscope-card {
        width: 90px !important;
        height: 150px !important;
    }

    .card-position .card-wrapper {
        width: 90px;
        height: 150px;
    }

    /* Одна карта (Так/Ні) — великий розмір */
    .tarot-yesno .card-position {
        width: 170px;
        min-height: 310px;
    }

    .tarot-yesno .card-position .card-wrapper {
        width: 150px;
        height: 250px;
    }

    .position-label {
        font-size: 11px;
        margin-top: 8px;
        padding: 4px 6px;
        min-height: 30px;
    }

    .draw-button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .card-container {
        width: 160px;
        height: 240px;
    }

    .tarot-yesno .result-container h3 {
        font-size: 18px;
    }

    .tarot-yesno .result-container .tarot-answer {
        font-size: 20px;
        padding: 3px 10px;
        margin-top: 5px;
    }

    .tarot-card-info {
        padding: 12px;
        margin-top: 15px;
    }

    .tarot-card-info h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .tarot-card-info p {
        font-size: 13px;
        line-height: 1.5;
    }
}

/* Додаткові стилі для дуже маленьких екранів */
@media (max-width: 360px) {
    .tarot-container {
        padding: 15px;
    }

    .tarot-container h2 {
        font-size: 18px;
    }

    .card-container {
        width: 140px;
        height: 210px;
    }

    .card-position {
        width: 85px;
        min-height: 170px;
    }

    .card-position .card-wrapper {
        width: 85px;
        height: 142px;
    }

    .card-position .card {
        width: 85px;
        height: 142px;
    }

    /* Уніфіковані розміри для всіх карт */
    .card-position .card.cardofday-card,
    .card-position .card.horoscope-card {
        width: 85px !important;
        height: 142px !important;
    }

    /* Одна карта (Так/Ні) — великий розмір навіть на 360px */
    .tarot-yesno .card-position {
        width: 150px;
        min-height: 280px;
    }

    .tarot-yesno .card-position .card-wrapper {
        width: 130px;
        height: 217px;
    }

    .cards-spread {
        gap: 6px;
    }

    .position-label {
        font-size: 10px;
        margin-top: 5px;
        padding: 3px 5px;
        min-height: 28px;
    }

    .question-input {
        font-size: 14px;
        padding: 8px;
    }

    .draw-button {
        padding: 8px 15px;
        font-size: 13px;
    }

    .tarot-yesno .result-container .tarot-answer {
        font-size: 18px;
    }

    .tarot-card-info p {
        font-size: 12px;
    }
}


/* Додаткові ефекти */
.result-container h3 {
    position: relative;
    display: inline-block;
}

.result-container h3:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #4a76a8;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.result-container h3:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Темна тема */
.dark-theme .tarot-container {
    background-color: #2a2a2a;
    color: #f0f0f0;
}

.dark-theme .tarot-container h2,
.dark-theme .result-container {
    color: #f0f0f0;
}

.dark-theme .question-input {
    background-color: #3a3a3a;
    border-color: #555;
    color: #f0f0f0;
}

.dark-theme .draw-button {
    background-color: #5a86b8;
}

.dark-theme .draw-button:hover {
    background-color: #6a96c8;
}

.dark-theme .position-label {
    color: #bbb;
}

/* Кнопка перемикання теми */
.theme-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #333;
}

.dark-theme .theme-toggle {
    color: #f0f0f0;
}

/* Стилі для індикатора завантаження */
.loading-indicator {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15) 0%, rgba(74, 0, 104, 0.15) 100%);
    border-radius: 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3), 0 0 60px rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
    animation: pulseGlow 2s ease-in-out infinite;
}

.loading-indicator::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: shimmer 3s linear infinite;
}

.loading-indicator p {
    color: #d4af37;
    font-size: 18px;
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    text-align: center;
    font-style: italic;
    opacity: 0.9;
}

.loading-indicator p:first-of-type {
    font-size: 26px;
    font-weight: bold;
    background: linear-gradient(90deg, #d4af37, #f0d98d, #d4af37);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s linear infinite;
    text-align: center;
    font-style: normal;
    opacity: 1;
    margin-bottom: 20px;
}

/* Анімація спінера */
.spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border: 5px solid rgba(138, 43, 226, 0.2);
    border-top: 5px solid #d4af37;
    border-right: 5px solid #8a2be2;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 20px rgba(138, 43, 226, 0.2);
    position: relative;
    z-index: 1;
}

.spinner::after {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    animation: sparkle 2s ease-in-out infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(138, 43, 226, 0.3), 0 0 60px rgba(212, 175, 55, 0.1);
    }

    50% {
        box-shadow: 0 8px 32px rgba(138, 43, 226, 0.5), 0 0 80px rgba(212, 175, 55, 0.2);
    }
}

@keyframes shimmer {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes textShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Стилі для інтерпретації від ШІ */
.gemini-interpretation {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.05) 0%, rgba(74, 0, 104, 0.05) 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    border-left: 4px solid #8a2be2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gemini-interpretation h4 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    letter-spacing: 1px;
}

.interpretation-text {
    color: #e6e6e6;
    line-height: 1.8;
    font-size: 16px;
}

.interpretation-text p {
    margin: 15px 0;
    text-align: justify;
}

/* Стилі для виділення назв карт у тексті */
.card-highlight {
    display: inline-block;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(138, 43, 226, 0.15) 100%);
    color: #d4af37;
    font-weight: 600;
    padding: 2px 10px;
    margin: 0 2px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
    text-shadow: 0 0 4px rgba(212, 175, 55, 0.3);
}

/* Стилі для короткої інформації про карти */
.cards-summary {
    background-color: rgba(30, 30, 50, 0.5);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.card-summary-item {
    padding: 10px;
    margin: 8px 0;
    background-color: rgba(20, 20, 40, 0.6);
    border-radius: 8px;
    border-left: 3px solid #8a2be2;
    transition: all 0.3s;
}

.card-summary-item:hover {
    background-color: rgba(30, 30, 50, 0.8);
    transform: translateX(5px);
}

.card-summary-item strong {
    color: #d4af37;
    margin-right: 10px;
}

/* Стилі для повідомлень про помилки */
.error-message {
    background-color: rgba(244, 67, 54, 0.1);
    border: 2px solid rgba(244, 67, 54, 0.5);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.error-message h3 {
    color: #f44336;
    margin-top: 0;
    text-shadow: 0 0 5px rgba(244, 67, 54, 0.3);
}

.error-message p {
    color: #e6e6e6;
    margin-bottom: 0;
}

/* Адаптивні стилі для нових елементів */
@media (max-width: 768px) {
    .loading-indicator {
        padding: 40px 20px;
    }

    .loading-indicator p {
        font-size: 16px;
    }

    .loading-indicator p:first-of-type {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .spinner {
        width: 50px;
        height: 50px;
    }

    .spinner::after {
        font-size: 20px;
    }

    .gemini-interpretation {
        padding: 20px;
    }

    .gemini-interpretation h4 {
        font-size: 20px;
    }

    .interpretation-text {
        font-size: 15px;
    }

    .cards-summary {
        padding: 15px;
    }

    .card-summary-item {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .loading-indicator {
        padding: 30px 15px;
    }

    .loading-indicator p {
        font-size: 15px;
    }

    .loading-indicator p:first-of-type {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .spinner {
        width: 40px;
        height: 40px;
        margin-bottom: 15px;
    }

    .spinner::after {
        font-size: 16px;
    }

    .gemini-interpretation h4 {
        font-size: 18px;
    }

    .interpretation-text {
        font-size: 14px;
    }
}

/* Ефект друкарської машинки */
#current-paragraph::after {
    content: '|';
    animation: blink 0.7s infinite;
    margin-left: 2px;
    color: #d4af37;
}

/* Footer - основні стилі в gadai-black.css */

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.typing-complete {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0.8;
    }

    to {
        opacity: 1;
    }
}

/* FAQ акордеон стилі - основные стили в gadai-black.css */

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
}

.faq-item.active .faq-question {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.15);
}

.faq-icon {
    color: #d4af37;
    font-size: 16px;
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer p {
    padding: 0 25px 20px 25px;
    color: #c0c0c0;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

/* Адаптивність для FAQ */
@media (max-width: 768px) {
    .faq-question {
        padding: 15px 20px;
        font-size: 16px;
    }

    .faq-answer p {
        padding: 0 20px 15px 20px;
        font-size: 15px;
    }
}

/* SEO контент стилі */
.seo-content {
    border-radius: 20px;
    padding: 50px 40px;
    margin: 60px auto;
    max-width: 1100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.seo-content h2 {
    color: #d4af37;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    font-weight: 600;
    letter-spacing: 1px;
}

.seo-content h3 {
    color: #e6b800;
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    font-weight: 500;
}

.seo-content h4 {
    color: #f0c040;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 500;
}

.seo-content p {
    color: #e6e6e6;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.seo-content strong {
    color: #d4af37;
    font-weight: 600;
}

.seo-content ul,
.seo-content ol {
    color: #e6e6e6;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    padding-left: 30px;
}

.seo-content ul li {
    margin-bottom: 12px;
    position: relative;
}

.seo-content ul li::marker {
    color: #d4af37;
}

.seo-content ol li {
    margin-bottom: 12px;
}

.seo-content ol li::marker {
    color: #d4af37;
    font-weight: bold;
}

/* Стилі для емодзі в списках */
.seo-content ul li:first-child {
    list-style: none;
    margin-left: -30px;
    padding-left: 30px;
}

/* Адаптивність для форм з даними партнера */
.data-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .data-form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .user-data-form {
        padding: 10px !important;
        margin-bottom: 15px !important;
    }

    .toggle-form-btn {
        font-size: 14px !important;
        padding: 10px !important;
    }

    .toggle-form-btn span:nth-child(2) {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .toggle-form-btn {
        font-size: 12px !important;
        padding: 8px !important;
    }

    .toggle-form-btn span:nth-child(2) {
        font-size: 12px;
    }

    .user-form-content label {
        font-size: 12px !important;
    }

    /* Виправлення justify на мобілі — уникнення великих проміжків */
    .tarot-card-info p,
    .interpretation-text p,
    .seo-content p {
        text-align: left;
    }
}

/* Адаптивність для SEO контенту */
@media (max-width: 768px) {
    .seo-content {
        padding: 30px 20px;
        margin: 40px 15px;
        border-radius: 15px;
    }

    .seo-content h2 {
        font-size: 24px;
    }

    .seo-content h3 {
        font-size: 20px;
        margin-top: 30px;
    }

    .seo-content h4 {
        font-size: 18px;
    }

    .seo-content p,
    .seo-content ul,
    .seo-content ol {
        font-size: 15px;
        text-align: left;
    }
}

/* Фіксована кнопка Telegram */
.telegram-floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.5);
    transition: all 0.3s ease;
    z-index: 9999;
    animation: telegramPulse 3s ease-in-out infinite;
}

.telegram-floating-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 136, 204, 0.7);
}

.telegram-floating-btn svg {
    flex-shrink: 0;
}

.telegram-floating-text {
    white-space: nowrap;
}

@keyframes telegramPulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 136, 204, 0.5);
    }

    50% {
        box-shadow: 0 4px 25px rgba(0, 136, 204, 0.8);
    }
}

/* Кнопка Telegram після результатів ворожіння */
.telegram-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0088cc 0%, #0077b5 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.telegram-result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 136, 204, 0.6);
    background: linear-gradient(135deg, #0099dd 0%, #0088cc 100%);
}

.telegram-result-btn svg {
    flex-shrink: 0;
}

/* Адаптивність для floating кнопки */
@media (max-width: 768px) {
    .telegram-floating-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .telegram-floating-btn svg {
        width: 22px;
        height: 22px;
    }

    .telegram-floating-text {
        display: none;
    }

    /* Додатковий відступ знизу, щоб кнопка не перекривала контент */
    .footer {
        padding-bottom: 70px;
    }
}

/* Powered by DLavrenyuk */