/* static/css/style.css */
@font-face {
    font-family: 'Pretendard';
    src: url('/fonts/woff2/PretendardVariable.woff2') format('woff2');
    font-weight: 45 920;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

.hidden { display: none !important; }

input, select, button, textarea {
    max-width: 100%;
    font: inherit;
}

button, select, textarea, input:not([type="checkbox"]):not([type="radio"]) {
    -webkit-appearance: none;
    appearance: none;
}

input[type="checkbox"], input[type="radio"] {
    -webkit-appearance: auto;
    appearance: auto;
}

body {
    font-family: 'Pretendard', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 15px;
    background-color: #f8f9fa;
    color: #333;
    display: flex; flex-direction: column; align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 400px;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 30px);
}
.container.container--narrow { max-width: 340px; }

.topbar {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    position: absolute;
    top: 0;
    left: 0;
    margin-bottom: 0;
    z-index: 10;
}

.home-icon {
    width: 24px !important;
    height: 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    text-decoration: none;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #111827;
    overflow: hidden;
    user-select: none;
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 10;
}

.home-icon:visited { color: #111827; }

.home-icon svg {
    width: 16px !important;
    height: 16px !important;
    display: block;
}

.home-icon:active {
    transform: scale(0.98);
    background: transparent;
}

header { margin-bottom: 25px; text-align: center; }
header h1 { font-size: 1.2rem; color: #1a73e8; margin: 0; }
header p { font-size: 0.85rem; color: #666; margin-top: 5px; }

.menu-list { display: grid; gap: 15px; width: 100%; }

.select--hidden {
    display: none !important;
}

.dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    text-align: left;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
    position: relative;
}

.dropdown-trigger::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.dropdown-trigger:focus {
    outline: 2px solid rgba(26, 115, 232, 0.35);
    outline-offset: -2px;
    border-color: rgba(26, 115, 232, 0.45);
}

.dropdown-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.12);
    overflow: auto;
    max-height: 40vh;
    z-index: 30;
    padding: 6px;
}

.dropdown-item {
    width: 100%;
    padding: 10px 10px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #111827;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-item[aria-selected="true"] {
    background: rgba(26, 115, 232, 0.12);
}

.file-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 공통 버튼 글자 크기(윈/맥 사이드바에서 과도하게 커지는 현상 완화) */
.btn-action,
.btn-secondary,
.dropdown-trigger,
.dropdown-item {
    font-size: 13px;
}

.menu-item {
    background: white; border-radius: 12px; padding: 20px;
    display: flex; align-items: center; text-decoration: none;
    color: inherit; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s; border: 1px solid #eee;
}

.menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: rgba(26, 115, 232, 0.25);
}

.menu-item:active { transform: scale(0.98); background-color: #f1f3f4; }

.icon {
    width: 45px; height: 45px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-right: 15px; font-size: 1.5rem;
}

.text-group { display: flex; flex-direction: column; }
.title { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.desc { font-size: 0.75rem; color: #888; }

/* 기능별 아이콘 배경색 */
.bg-red { background-color: #fee2e2; color: #ef4444; }
.bg-blue { background-color: #dbeafe; color: #3b82f6; }
.bg-green { background-color: #dcfce7; color: #22c55e; }
.bg-lime { background-color: #ecfccb; color: #65a30d; }
.bg-pink { background-color: #fce7f3; color: #ec4899; }

/* 하단 버전 정보 스타일 */
.footer-version {
    margin-top: auto; /* 페이지 하단으로 밀어내기 */
    padding: 20px 0;
    text-align: center;
}

.version-link {
    font-size: 11px;
    color: #bdc3c7;
    text-decoration: none;
    cursor: default;   /* 손가락 모양 안 나오게 */
    user-select: none; /* 텍스트 선택(드래그) 안 되게 해서 더 버튼처럼 작동하게 함 */
}

/* 호버 시 색 변화 없음 */
.version-link:hover {
    color: #bdc3c7;
}
