@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    --primary-color: #ff7700;
    --secondary-color: #ffb700;
    --accent-color: #ff3d00;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --background-color: #2d3436;
    --card-bg-color: #1e2022;
    --text-color: #ffffff;
    --text-secondary: #b2becd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2d3436 0%, #1e2022 100%);
}

.page-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 100;
}

#game-logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 119, 0, 0.7),
                 0 0 20px rgba(255, 119, 0, 0.4);
    padding: 5px 0;
    letter-spacing: 1px;
    animation: glow 2s infinite alternate;
    text-align: center;
}

.back-to-portal {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 119, 0, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.back-to-portal:hover {
    color: var(--primary-color);
    background-color: rgba(30, 32, 34, 0.8);
    transform: translateY(-2px);
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 650px;
    margin: 20px auto;
    background-color: var(--card-bg-color);
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 119, 0, 0.6),
                inset 0 0 20px rgba(255, 119, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 30px;
}

.screen.active {
    display: flex;
}

/* 홈 화면 스타일 */
#home-screen h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px rgba(255, 119, 0, 0.7);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 22px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.tasks-input {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 500px;
}

.tasks-input h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    text-align: center;
}

.input-group {
    margin-bottom: 15px;
}

.task-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid rgba(255, 119, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.task-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 119, 0, 0.4);
}

.task-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.primary-button, .secondary-button {
    padding: 12px 25px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
}

.primary-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
}

.secondary-button {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.primary-button:hover, .secondary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 게임 화면 스타일 */
.game-header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.timer-display {
    font-size: 20px;
    font-weight: 700;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 30px;
    color: var(--warning-color);
}

.game-area {
    width: 100%;
    height: 400px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.task-characters {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

.character, .tiger {
    position: absolute;
    transition: all 0.3s linear;
}

.character {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.character-icon, .tiger-icon {
    font-size: 40px;
    margin-bottom: 5px;
}

.character-name {
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    text-align: center;
}

#character-1 {
    top: 50px;
    left: 50px;
    animation: runCharacter1 60s linear forwards;
}

#character-2 {
    top: 150px;
    left: 50px;
    animation: runCharacter2 60s linear forwards;
}

#character-3 {
    top: 250px;
    left: 50px;
    animation: runCharacter3 60s linear forwards;
}

#tiger {
    top: 150px;
    left: -50px;
    animation: runTiger 60s linear forwards;
}

@keyframes runCharacter1 {
    0% { left: 50px; }
    100% { left: calc(100% - 50px); }
}

@keyframes runCharacter2 {
    0% { left: 50px; }
    100% { left: calc(100% - 50px); }
}

@keyframes runCharacter3 {
    0% { left: 50px; }
    100% { left: calc(100% - 50px); }
}

@keyframes runTiger {
    0% { left: -50px; }
    100% { left: calc(100% - 100px); }
}

.instruction {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    padding: 0 20px;
}

.decision-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

.choice-button {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    background-color: rgba(255, 119, 0, 0.2);
    color: var(--text-color);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 게임 오버 화면 스타일 */
#game-over-screen {
    text-align: center;
}

#result-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.result-message {
    font-size: 24px;
    margin-bottom: 30px;
    padding: 12px 25px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    display: inline-block;
}

.success-message {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.success-text {
    font-size: 20px;
    color: var(--success-color);
    font-weight: 600;
}

.choice-display {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 350px;
}

.choice-label {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.choice-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary-color);
    word-break: break-word;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.game-over-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

/* 애니메이션 */
@keyframes glow {
    0% { text-shadow: 0 0 10px rgba(255, 119, 0, 0.7), 0 0 20px rgba(255, 119, 0, 0.4); }
    100% { text-shadow: 0 0 15px rgba(255, 119, 0, 0.9), 0 0 30px rgba(255, 119, 0, 0.6); }
}

/* 모바일 반응형 */
@media (max-width: 800px) {
    #game-container {
        height: 600px;
        margin: 10px auto;
        width: 95%;
    }
    
    .page-header {
        padding: 10px 15px;
    }
    
    #game-logo {
        font-size: 20px;
    }
    
    .back-to-portal {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    #home-screen h1 {
        font-size: 36px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .screen {
        padding: 20px 15px;
    }
    
    .game-area {
        height: 350px;
    }
    
    .character-icon, .tiger-icon {
        font-size: 30px;
    }
    
    .character-name {
        font-size: 12px;
        max-width: 80px;
        background-color: rgba(0, 0, 0, 0.8);
        border: 1px solid var(--primary-color);
        padding: 4px 8px;
    }
}

@media (max-width: 500px) {
    #game-container {
        height: 550px;
        border-width: 2px;
    }
    
    #home-screen h1 {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .tasks-input {
        padding: 15px;
    }
    
    .instruction {
        font-size: 14px;
        background-color: rgba(0, 0, 0, 0.7);
        padding: 8px;
        border-radius: 8px;
        margin: 0 10px;
    }
    
    .decision-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .choice-button {
        padding: 12px;
        font-size: 14px;
    }
    
    .game-over-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .primary-button, .secondary-button {
        width: 100%;
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .character-name {
        font-size: 12px;
        max-width: 70px;
        padding: 4px 6px;
        font-weight: bold;
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .character-icon, .tiger-icon {
        font-size: 24px;
    }
} 