/* 지혜의 샘터 기본 스타일 - 미래 지향적 스타일 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Roboto:wght@300;400;500&display=swap');

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(135deg, #0f1b30, #1f3050);
    color: #e0f0ff;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.console-container {
    width: 90%;
    max-width: 900px;
    padding: 20px;
    box-shadow: 0 0 25px rgba(66, 220, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(15, 25, 50, 0.5);
}

.header-animation {
    text-align: center;
    margin-bottom: 20px;
    font-size: 10px;
    color: #42dcff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

pre {
    margin: 0;
    font-size: 6px;
    color: #42dcff;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(66, 220, 255, 0.6);
    letter-spacing: 3px;
    font-weight: 500;
}

.terminal {
    background: rgba(10, 18, 35, 0.8);
    border: 1px solid rgba(66, 220, 255, 0.3);
    box-shadow: 0 0 15px rgba(66, 220, 255, 0.2), inset 0 0 10px rgba(0, 50, 100, 0.4);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.terminal-header {
    background: linear-gradient(90deg, #1a3b5c, #0a1e33);
    color: #e0f0ff;
    padding: 10px 15px;
    font-weight: 500;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(66, 220, 255, 0.3);
}

.terminal-body {
    padding: 15px;
    background: rgba(10, 18, 35, 0.6);
}

.chat-container {
    height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
    border: 1px solid rgba(66, 220, 255, 0.3);
    border-radius: 8px;
    background: rgba(15, 25, 45, 0.4);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 0 10px rgba(0, 30, 60, 0.3);
}

.message {
    margin-bottom: 12px;
    padding: 10px 15px;
    word-break: break-word;
    border-radius: 8px;
    animation: messageAppear 0.3s ease-out;
    position: relative;
}

.bot-message {
    border-left: 2px solid #42dcff;
    background: rgba(30, 60, 90, 0.3);
    color: #e0f0ff; 
    box-shadow: 0 2px 10px rgba(0, 150, 200, 0.1);
    margin-right: 40px;
    transition: all 0.3s ease;
}

.bot-message:hover {
    background: rgba(30, 70, 100, 0.4);
    box-shadow: 0 4px 15px rgba(0, 150, 200, 0.2);
}

.user-message {
    border-right: 2px solid #a26bff;
    background: rgba(60, 30, 90, 0.3);
    text-align: right;
    color: #f0e0ff;
    margin-left: 40px;
    box-shadow: 0 2px 10px rgba(100, 50, 200, 0.1);
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-area {
    border-top: 1px solid rgba(66, 220, 255, 0.3);
    padding-top: 15px;
    position: relative;
}

.input-area::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(66, 220, 255, 0.6), 
        rgba(66, 220, 255, 0.8), 
        rgba(66, 220, 255, 0.6), 
        transparent);
}

.prompt {
    margin-bottom: 10px;
    color: #42dcff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9em;
    letter-spacing: 1px;
}

.input-line {
    display: flex;
    margin-bottom: 10px;
    position: relative;
}

input[type="text"] {
    flex: 1;
    background-color: rgba(15, 25, 45, 0.7);
    color: #e0f0ff;
    border: 1px solid rgba(66, 220, 255, 0.5);
    border-radius: 25px;
    padding: 12px 20px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(66, 220, 255, 0.1);
    outline: none;
}

input[type="text"]:focus {
    border-color: rgba(66, 220, 255, 0.8);
    box-shadow: 0 0 15px rgba(66, 220, 255, 0.3);
    background-color: rgba(20, 35, 60, 0.8);
}

button {
    background: linear-gradient(135deg, #0a84d0, #0a1f38);
    color: #e0f0ff;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(10, 132, 208, 0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: linear-gradient(135deg, #0a9fff, #0a3058);
    box-shadow: 0 5px 15px rgba(10, 159, 255, 0.4);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(10, 132, 208, 0.3);
}

button::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20px;
    height: 200%;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(35deg);
    transition: all 0.5s ease;
}

button:hover::after {
    left: 120%;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 30, 50, 0.4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #42dcff, #0a84d0);
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #42dcff, #0a9fff);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

/* 타이핑 효과를 위한 추가 스타일 */
.typing-effect {
    position: relative;
    line-height: 1.6;
}

.typed-text {
    display: inline;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.typed-cursor {
    display: inline-block;
    width: 4px;
    height: 18px;
    background-color: #42dcff;
    margin-left: 2px;
    animation: blink 1s infinite, pulse 2s infinite;
    vertical-align: middle;
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(66, 220, 255, 0.8);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 5px rgba(66, 220, 255, 0.5); }
    50% { box-shadow: 0 0 15px rgba(66, 220, 255, 0.8); }
    100% { box-shadow: 0 0 5px rgba(66, 220, 255, 0.5); }
}

/* 커서 애니메이션 삭제 - input 자체 커서를 사용할 것이므로 */
.cursor {
    display: none; /* 별도 커서 요소 숨김 */
}

.feedback-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.feedback-btn {
    border: none;
    padding: 6px 12px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 0.8em;
    opacity: 0.9;
    background-color: rgba(30, 50, 80, 0.7);
    color: #e0f0ff;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: 'Roboto', sans-serif;
}

.feedback-btn:hover {
    background-color: rgba(40, 60, 100, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.correct {
    background: linear-gradient(135deg, #00cc99, #00aa77);
    color: #ffffff;
}

.correct:hover {
    background: linear-gradient(135deg, #00dda7, #00bb88);
}

.incorrect {
    background: linear-gradient(135deg, #ff5577, #cc3355);
    color: #ffffff;
}

.incorrect:hover {
    background: linear-gradient(135deg, #ff6688, #dd4466);
}

.feedback-message {
    background-color: rgba(20, 35, 60, 0.4);
    border-left: 3px solid rgba(66, 220, 255, 0.6);
    border-radius: 5px;
    margin: 10px 0;
    padding: 12px;
    font-size: 0.9em;
    color: #e0f0ff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}
