/* Сброс стилей */
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }

body {
    background-color: #000;
    color: #fff;
    font-family: 'Georgia', serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- ОБЛОЖКА --- */
#cover-screen {
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    transition: opacity 1s ease;
    z-index: 10;
    position: absolute; top: 0; left: 0;
}

#cover-image {
    max-width: 90%; max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.fade-out { opacity: 0; pointer-events: none; }

/* --- ЧИТАЛКА --- */
#reader-screen {
    width: 100%; height: 100%;
    position: relative;
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
}

#page-img {
    max-width: calc(100% - 40px);
    max-height: calc(100vh - 120px);
    width: auto; height: auto;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
    display: block;
}

/* --- ИНТЕРФЕЙС (UI) --- */
#ui-controls {
    position: fixed; bottom: 30px; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; pointer-events: auto; z-index: 100;
}

button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px; font-size: 14px; cursor: pointer;
    border-radius: 2px; transition: all 0.2s; font-family: inherit;
}

button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff; color: #fff;
}

#page-indicator {
    font-size: 14px; color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

#goto-input-container {
    position: fixed; bottom: 50%; left: 50%; transform: translate(-50%, 50%);
    z-index: 101; background: rgba(0, 0, 0, 0.95);
    padding: 20px 30px; border-radius: 2px; border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

#goto-input {
    background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.5);
    color: #fff; font-size: 24px; text-align: center; width: 120px;
    outline: none; font-family: inherit; padding: 5px 0;
}

#goto-input::-webkit-outer-spin-button,
#goto-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#goto-input[type=number] { -moz-appearance: textfield; }

body.fullscreen-active #ui-controls,
body.fullscreen-active #page-indicator { display: none; }

/* --- ЭКРАН ОБРАТНОЙ СВЯЗИ (ТЁМНЫЙ/МИНИМАЛИСТИЧНЫЙ) --- */
#feedback-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000;
    display: flex; justify-content: center; align-items: center;
    z-index: 200; padding: 20px;
}

.feedback-content {
    text-align: center;
    max-width: 400px; width: 100%;
    background: #050505;
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.feedback-content h2 {
    margin-bottom: 16px; font-size: 18px; font-weight: 400;
    letter-spacing: 2px; text-transform: uppercase; color: #fff;
}

.feedback-text {
    margin-bottom: 32px; color: rgba(255, 255, 255, 0.6);
    font-size: 14px; line-height: 1.6;
}

.feedback-links {
    display: flex; justify-content: center; gap: 16px;
    margin-bottom: 30px; flex-wrap: wrap;
}

.feedback-link {
    display: inline-block; padding: 10px 24px;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8); text-decoration: none;
    font-size: 13px; letter-spacing: 0.5px; border-radius: 2px;
    transition: all 0.2s ease;
}

.feedback-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff; color: #fff;
}

.feedback-btn {
    display: block; width: 100%; margin: 10px 0 0; padding: 12px;
    background: transparent; border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5); cursor: pointer;
    font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase;
    transition: all 0.2s; font-family: inherit;
}

.feedback-btn:hover {
    color: #fff; background: rgba(255, 255, 255, 0.05);
}

/* Адаптив */
@media (max-width: 600px) {
    #reader-screen { padding: 10px; }
    #page-img { max-width: calc(100% - 20px); max-height: calc(100vh - 100px); }
    #ui-controls { padding: 0 20px; bottom: 20px; }
}
