* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
    width: 100%;
    overflow-x: hidden;
}

h1 {
    text-align: center;
    color: #ecf0f1;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Playfair Display', serif;
}

.site-description {
    text-align: center;
    color: #bdc3c7;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.search-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    width: 100%;
}

.search-form {
    margin-bottom: 0;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
}

.search-form input:focus {
    outline: none;
    border-color: #7f8c8d;
    box-shadow: 0 0 0 3px rgba(127, 140, 141, 0.1);
}

.search-form button {
    padding: 1rem;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.search-form button:hover {
    background: #2c3e50;
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
    margin: 1rem 0;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 12px;
    background: rgba(44, 62, 80, 0.3);
    backdrop-filter: blur(5px);
    width: 100%;
    flex-wrap: wrap;
}

.download-btn {
    padding: 0.6rem 1rem;
    background: rgba(127, 140, 141, 0.8);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.download-btn:hover {
    background: rgba(108, 122, 125, 0.9);
    transform: translateY(-1px);
}

.upload-btn {
    padding: 0.6rem 1rem;
    background: rgba(149, 165, 166, 0.8);
    color: white;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    opacity: 0.9;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.upload-btn:hover {
    background: rgba(127, 140, 141, 0.9);
    opacity: 1;
}

.books-list {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-top: 1rem;
    width: 100%;
}

.table-container {
    overflow-x: auto;
    margin: 0;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 600px;
}

th:first-child, td:first-child {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: center;
}

th:nth-child(2), td:nth-child(2) {
    width: 55%;
    min-width: 300px;
}

th:nth-child(3), td:nth-child(3) {
    width: 8%;
    min-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th:nth-child(4), td:nth-child(4) {
    width: 12%;
    min-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th:nth-child(5), td:nth-child(5) {
    width: 30%;
    min-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    background: rgba(236, 240, 241, 0.9);
    color: #2c3e50;
    font-weight: 600;
    text-align: left;
    padding: 1.2rem 1rem;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #34495e;
}

tr:hover {
    background-color: rgba(236, 240, 241, 0.4);
}

.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem;
}

.sortable:hover {
    background-color: rgba(236, 240, 241, 0.6);
}

.sort-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0.8rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
        padding: 0 0.5rem;
    }

    .site-description {
        font-size: 0.85rem;
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }

    .search-section {
        padding: 1rem;
        margin: 0 0.5rem;
    }

    .search-input-group {
        gap: 0.3rem;
    }

    .search-form input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .search-form button {
        padding: 0.8rem;
        font-size: 0.9rem;
        min-width: 60px;
    }

    .button-group {
        margin: 0.8rem 0.5rem;
        padding: 0.4rem;
        gap: 0.3rem;
    }

    .download-btn, .upload-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .books-list {
        margin: 0.8rem 0.5rem;
    }

    th:first-child, td:first-child {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
    }

    th:nth-child(2), td:nth-child(2) {
        width: 55%;
        min-width: 240px;
    }

    th:nth-child(3), td:nth-child(3) {
        width: 8%;
        min-width: 60px;
    }

    th:nth-child(4), td:nth-child(4) {
        width: 12%;
        min-width: 80px;
    }

    th:nth-child(5), td:nth-child(5) {
        width: 25%;
        min-width: 180px;
    }

    th, td {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .footer {
        padding: 0.8rem 0;
        margin-top: 1rem;
    }

    .footer-content {
        padding: 0 0.5rem;
    }
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #000;
}

.upload-instructions {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.upload-instructions h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.upload-instructions ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.upload-instructions ul ul {
    list-style-type: circle;
    margin: 0.5rem 0;
}

.upload-instructions li {
    margin-bottom: 0.5rem;
}

.password-section {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.password-section input[type="password"] {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.confirm-btn {
    padding: 0.5rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.confirm-btn:hover {
    background-color: #2980b9;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }

    .password-section {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%;
    }
}

.footer {
    background: #2c3e50;
    padding: 1rem 0;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer p {
    color: #bdc3c7;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .footer {
        padding: 0.8rem 0;
        margin-top: 1rem;
    }

    .footer-content {
        padding: 0 1rem;
    }
} 