* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    /*zoom: 1.2;*/
    font-family: 'Pretendard', 'Arial', sans-serif; /* Pretendard로 변경 */
    margin: 0;
    padding: 0;
    touch-action: none;
    height: 100%;
    overflow: hidden;
    background-color: #f2f4f6;
    font-size: 14px;
}

.add-button {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007aff;
    color: white;
    font-size: 30px;
    font-weight: bold;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.add-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 버튼 컨테이너 */
.button-container {
    position: fixed;
    bottom: 120px; /* + 버튼 위 */
    right: 20px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    transition: transform 0.3s ease-in-out, opacity 0.3s;
}

.button-container.hidden {
    transform: translateY(50px);
    opacity: 0;
    pointer-events: none;
}

/* 버튼 위로 나오기 */
.dynamic-button {
    background-color: #fff;
    color: #007aff;
    border: 2px solid #007aff;
    padding: 10px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.dynamic-button:hover {
    background-color: #007aff;
    color: #fff;
    transform: translateY(-2px);
}

.tab-container {
    display: block;
    justify-content: center;
    position: sticky;
    top: 0;
    background-color: #f4f4f4;
    overflow-x: auto;
    /* z-index: 1000; */
    border-bottom: 2px solid #ccc;
    margin-bottom: 16px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.tab-scroller {
    width: max-content;
}

.tab {
    padding: 15px 30px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
    background: none;
    font-size: 16px;
    /* width: 179px; */
    transition: color 0.3s, border-bottom 0.3s;
    display: inline-block;
}

.tab:hover {
    color: #007bff;
}

.tab.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

.container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 8px;
    padding: 15px 0px;
    margin: 20px auto;
    overflow-x: auto;
    width: 100%;
}

h2 {
    font-size: 20px;
    color: #343a40;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

h2.books::before {
    content: '\1F4DA';
    font-size: 24px;
    margin-right: 8px;
}

h2.sylmo::before {
    content: '\231B';
    font-size: 24px;
    margin-right: 8px;
}

h2.ingang::before {
    content: '\01F5A5 \FE0F';
    font-size: 24px;
    margin-right: 8px;
}

table {
    width: 100%;
    min-width: 600px; /* 최소 너비 보장 */
    border-collapse: collapse;
}

thead th {
    background-color: #f1f3f5;
    color: #495057;
    font-weight: bold;
    text-align: left;
    padding: 12px 8px;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
    min-width: 60px;
}

tbody td {
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    font-size: 13px;
    overflow: hidden !important;
    word-wrap: normal;
    white-space: nowrap;
    /* text-overflow: clip; */
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: white;
    white-space: nowrap;
    font-weight: bold;
}

.status.drop { background-color: #f03e3e; }
.status.possessed { background-color: #495057; }
.status.studying { background-color: #228be6; }
.status.planned { background-color: #74c0fc; }
.status.paused { background-color: #fab005; }
.status.complete { background-color: #37b24d; }

.progress {
    height: 6px;
    background-color: #dee2e6;
    border-radius: 999px;
    width: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #51cf66;
    /* width: 0%; */
    transition: width 0.3s;
}

.small-text {
    font-size: 11px;
    color: #868e96;
    display: block;
    margin-top: 4px;
}

/* 모바일 대응 미디어 쿼리 */
@media screen and (max-width: 768px) {
    .container {
        margin: 10px auto;
        padding: 15px 0px;
        /* padding: 10px; */
    }

    h2 {
        font-size: 18px;
        padding: 0 5px;
    }

    thead th, tbody td {
        padding: 10px 6px;
    }

    .status {
        padding: 3px 6px;
    }
    /*body {
        zoom: 1 !important;
    }*/
}

@media screen and (max-width: 480px) {
    body {
        font-size: 13px;
        zoom: 1 !important;
    }

    h2::before {
        font-size: 20px;
    }

    .status {
        font-size: 10px;
    }

    .small-text {
        font-size: 10px;
    }
}

table-view {
    /* max-width: 1000px; */
    min-width: 600px;
    display: table;
    width: 100%;
    /* width: 100vhㄴ; */
}

book-row, course-row {
    display: table-row;
}

td.startdate, td.enddate, th.startdate, th.enddate {
    width: 100px;
}

.statustd {
    width: 100px;
}

book-details {
    transition-timing-function: ease-in-out;
    border-left: solid 1px #dee2e6;
    background-color: #ffffff;
    transition-duration: 0.5s;
    max-width: 500px;
    position: fixed;
    display: grid;
    height: 100%;
    width: 100%;
    z-index: 1;
    right: 0;
    top: 0;
}

book-details.hidden-bd {
    transition-timing-function: ease-in-out;
    right: max(-100vw, -500px);
    transition-duration: 0.5s;
}

.nav-bar {
    grid-template-columns: 42px 1fr;
    display: grid;
    padding: 4px;
    height: 50px;
}

.nav-bar > button {
    text-align: center;
    background: none;
    display: block;
    padding: 12px;
    border: none;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.modal-body {
    flex-direction: column;
    display: flex;
    gap: 10px;
}

.modal-section {
    grid-template-columns: 100px 1fr;
    margin-bottom: 20px;
    align-items: center;
    display: grid;
    gap: 10px;
}

.modal-section h3 {
    font-size: 16px;
    color: #343a40;
}

.modal-body input,
.modal-body select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    width: 100%;
}

.modal-footer {
    text-align: right;
}

.modal-footer button {
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    border: none;
}
.modal-footer button.save:active {
    background-color: #003F88; /* 어두운 파란색 */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}
.modal-footer button.save {
    background-color: #3182F6;
    color: white;
}

.modal-footer button.cancel {
    background-color: #FF3B30;
    margin-left: 8px;
    color: white;
}

book-row td:first-child>div {
    grid-template-columns: 24px minmax(150px, 1fr) 42px;
    align-items: center;
    /* overflow: hidden; */
    display: grid;
}

course-row td:first-child>div {
    grid-template-columns: minmax(174px, 1fr) 42px;
    align-items: center;
    /* overflow: hidden; */
    display: grid;
}

book-row td button:first-child {
    transition-duration: 0.5s;
    background: none;
    display: block;
    padding: 0px;
    border: none;
    height: 18px;
    width: 18px;
}

book-row td button:first-child svg {
    margin: 0 auto;
}

book-row td button.shb-hidden {
    transition-duration: 0.5s;
    transform: rotate(-90deg);
}

book-row td button:last-child, course-row td button:last-child {
    border: solid 1px #aaaaaa;
    border-radius: 999px;
    background: white;
    color: #aaaaaa;
    font-size: 12px;
    display: block;
    padding: 2px;
}

book-row td div span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.state-radios {
    grid-template-columns: 20px 1fr 20px 1fr;
    align-items: center;
    display: grid;
    gap: 8px;
}

.state-radios input {
    height: 16px;
}

.modal-section>input {
    border: none;
}

.modal-section>input:focus {
    border: initial;
}

#course-list>button, #wrongs>button {
    transition-duration: 0.5s;
    display: inline-block;
    border-radius: 999px;
    margin-bottom: 2px;
    background: none;
    padding: 4px 8px;
    margin-top: 2px;
    border: none;
}

#course-list>button {
    text-align: left;
}

#wrongs>button {
    background-color: rgb(235, 35, 35);
    margin-left: 10px;
    color: white;
    width: 48px;
}

#wrongs>button:last-child {
    background-color: #ebedf0;
    color: black;
}

#course-list>button:hover {
    background-color: #dee2e6;
    transition-duration: 0.5s;
}

#wrongs>input {
    border: solid 1px #ced3d8;
    transition-duration: 0.5s;
    display: inline-block;
    border-radius: 999px;
    text-align: center;
    margin-left: 10px;
    background: none;
    padding: 4px;
    width: 48px;
}

#wrongs>input:focus {
    border: solid 1px #3a85d1;
    transition-duration: 0.5s;
    outline: none;
}

.fab {  /* 문제집 추가라 해야하나 + 버튼 css임*/
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background-color: #3182F6;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.fab:hover {
    background-color: #1C6DEB;
    transform: scale(1.1);
}

.fab:active {
    background-color: #0A4DB3;
}

.autocomplete-container {
    position: relative;
    width: 300px;
    margin: 20px auto;
}

#bookSearchInput {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#autocompleteList {
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: white;
    list-style-type: none;
    margin: 0;
    padding: 0;
    /* z-index: 1000; */
    display: none;
}

#autocompleteList li {
    padding: 10px;
    cursor: pointer;
}

#autocompleteList li:hover {
    background-color: #f0f0f0;
}

#for-registernewbook #seriestable {
    grid-template-columns: 1fr 62px;
    display: grid;
    gap: 4px;
}

#for-registernewtest #seriestable {
    grid-template-columns: 1fr;
    display: grid;
    gap: 4px;
}

#seriestable div:last-child {
    grid-column: 1 / -1;
    display: flex;
    gap: 4px;
}

#seriestable div:last-child button {
    background-color: #dee2e6;
    border-radius: 999px;
    font-size: 16px;
    padding: 8px;
    border: none;
    width: 50px;
}

body>h2 {
    height: 32px;
}