﻿
html {
    font-family: "Arimo", "Noto Sans", sans-serif;
    font-optical-sizing: auto;
} 

body {
    background-color: #2d2d2d; /* Dark background color */
    color: #fff; /* Light text color */
    margin: 0;
    padding: 0; /* Remove padding for smaller screens */
}

/* Apply padding only for screens larger than 600px */
@media (min-width: 941px) {
    body {
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: auto;
    background: linear-gradient(135deg, #333, #444); /* Gradient background */

    padding: 0px;
    padding-bottom: 50px; /* Add bottom padding */
    border-radius: 4px;
}

/* Book Info and Chapter Title Styling */
.book-info-container {
    text-align: center;
    margin-bottom: 40px;
}

.book-info h1, .book-info h2 {
    margin: 0;
    padding: 10px 0;
    color: #fff;
}

/* Chapter Content Styling */
#chapterContent {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #333; /* Darker background for content */
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 20px;
    color: #f1f1f1;
}

    #chapterContent p, #chapterContent blockquote {
        text-align: center;
        line-height: 1.8;
    }

/* Button Styling */
button.read-chapter {
    width: 150px; /* Adjust width of buttons */
    padding: 10px 10px;
    background: linear-gradient(135deg, #3b8ccb, #2d85ec); /* Blue gradient */
    border: none;
    color: whitesmoke;
    font-size: 16px; /* Default font size */
    cursor: pointer;
    border-radius: 8px;
    display: block;
    text-align: center;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap; /* Prevent text wrapping */
}

paragraph {
    cursor: pointer; 
}
paragraph:hover {
    background: linear-gradient(rgba(100, 100, 100, 0.00), rgba(100, 100, 100, 0.2));
    border-radius: 2px;
}



/* Hover effect */
button.read-chapter:hover {
    background: linear-gradient(135deg, #256bbc, #1d6bb3); /* Hover effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}



.chapter-headline {
    width: 93%; /* Ensure the div takes up the full width */
    text-align: left; /* Center the text within the div */
    font-size: 20px;
    font-weight: bold;
    margin-left: 30px;
    padding: 0px 0;
    border-bottom: 1px solid #ccc;
}

/* Apply padding only for screens larger than 600px */
@media (max-width: 649px) {

    .chapter-headline {
        min-width: 95%; /* Ensure the div takes up the full width */
        font-size: 19px;
        margin-left: 20px;

    }
}

@media (max-width: 394px) {

    .chapter-headline {
        min-width: 60%;
        font-size: 16px;
        margin-left: 20px;
    }
}



button.read-chapter {
    flex-shrink: 0; /* Prevent buttons from shrinking */
}





/* Style for the chapter select dropdown */
#chapter-select-top, #chapter-select-bottom {
    flex-grow: 1; /* Allow the select to take up remaining space */
    max-width: 350px; /* Limit the width of the select */
    margin: 0 10px; /* Add some margin around the select */

    padding: 5px;
    font-size: 16px;
    border: 2px solid #BCBCBD; /* Green border matching buttons */
    border-radius: 5px;
    background-color: #333; /* Dark background to match theme */
    color: #fff; /* White text for readability */
    appearance: none; /* Removes default styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%; /* Full width for better look in UI */
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    height: 39px;
}

    /* Hover and focus effects */
    #chapter-select-top:hover, #chapter-select-bottom:hover,
    #chapter-select-top:focus, #chapter-select-bottom:focus {
        border-color: #2196F3; /* Blue color on hover/focus for consistency with site’s buttons */
        background-color: #444; /* Slightly lighter dark color for hover/focus state */
    }

    /* Custom arrow for the dropdown to fit theme */
    #chapter-select-top::after, #chapter-select-bottom::after {
        content: '▼'; /* Arrow */
        position: absolute;
        right: 10px;
        color: #fff;
        pointer-events: none;
    }

/* Container for the chapter select */
.chapter-selector {
    display: inline-block;
    position: relative; /* For custom arrow positioning */
}



/* Modified CSS for the layout with buttons left and right of the select */
.bottomButtons {
    display: flex;
    justify-content: space-between; /* Force buttons to left and right of select */
    align-items: center; /* Vertically align items */
    max-width: 800px; /* Lock the width to match the #chapterContent */
    margin: 0 auto; /* Center the buttons container */
}



