.reader-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.login-view {
    text-align: center;
    padding: 4rem 2rem;
}

.login-box {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    border: 2px solid #000000;
    border-radius: 10px;
}

.login-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #000000;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.login-btn {
    width: 100%;
    padding: 12px 30px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.login-error {
    color: #ff0000;
    margin-top: 1rem;
    font-size: 14px;
    display: none;
}

.login-hint {
    margin-bottom: 1rem;
    font-size: 14px;
    color: #666;
}

.hint-password {
    color: #ff0000;
    font-weight: bold;
}

.file-selector {
    text-align: center;
    padding: 2rem;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.file-btn-secondary {
    background-color: #ffffff;
    color: #000000;
}

.file-btn-secondary:hover {
    background-color: #000000;
    color: #ffffff;
}

.file-list {
    margin-top: 20px;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.file-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f5f5f5;
}

.file-item:last-child {
    border-bottom: none;
}

.search-box {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #000000;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 15px;
}

.search-box:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.reader-view {
    display: none;
}

.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid #000000;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.reader-title {
    font-size: 1.5rem;
    font-weight: bold;
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.reader-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 8px 16px;
    border: 1px solid #000000;
    border-radius: 5px;
    background: #ffffff;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.control-btn:hover {
    background: #000000;
    color: #ffffff;
}

.reader-content {
    padding: 20px;
    line-height: 1.8;
    font-size: 18px;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 60vh;
}

.reader-content.theme-light {
    background-color: #ffffff;
    color: #000000;
}

.reader-content.theme-sepia {
    background-color: #f4ecd8;
    color: #5c4b37;
}

.reader-content.theme-dark {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.reader-content.theme-green {
    background-color: #cce8cf;
    color: #2d4a2e;
}

.settings-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 25px;
    z-index: 1000;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.settings-panel.show {
    display: block;
}

.settings-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.settings-overlay.show {
    display: block;
}

.settings-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-size-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #000000;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-btn:hover {
    background: #000000;
    color: #ffffff;
}

.font-size-display {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
}

.theme-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-option {
    width: 40px;
    height: 40px;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border-color: #000000;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.theme-option.light {
    background: #ffffff;
}

.theme-option.sepia {
    background: #f4ecd8;
}

.theme-option.dark {
    background: #1a1a1a;
}

.theme-option.green {
    background: #cce8cf;
}

.settings-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.settings-close:hover {
    color: #000000;
}

.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #eee;
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: #000000;
    width: 0%;
    transition: width 0.1s;
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #ccc;
}

.chapter-btn {
    padding: 10px 20px;
    border: 1px solid #000000;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chapter-btn:hover:not(:disabled) {
    background: #000000;
    color: #ffffff;
}

.chapter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.no-files {
    text-align: center;
    color: #666;
    padding: 40px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.file-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.logout-btn {
    margin-left: 10px;
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e0e0e0;
}

@media (max-width: 768px) {
    .reader-title {
        font-size: 1.2rem;
    }

    .reader-content {
        font-size: 16px;
        padding: 15px;
    }

    .control-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .settings-panel {
        min-width: auto;
        width: 90%;
        max-width: 350px;
    }
}
