@font-face {
    font-family: 'BlueArchive';
    src: url('fonts/bluearchive.ttf') format('truetype');
}
@font-face
{
    font-family: 'BlueArchive2';
    src: url('fonts/bluearchive2.ttf') format('truetype');
}

body, html
{
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'BlueArchive2';
    background-color: #000;
}

#game-container
{
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

#background-image
{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

#character-sprite
{
    position: absolute;
    bottom: -70%;
    left: 50%;
    transform: translateX(-50%);
    height: 160%;
    z-index: 2;
    transition: opacity 0.5s ease-in-out;
}

#top-ui
{
    position: absolute;
    top: 10px; right: 15px;
    z-index: 5; display: flex;
    gap: 10px;
}

#top-ui button
{
    font-family: 'BlueArchive2';
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    color: #19104a;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: skewX(-10deg);
    transition: transform 0.1s ease; position: relative; overflow: hidden;
}

#top-ui button:active
{ transform: skewX(-10deg) scale(0.95); }

#auto-btn.active
{ background-color: #FFD700; color: #19104a; }

#auto-btn.active::after
{
    content: '';
    position: absolute;
    top: 0;
    transform: translateX(-100%);
    width: 100%; height: 100%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 80%);
    animation: shine-animation 2.5s ease-in-out infinite;
}

@keyframes shine-animation
{
  0% { transform: translateX(-150%) skewX(-30deg); }
  100% { transform: translateX(150%) skewX(-30deg); }
}

#dialogue-box
{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to top, rgba(10,24,34,0.9) 20%, rgba(10,24,34,0.8) 70%, rgba(10,24,34,0.7) 85%, rgba(10,24,34,0) 100%);
    z-index: 3;
    padding: 40px;
    box-sizing: border-box;
    color: white;
}

#dialogue-header
{
    position: absolute;
    top: 75px;
    left: 50%;
    width: 80%;
    transform: translateX(-50%);
    height: 1px;
    background: linear-gradient(to right, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.8) 100%);
}

#character-name
{
    font-family: 'BlueArchive2';
    position: absolute;
    top:20px;
    left: 10%;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    text-shadow: -1px -1px 0 #1e3a8a, 1px -1px 0 #1e3a8a, -1px 1px 0 #1e3a8a, 1px 1px 0 #1e3a8a;
}

#affiliation
{
    position: relative;
    top: 2px; color: #5dd3ff;
    font-weight: 500;
    font-size: 30px; margin-left: 2px;
    text-shadow: -1px -1px 0 #1e3a8a, 1px -1px 0 #1e3a8a, -1px 1px 0 #1e3a8a, 1px 1px 0 #1e3a8a;
}

#dialogue-text
{
    margin-top: 45px;
    margin-left: 8%;
    margin-right: 8%;
    font-size: 30px;
    line-height: 1.6;
    color: #fff;
    text-shadow: -1px -1px 0 #1e3a8a, 1px -1px 0 #1e3a8a, -1px 1px 0 #1e3a8a, 1px 1px 0 #1e3a8a;
}

#page-indicator
{
    position: absolute;
    bottom: 20px; right: 10%;
    font-size: 18px; color: #fff;
    text-shadow: -1px -1px 0 #1e3a8a, 1px -1px 0 #1e3a8a, -1px 1px 0 #1e3a8a, 1px 1px 0 #1e3a8a;
}

#menu-modal
{
    display: none;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 500px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    z-index: 10;
    color: white;
    border: 1px solid #fff;
    flex-direction: column;
}

#menu-header
{
    padding: 15px;
    font-size: 24px;
    text-align: center;
    border-bottom: 1px solid #fff;
    flex-shrink: 0;
}

#menu-content
{
    display: flex;
    flex: 1;
    overflow: hidden;
    margin: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #555;
    border-radius: 8px;
}

#menu-tabs
{
    width: 150px;
    background-color: rgba(0, 0, 0, 0.5);
    border-right: 1px solid #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.tab-button
{
    flex: 0 0 auto;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    background-color: transparent;
    border: none;
    color: white;
    font-family: 'BlueArchive2';
    font-size: 16px;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s ease;
}

.tab-button:hover
{
    background-color: rgba(93, 211, 255, 0.3);
}

.tab-button.active
{
    background-color: #5dd3ff;
    color: #19104a;
}

.tab-content
{
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tab-pane
{
    display: none;
}

.tab-pane.active
{
    display: block;
}

.setting-group
{
    margin-bottom: 20px;
}

.setting-group label
{
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.setting-group button
{
    font-family: 'BlueArchive2';
    padding: 10px 15px;
    margin-right: 10px;
    border: 1px solid #fff;
    background-color: transparent;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.setting-group button:hover
{
    background-color: rgba(93, 211, 255, 0.3);
}

.setting-group button.active
{
    background-color: #5dd3ff;
    color: #19104a;
}

.setting-group select, .setting-group input[type="range"]
{
    width: 80%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #fff;
    background-color: #333;
    color: white;
    font-family: 'BlueArchive2';
    font-size: 16px;
}

#log-container
{
    height: 300px;
    overflow-y: auto;
    border: 1px solid #555;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
}

.log-entry
{
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.log-entry:last-child
{
    border-bottom: none;
}

.log-name
{
    font-weight: bold;
    color: #5dd3ff;
    font-size: 18px;
}

.log-text
{
    font-size: 16px;
    color: #eee;
}

#close-menu-btn
{
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 11;
}

#wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
}

.wallpaper-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.wallpaper-thumbnail:hover {
    transform: scale(1.05);
    border-color: #5dd3ff;
}

.wallpaper-thumbnail.active {
    border-color: #5dd3ff;
    box-shadow: 0 0 10px #5dd3ff;
}
/* --- 에디터 UI 스타일 추가 --- */

#editor-text {
    width: 95%;
    background-color: #333;
    border: 1px solid #fff;
    color: white;
    font-family: 'BlueArchive2', sans-serif;
    font-size: 18px;
    padding: 10px;
    border-radius: 5px;
    resize: none;
}

#editor-name, #editor-affiliation {
    background-color: #333;
    border: 1px solid #fff;
    color: white;
    font-family: 'BlueArchive2';
    padding: 8px;
    border-radius: 5px;
    width: 45%;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#apply-dialogue-btn {
    background-color: #5dd3ff;
    color: #19104a;
    font-weight: bold;
    border: none;
    flex: 1;
}

#apply-dialogue-btn:hover {
    background-color: #8ae0ff;
}

#capture-btn {
    border: 1px solid #ff9900;
    color: #ff9900;
}
#capture-btn:hover {
    background-color: rgba(255, 153, 0, 0.2);
}