/* Mobile adjustments */
@media (max-width: 600px) {

    body { overflow-x: hidden; }

    /* Target the button container (it's a class, not an ID) */
    .bottomButtons {
        display: flex; 
        max-width: 100%; 
        padding: 0 10px; 
        box-sizing: border-box;
        padding: 0px 2px; 
    }

    /* Target the buttons (it's a class) and force them to shrink */
    .read-chapter { 
        width: 30%; 
        min-width: 60px; 
        padding: 8px 0px !important; 
        margin: 0px,0px !important;
        font-size: 12px !important; 
        

        flex-shrink: 1 !important; 
        

        white-space: nowrap;
        overflow: hidden; 
        text-overflow: ellipsis; /* Adds "..." to show clipping */

    }

    /* Target the chapter select dropdowns and allow them to shrink */
    #chapter-select-top, #chapter-select-bottom {
        flex-grow: 1; 
        min-width: 80px; 
        max-width: 40%; 
        margin: 0 5px; 
        font-size: 12px;
        height: 30px; 
    }
}




/* light mode for psychopaths */

#light-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #2d2d2d;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    z-index: 1000;
}

/* Light Mode Appearance */
body.light-mode #light-mode-toggle {
    background-color: #ffffff; /* Light mode color */
    color: #2d2d2d; /* Dark icon color */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Hover Effect */
#light-mode-toggle:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}








body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

    body.light-mode .container {
        background: linear-gradient(135deg, #ffffff, #eff0ff);
    }

    body.light-mode .book-info h1,
    body.light-mode .book-info h2 {
        color: #000000;
    }


    body.light-mode #chapterContent {
        color: #000000;
        background-color: #f8f8f8;
    }

    body.light-mode .chapter-headline {
        color: #000000;
        border-bottom: 1px solid #cccccc;
    }


    body.light-mode #chapter-select-top,
    body.light-mode #chapter-select-bottom {
        color: #000000;
        background-color: #ffffff;
        border-color: #cccccc;
    }



    
















    /*
 * Styles for the submitReplyButton element.
 * Note: The hover/mouseout effects involve dynamic style changes in the JS
 * which cannot be directly represented in static CSS without a :hover pseudo-class.
 */
.commentInputSection button[type="submit"] {
    width: 150px;
    padding: 10px 10px;
    background: linear-gradient(135deg, #3b8ccb, #2d85ec);
    border: none;
    color: whitesmoke;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    display: block;
    text-align: center;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

/* Add the hover style from the JS for a complete CSS representation */
.commentInputSection button[type="submit"]:hover {
    background: linear-gradient(135deg, #256bbc, #1d6bb3);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/*
 * Styles for the charCounter element.
 * The position properties here reflect the default positioning when the reply box is opened.
 * Note: The color changing logic is situational (based on remaining characters) and is kept in the JavaScript.
 */
.commentInputSection span:nth-child(4) { /* This targets the dynamically created charCounter in the reply form */
    color: grey; /* Initial color before user input */
    font-size: 14px;
    margin-top: 5px;
    position: relative;
    bottom: 8px;
    right: 40px;
}

/* For the main form's charCounter (inside getCommentFormHTML) which is a direct child of a div with relative position */
#commentInputSection #charCounter {
    /* If you prefer to apply styles to the ID for the *main* comment form: */
    position: absolute;
    bottom: 5px; /* Adjust based on parent div and textarea layout */
    right: 5px; /* Adjust based on parent div and textarea layout */
    color: grey; /* Initial color before user input */
    font-size: 14px; /* Assuming consistency with the reply counter */
}





/* 💡 Light Mode Styles for Comment Input Section */
body.light-mode .commentInputSection {
    background-color: #f8f8f8; /* Light background */
    color: #000; /* Dark text */
    border-radius: 8px;
}

body.light-mode .commentInputSection textarea {
    color: #0c003d;
    background: linear-gradient(to bottom, #d3d3d3, #cecfde);
}

body.light-mode .commentInputSection input {
    color: #0c003d;
    background: linear-gradient(to bottom, #d3d3d3, #cecfde);
}



.comment-count-badge {
    font-size: 0.65em;
    color: #bcbcbc;
    background: #f1f1f13d;
    border-radius: 10px;
    padding: 2px 4px;
    margin-left: 5px;
    vertical-align: middle;
    opacity: 0.8;
    user-select: none;
}



/* 1. Target the 'Submit Comment' button for the main paragraph form */
#commentForm button[type="submit"] {
    padding: 5px 5px; 
}
/* 2. Submit Reply Button (highly specific selector) */
.comment .commentInputSection button[type="submit"] {
    padding: 5px 5px; 
}

/* Style for the ACTIVELY SELECTED paragraph */
.comment-active-paragraph {

    background-color: #0088ff20; 

    box-decoration-break: clone;
    -webkit-box-decoration-break: clone; 
    
    padding-left: 3px; 
    border-left-color: #007bffa1; 
    border-left-style: solid;
    border-left-width: 3px;
}


.comment-active-paragraph:hover {

    background-color: #0088ff20;
    border-left-color: #007bff;
    padding-left: 3px; 
    border-left-width: 3px;
}

