/* ============================================
   73 Oracle Cards - Frontend Styles
   Feminine, spiritual, elegant design
   ============================================ */

/* ---- Base Container ---- */
.oracle-card-container {
    font-family: 'Noto Sans JP', 'Noto Serif JP', sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    min-height: 500px;
}

/* ---- Screen States ---- */
.oracle-screen {
    display: none;
    animation: oracleFadeIn 0.6s ease-out;
}

.oracle-screen.active {
    display: block;
}

@keyframes oracleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Intro Screen ---- */
.oracle-intro {
    padding: 40px 0;
}

.oracle-logo-area {
    margin-bottom: 40px;
}

.oracle-crystal {
    font-size: 64px;
    margin-bottom: 16px;
    animation: oracleFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(186, 135, 200, 0.6));
}

@keyframes oracleFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

.oracle-main-title {
    font-family: 'Cormorant Garamond', 'Noto Serif JP', serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #c9a0dc 0%, #e8b4b8 40%, #d4a574 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px 0;
}

.oracle-subtitle {
    font-family: 'Noto Serif JP', serif;
    font-size: 1rem;
    color: #b89cc5;
    letter-spacing: 0.15em;
    margin: 0;
}

.oracle-instruction {
    margin-bottom: 40px;
}

.oracle-instruction p {
    font-size: 0.95rem;
    color: #8a7a96;
    line-height: 1.8;
    margin: 4px 0;
}

/* ---- Draw Button ---- */
.oracle-draw-button {
    position: relative;
    display: inline-block;
    padding: 18px 60px;
    border: none;
    border-radius: 60px;
    background: linear-gradient(135deg, #c9a0dc 0%, #e8b4b8 50%, #d4a574 100%);
    color: #fff;
    font-family: 'Noto Serif JP', serif;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 8px 30px rgba(186, 135, 200, 0.35);
}

.oracle-draw-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(186, 135, 200, 0.5);
}

.oracle-draw-button:active {
    transform: translateY(-1px);
}

.oracle-btn-glow {
    position: absolute;
    inset: 0;
    border-radius: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    animation: oracleBtnGlow 2s ease-in-out infinite;
}

@keyframes oracleBtnGlow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

.oracle-btn-text {
    position: relative;
    z-index: 1;
}

/* ---- Loading Screen ---- */
.oracle-shimmer-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.oracle-shimmer-card {
    width: 220px;
    height: 340px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8d5f0 0%, #f2d4d7 50%, #f0dcc8 100%);
    box-shadow: 0 20px 60px rgba(186, 135, 200, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: oracleShimmerPulse 1.5s ease-in-out infinite;
}

@keyframes oracleShimmerPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 20px 60px rgba(186, 135, 200, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 25px 70px rgba(186, 135, 200, 0.5);
    }
}

.oracle-shimmer-inner {
    text-align: center;
}

.oracle-stars {
    font-size: 40px;
    animation: oracleStarsSpin 2s linear infinite;
}

@keyframes oracleStarsSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.oracle-loading-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    color: #8a7a96;
    margin-top: 16px;
    letter-spacing: 0.05em;
}

/* ---- Result Screen ---- */
#oracle-result-screen {
    padding: 20px 0;
}

/* Card Flip */
.oracle-card-flip-container {
    perspective: 1200px;
    width: 260px;
    height: 400px;
    margin: 0 auto 30px;
    cursor: pointer;
}

.oracle-card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.oracle-card-flipper.flipped {
    transform: rotateY(180deg);
}

.oracle-card-back,
.oracle-card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

/* Card Back */
.oracle-card-back {
    background: linear-gradient(135deg, #463366 0%, #6b3a7d 50%, #8b4d6b 100%);
    box-shadow: 0 15px 50px rgba(70, 51, 102, 0.4);
}

.oracle-card-back-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.oracle-back-pattern {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 215, 180, 0.2);
    border-radius: 12px;
    background: repeating-conic-gradient(rgba(255, 215, 180, 0.05) 0% 25%,
            transparent 0% 50%) 50% / 30px 30px;
}

.oracle-back-center {
    position: relative;
    z-index: 1;
}

.oracle-back-symbol {
    font-size: 56px;
    color: rgba(255, 215, 180, 0.6);
    text-shadow: 0 0 30px rgba(255, 215, 180, 0.4);
}

/* Card Front */
.oracle-card-front {
    transform: rotateY(180deg);
    background: linear-gradient(150deg, #fdf6f9 0%, #faf0f5 50%, #f7eded 100%);
    box-shadow: 0 15px 50px rgba(186, 135, 200, 0.3);
}

.oracle-card-front-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
}

.oracle-card-image-wrap {
    width: 200px;
    height: 260px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #e8d5f0, #f2d4d7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.oracle-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.oracle-card-image-wrap img.loaded {
    display: block;
}

.oracle-card-image-wrap .oracle-no-image {
    font-size: 48px;
    color: rgba(186, 135, 200, 0.4);
}

.oracle-card-title {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #5a4a6a;
    margin: 0;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

/* ---- Message Area ---- */
.oracle-message-area {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    margin-top: 10px;
}

.oracle-message-area.visible {
    opacity: 1;
    transform: translateY(0);
}

.oracle-message-card {
    background: linear-gradient(150deg, rgba(253, 246, 249, 0.95), rgba(250, 240, 245, 0.95));
    border: 1px solid rgba(201, 160, 220, 0.2);
    border-radius: 16px;
    padding: 32px 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px rgba(186, 135, 200, 0.12);
    backdrop-filter: blur(10px);
}

.oracle-message-content {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.95rem;
    line-height: 2;
    color: #5a4a6a;
    text-align: left;
    white-space: pre-line;
    margin-bottom: 24px;
}

.oracle-affirmation-area {
    border-top: 1px solid rgba(201, 160, 220, 0.2);
    padding-top: 20px;
}

.oracle-affirmation-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: #c9a0dc;
    margin: 0 0 10px;
}

.oracle-affirmation-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.9rem;
    color: #8b6996;
    line-height: 1.8;
    font-style: italic;
    margin: 0;
}

/* ---- Redraw Button ---- */
.oracle-redraw-button {
    display: inline-block;
    padding: 12px 40px;
    border: 1px solid rgba(201, 160, 220, 0.4);
    border-radius: 40px;
    background: transparent;
    color: #b89cc5;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.oracle-redraw-button:hover {
    background: linear-gradient(135deg, rgba(201, 160, 220, 0.1), rgba(232, 180, 184, 0.1));
    border-color: rgba(201, 160, 220, 0.6);
    color: #8b6996;
    transform: translateY(-2px);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .oracle-card-container {
        padding: 24px 16px;
    }

    .oracle-main-title {
        font-size: 1.7rem;
    }

    .oracle-draw-button {
        padding: 16px 48px;
        font-size: 1rem;
    }

    .oracle-card-flip-container {
        width: 220px;
        height: 340px;
    }

    .oracle-card-image-wrap {
        width: 168px;
        height: 220px;
    }

    .oracle-message-card {
        padding: 24px 20px;
    }

    .oracle-message-content {
        font-size: 0.9rem;
    }
}