* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', '微軟正黑體', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.library-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.library-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.library-title {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.library-subtitle {
    font-size: 1.2rem;
    color: #666;
    opacity: 0.8;
}

.library-main {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.novels-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.novel-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.novel-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.novel-table th {
    padding: 15px;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.novel-table th:first-child {
    border-radius: 10px 0 0 0;
}

.novel-table th:last-child {
    border-radius: 0 10px 0 0;
}

.novel-table td {
    padding: 0;
    border: 1px solid #e0e0e0;
    vertical-align: top;
}

.novel-item {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.novel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: 0;
}

.novel-item:hover::before {
    left: 0;
}

.novel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: white;
}

.novel-item * {
    position: relative;
    z-index: 1;
}

.novel-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.novel-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    text-align: center;
    margin-top: 10px;
}

.novel-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 10px;
    text-align: center;
}

.empty-cell {
    background: #f8f9fa;
    opacity: 0.3;
}

.library-footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .library-title {
        font-size: 2rem;
    }
    
    .library-subtitle {
        font-size: 1rem;
    }
    
    .novels-section {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .novel-table {
        font-size: 0.9rem;
    }
    
    .novel-item {
        min-height: 100px;
        padding: 15px;
    }
    
    .novel-title {
        font-size: 1.1rem;
    }
    
    .library-main {
        padding: 20px 10px;
    }
}

@media (max-width: 480px) {
    .novel-table,
    .novel-table thead,
    .novel-table tbody,
    .novel-table th,
    .novel-table td,
    .novel-table tr {
        display: block;
    }
    
    .novel-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .novel-table tr {
        margin-bottom: 20px;
        border: 1px solid #ccc;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .novel-table td {
        border: none;
        position: relative;
    }
}