/* Tarot Page Specific Styles */

/* Intro Card Animation */
.tarot-hero-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 380px;
    margin: 20px 0;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
}

.hero-card-container {
    position: relative;
    width: 200px;
    height: 340px;
}

.hero-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center;
    border: 4px solid white;
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Center Card (Active) */
.hero-card.active {
    transform: translateX(0) scale(1) rotate(0deg);
    z-index: 10;
    opacity: 1;
    box-shadow: 0 15px 40px rgba(155, 127, 165, 0.4);
}

/* Left Card (Prev) */
.hero-card.prev {
    transform: translateX(-120px) scale(0.85) rotate(-15deg);
    z-index: 5;
    opacity: 0.7;
    filter: brightness(0.8);
}

/* Right Card (Next) */
.hero-card.next {
    transform: translateX(120px) scale(0.85) rotate(15deg);
    z-index: 5;
    opacity: 0.7;
    filter: brightness(0.8);
}


/* Question Screen */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(201, 160, 220, 0.2);
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 10px;
}

.question-image-container {
    text-align: center;
    margin-bottom: 20px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.question-header {
    text-align: center;
    margin-bottom: 40px;
}

.question-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 10px;
}

#question-text {
    font-size: 1.4rem;
    line-height: 1.4;
    word-break: keep-all;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(201, 160, 220, 0.3);
    border-radius: 16px;
    font-size: 1.05rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: var(--font-body);
}

.answer-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(155, 127, 165, 0.15);
}

.answer-btn:active {
    transform: translateY(0);
}

/* Loading Screen */
#loading-screen {
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.shuffling-deck {
    position: relative;
    width: 120px;
    height: 180px;
    margin-bottom: 20px;
}

.card-shuffle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.c1 {
    animation: shuffle1 1.5s infinite;
    z-index: 3;
}

.c2 {
    animation: shuffle2 1.5s infinite;
    z-index: 2;
}

.c3 {
    animation: shuffle3 1.5s infinite;
    z-index: 1;
}

@keyframes shuffle1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(40px, 0) rotate(10deg);
    }
}

@keyframes shuffle2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-40px, 0) rotate(-10deg);
    }
}

@keyframes shuffle3 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(0, -5px);
    }
}

/* Result Screen */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

#result-card-name {
    font-family: 'Times New Roman', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
}

.result-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.result-card-image-container {
    width: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(155, 127, 165, 0.3);
    border: 4px solid white;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.result-card-image-container:hover {
    transform: rotate(0deg) scale(1.02);
}

.result-card-img {
    width: 100%;
    height: auto;
    display: block;
}

.result-text-content {
    text-align: center;
    width: 100%;
}

.result-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.quote-box {
    background: rgba(255, 255, 255, 0.6);
    padding: 15px 20px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text-muted);
    border: 1px solid rgba(201, 160, 220, 0.2);
}

.quote-box i {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin: 0 5px;
    vertical-align: top;
}

.result-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 25px;
    word-break: keep-all;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.keyword-tag {
    background: var(--primary-gradient);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(155, 127, 165, 0.2);
}

/* Match Section */
.match-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(201, 160, 220, 0.2);
}

.match-section h5 {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.match-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.match-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(201, 160, 220, 0.1);
}

.match-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 8px 20px rgba(155, 127, 165, 0.15);
}

.match-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.match-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(155, 127, 165, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 127, 165, 0.4);
}

.btn-secondary:hover {
    background: rgba(201, 160, 220, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-card-img {
    width: 180px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.modal-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .match-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Keep 3 on mobile but smaller */
        gap: 8px;
    }

    .match-card {
        padding: 8px;
    }

    .match-card-name {
        font-size: 0.7rem;
    }

    .match-card-desc {
        display: none;
        /* Hide desc on very small screens */
    }

    .result-card-image-container {
        width: 220px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Mobile Hero Animation Adjustments */
    .tarot-hero-animation {
        height: 300px;
    }

    .hero-card-container {
        width: 150px;
        height: 260px;
    }

    .hero-card.prev {
        transform: translateX(-80px) scale(0.85) rotate(-10deg);
    }

    .hero-card.next {
        transform: translateX(80px) scale(0.85) rotate(10deg);
    }

    /* Hide Mini Hero on Mobile when test is running */
    .mini-hero.hide-on-mobile {
        display: none !important;
    }

    /* Adjust Question Image on Mobile */
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.match-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(155, 127, 165, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 127, 165, 0.4);
}

.btn-secondary:hover {
    background: rgba(201, 160, 220, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-card-img {
    width: 180px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.modal-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .match-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Keep 3 on mobile but smaller */
        gap: 8px;
    }

    .match-card {
        padding: 8px;
    }

    .match-card-name {
        font-size: 0.7rem;
    }

    .match-card-desc {
        display: none;
        /* Hide desc on very small screens */
    }

    .result-card-image-container {
        width: 220px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Mobile Hero Animation Adjustments */
    .tarot-hero-animation {
        height: 300px;
    }

    .hero-card-container {
        width: 150px;
        height: 260px;
    }

    .hero-card.prev {
        transform: translateX(-80px) scale(0.85) rotate(-10deg);
    }

    .hero-card.next {
        transform: translateX(80px) scale(0.85) rotate(10deg);
    }

    /* Hide Mini Hero on Mobile when test is running */
    .mini-hero.hide-on-mobile {
        display: none !important;
    }

    /* Adjust Question Image on Mobile */
    .question-image-container {
        height: 200px;
        margin-bottom: 15px;
    }

    #question-text {
        font-size: 1.2rem;
    }

    .result-title {
        font-size: 1.2rem;
    }

    #loading-screen h4 {
        font-size: 1.2rem;
    }
}