@import url('https://fonts.googleapis.com/css2?family=Nanum+Gothic:wght@400;700;800&display=swap');

/* ===== 전체 레이아웃 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e8e8e8;
    font-family: 'Nanum Gothic', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
    overflow-x: hidden;
}

.container {
    background: rgba(15, 20, 35, 0.85);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 
                0 0 30px rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.2);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 제목 & 텍스트 ===== */
h1 {
    font-size: 48px;
    font-weight: 800;
    color: #f1c40f;
    text-shadow: 0 0 20px rgba(241, 196, 15, 0.5),
                 0 0 40px rgba(241, 196, 15, 0.3);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

h2 {
    color: #f39c12;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(243, 156, 18, 0.4);
}

h3 {
    color: #ecf0f1;
    font-size: 24px;
    margin: 20px 0;
}

p {
    font-size: 20px;
    line-height: 1.8;
    margin: 15px 0;
    color: #bdc3c7;
}

strong {
    color: #f1c40f;
    font-weight: 700;
}

/* ===== 힌트 박스 ===== */
.hint-box {
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    color: #2c3e50;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-left: 5px solid #f39c12;
}

.hint-box p {
    color: #2c3e50;
    margin: 10px 0;
}

/* ===== 🔐 3D 자물쇠 스타일 ===== */
.lock-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    perspective: 1200px;
    flex-wrap: wrap;
}

.dial-wrapper {
    width: 60px;
    height: 80px;
    position: relative;
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
    border-radius: 8px;
    border: 3px solid #555;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6),
                inset 0 0 10px rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dial-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(241, 196, 15, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.dial-wrapper:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.dial {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

.number {
    position: absolute;
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: #eee;
    background: linear-gradient(to bottom, #444, #666, #444);
    border-bottom: 1px solid #222;
    backface-visibility: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.highlight-bar {
    position: absolute;
    top: 50%;
    left: -10px;
    right: -10px;
    height: 3px;
    background: rgba(231, 76, 60, 0.8);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.8),
                0 0 20px rgba(231, 76, 60, 0.5);
    transform: translateY(-50%);
}

/* ===== 버튼 스타일 ===== */
button.next-btn {
    padding: 18px 40px;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: none;
    margin-top: 30px;
    box-shadow: 0 8px 20px rgba(230, 126, 34, 0.4);
    transition: all 0.3s ease;
    font-family: 'Nanum Gothic', sans-serif;
}

button.next-btn:hover {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.6);
    transform: translateY(-2px);
}

button.next-btn:active {
    transform: translateY(0);
}

button {
    font-family: 'Nanum Gothic', sans-serif;
    cursor: pointer;
}

/* ===== 프롤로그 스타일 ===== */
.prologue {
    background: rgba(20, 25, 40, 0.9);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #f1c40f;
    text-align: left;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.prologue h3 {
    color: #f1c40f;
    margin-bottom: 15px;
    text-align: center;
}

.prologue p {
    font-size: 18px;
    line-height: 1.8;
    margin: 12px 0;
    color: #d5d8dc;
}

.prologue .quote {
    font-style: italic;
    color: #f39c12;
    border-left: 3px solid #f39c12;
    padding-left: 15px;
    margin: 20px 0;
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .container {
        padding: 25px;
        width: 95%;
    }
    
    h1 { font-size: 36px; }
    h2 { font-size: 26px; }
    p { font-size: 16px; }
    
    .dial-wrapper {
        width: 50px;
        height: 70px;
    }
    
    .number {
        font-size: 28px;
        height: 70px;
    }
    
    button.next-btn {
        padding: 15px 30px;
        font-size: 18px;
    }
}

/* ===== 스크롤바 스타일링 ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(241, 196, 15, 0.6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(241, 196, 15, 0.8);
}
