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

/* Lock root elements to fixed screen height */
html, body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: #181A1B;
    color: #C8C3BC;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

h2 {
    color: #C8C3BC;
    margin-bottom: 15px;
}

.hidden {
    display: none !important;
}

/* -------------------------------------------------- */
/* Auth Section                                       */
/* -------------------------------------------------- */
#auth-section {
width: 100%;
max-width: 400px;
background: #131516;
border: 1px solid #393D40;
padding: 24px;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#auth-section input {
width: 100%;
margin-bottom: 12px;
}

#auth-section button {
width: 48%;
margin-right: 2%;
}

#auth-section button:last-of-type {
margin-right: 0;
}

/* -------------------------------------------------- */
/* Quotebook Section Container                        */
/* -------------------------------------------------- */
#quote-section {
width: 100%;
max-width: 800px;
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}

/* Controls & Filters Bar */
.controls-container {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

/* Scrollable Main Quote Feed */
#quote-box {
flex: 1;
min-height: 0;
border: 1px solid #393D40;
border-radius: 8px;
background: #131516;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 12px;
margin-bottom: 10px;
display: flex;
flex-direction: column;
}

/* Quote Input Bar */
.input-container {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-shrink: 0;
}

#quote-text {
flex: 2;
}

#quote-author {
flex: 1;
}

/* -------------------------------------------------- */
/* Elements & Cards                                   */
/* -------------------------------------------------- */
.quote-card {
    border-bottom: 1px solid #2B2D2F;
    padding: 10px 0;
}

.quote-card:last-child {
    border-bottom: none;
}

.quote-text {
    font-size: 1.05em;
    font-style: italic;
    color: #E8E6E3;
    line-height: 1.4;
    word-break: break-word;
}

.quote-author {
    font-weight: 600;
    margin-top: 4px;
    color: #3e9bcd;
}

.quote-meta {
    font-size: 0.75em;
    color: #888;
    margin-top: 2px;
}

.system-msg {
    color: #9E9689;
    background: #202224;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.9em;
    border: 1px solid #393D40;
}

.hidden { display: none; }
.quote-card { border: 1px solid #ccc; padding: 12px; margin-bottom: 10px; border-radius: 6px; }
.quote-text { font-size: 1.1em; font-style: italic; }
.quote-author { font-weight: bold; margin-top: 5px; }
.quote-meta { font-size: 0.8em; color: #666; }

#load-more-btn {
margin-bottom: 12px;
text-align: center;
}

/* -------------------------------------------------- */
/* Form Inputs, Selects & Buttons                     */
/* -------------------------------------------------- */
input[type="text"],
input[type="password"],
select {
    background: #2B2D2F;
    color: #C8C3BC;
    border: 1px solid #393D40;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #555A5E;
}

/* Custom Styled Select Dropdown */
select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23C8C3BC" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    padding-right: 30px;
}

select option {
    background: #2B2D2F;
    color: #C8C3BC;
}

button {
    padding: 10px 16px;
    background: #2B2D2F;
    color: #C8C3BC;
    border: 1px solid #393D40;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

button:hover {
    background-color: #131516;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    #quote-section {
    max-width: 100%;
    }

    h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .input-container {
        flex-wrap: wrap;
    }

    #quote-text {
    flex: 1 1 100%;
    }

    #quote-author {
    flex: 1;
    }
}
