:root {
    --primary-gradient: linear-gradient(90deg, #93c47d, #6aa84f);
    --orange-gradient: linear-gradient(90deg, #93c47d, #6aa84f);
    --primary-color: #6aa84f;
    --secondary-color: #93c47d;
    --background-color: #f9f9f9;
    --white: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #cccccc;
    --max-content-width: 1200px;
}

/* 기본 스타일 */
body {
    font-family: sans-serif;
    margin: 0 auto;
    padding: 0;
    max-width: var(--max-content-width);
    background: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 스타일 */
.header {
    background: var(--primary-gradient);
    padding: 15px 20px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.header-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: var(--white);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.container {
    padding: 20px;
}

/* 피드백 페이지 스타일 */
h1,h2,h3 {
    text-align: center;
    margin-top: 20px;
}

.info-box {
    background: #fff4e5;
    border-left: 6px solid var(--secondary-color);
    padding: 16px;
    margin: 20px 0;
    border-radius: 6px;
}

.form-box,
.stats-box {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

input,
select,
textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

input:invalid,
textarea:invalid {
    border-color: #ff4444;
}

.required::after {
    content: ' *';
    color: #ff4444;
}

button {
    margin-top: 20px;
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

/* 통계 바 스타일 */
.stat-bar {
    margin-bottom: 10px;
}

.bar-container {
    background: #eee;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.bar-fill {
    background: var(--orange-gradient);
    height: 100%;
    text-align: right;
    padding-right: 5px;
    color: var(--white);
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

/* 토스트 메시지 스타일 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* 북쉘프 스타일 */
.bookshelf-container {
    margin-bottom: 30px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 8px;
}

.bookshelf {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.book-item {
    width: 200px;
    cursor: pointer;
    transition: transform 0.2s;
}

.book-item:hover {
    transform: scale(1.05);
}

.book-item.active {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    border-radius: 4px;
}

.book-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bolder;
    color: var(--text-primary);
}

.app-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.footer {
    text-align: center;
    margin-top: auto;
    padding: 30px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 피드백 배너 스타일 */
.feedback-banner {
    width: 100%;
    background: var(--primary-gradient);
    color: var(--white);
    text-align: center;
    font-size: 14px;
    padding: 10px 0;
    font-weight: bold;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px var(--shadow-color);
    border-radius: 30px;
    display: none;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .book-item {
        width: 200px;
    }
}

/* PDF 뷰어 썸네일 스타일 */
._df_thumb {
    width: 180px;
    height: 180px;
    filter: drop-shadow(0 0 5px var(--shadow-color));
}

.autocomplete {
    position: relative;
    width: 100%;
    font-family: sans-serif;
}

.autocomplete input {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color .2s;
}

.autocomplete input:focus {
    outline: none;
    border-color: #7a9eff;
    box-shadow: 0 0 4px rgba(122, 158, 255, .4);
}

.list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    z-index: 10;
    transition: opacity .2s;
    opacity: 1;
}

.list.hidden {
    opacity: 0;
    pointer-events: none;
}

.item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background .1s;
}

.item+.item {
    border-top: 1px solid #eee;
}

.item:hover,
.item.active {
    background: #f0f4ff;
}

/* 커스텀 스크롤바 (WebKit 계열) */
.list::-webkit-scrollbar {
    width: 6px;
}

.list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .2);
    border-radius: 3px;
}