:root {
    /* Responsive variables */
    --card-width: min(400px, 85vw);
    --card-height: auto;
    --card-ratio: 400 / 592;
    --bg-color: #0f172a;
    --card-bg: linear-gradient(135deg, #1e293b, #334155);
    --text-color: #f8fafc;
    --accent-color: #38bdf8;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    background-color: var(--bg-color);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    overflow: hidden;
    perspective: 1000px;
    /* Essential for 3D effect */
}

.scene {
    width: var(--card-width);
    aspect-ratio: var(--card-ratio);
    /* height will be calculated automatically */
    position: relative;
    /* Determine the 3D space */
    perspective: 1000px;
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1000px;
    /* moved perspective here for inner 3D */
    transform-style: preserve-3d;
    /* Keep for tilt */
    transform: rotateX(0) rotateY(0);
    transition: transform 0.1s ease-out;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    /* Indicate clickable */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

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

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    /* Safari */
    backface-visibility: hidden;
    border-radius: 20px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-front {
    transform: rotateY(0deg);
    background-image: url('card-front.png');
    background-size: cover;
    background-position: center;
}

.card-back {
    transform: rotateY(180deg);
    background-image: url('card-back.png');
    background-size: cover;
    background-position: center;
}

.card-content {
    text-align: center;
    z-index: 2;
    transform: translateZ(20px);
    /* Parallax text */
}

h1 {
    font-size: 3rem;
    margin: 0 0 1rem;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

p {
    font-size: 1.2rem;
    color: #94a3b8;
}

/* Shine effect */
.shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 40%,
            rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 3;
}



/* Instruction Text */
.instruction-text {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: -0.04em;
    opacity: 0.8;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 2s ease-out;
    z-index: 10;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 0.8;
        transform: translateX(-50%) translateY(0);
    }
}
