@import url('https://fonts.googleapis.com/css2?family=Almendra:ital,wght@0,400;0,700;1,400;1,700&display=swap');
:root {
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --accent-color: #8b0000; 
    --card-text: #222;
    --border-color: #555;
}

body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Almendra', serif, Arial; 
    padding: 40px 20px;
    background-image: url('../Images/damask-vintage-pattern-background.jpg');
    background-size: 1100px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto 30px auto;
}

main h1, main p {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 20px auto;
}

main h1 {
    font-size: 2.5rem;
    font-weight: normal;
    letter-spacing: 1px;
}

/* Wood Button */

button, select {
    background-color: #5c4033; 
    background-image: url('../Images/wood_texture2.jpg'); 
    background-size: 50%;
    background-position: center;
    color: #f0f0f0; 
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9); 
    font-family: inherit;

    font-size: 0.85rem; 
    padding: 4px 10px; 
    
    border: 2px solid #2b170a; 
    border-radius: 4px;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.6), 
        2px 2px 4px rgba(0,0,0,0.5);    
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s, box-shadow 0.1s;
}
button:hover, select:hover { 
    filter: brightness(1.25); 
}

button:active {
    transform: scale(0.98);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.controls label {
    font-size: 1.1rem;
    margin-right: 10px;
}

/* Theory List*/

#theory-list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto;

}


#theory-list::-webkit-scrollbar {
    width: 12px;
}
#theory-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3); 
    border-radius: 6px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}
#theory-list::-webkit-scrollbar-thumb {
    background-color: #5c4033;
    background-image: url('../Images/wood_texture2.jpg'); /* Wood texture on the scrollbar! */
    background-size: cover;
    border: 2px solid #2b170a;
    border-radius: 6px;
}
#theory-list::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.2); 
}

/* Paper Box Styling */
.theory-item {
    background-color: #e6dcb8;
    background-image: url('../Images/paper.jpg'); 
    background-size: cover;
    background-position: center;
    color: var(--card-text); 
    border: 2px solid #333; 
    border-radius: 4px;
    margin-bottom: 8px; 
    padding: 10px 15px; 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3), 3px 3px 10px rgba(0,0,0,0.5);
    cursor: grab;
    display: flex;
    flex-direction: column;
}

.theory-item.dragging {
    opacity: 0.6;
    transform: scale(1.02);
}

.theory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.2); 
    padding-bottom: 6px; 
}

.theory-info {
    display: flex;
    align-items: center;
    gap: 10px; 
}

/* The Arrow Override */
.arrow-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    color: var(--card-text) !important;
    font-size: 1rem; 
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.2s;
}

.arrow-toggle:hover {
    color: var(--accent-color) !important;
    filter: none;
    transform: scale(1.1);
}

.arrow-toggle.open { 
    transform: rotate(90deg); 
}

/* inside the boxes */
.title-click {
    font-size: 1.2rem; 
    font-weight: bold;
    cursor: pointer;
    color: var(--card-text);
    transition: color 0.2s;
}

.title-click:hover { 
    color: var(--accent-color); 
}

.summary {
    display: none;
    margin-top: 8px; 
    color: #444;
    font-style: italic;
    font-size: 0.95rem; 
}

.summary.visible { display: block; }

.rank-box {
    display: flex;
    align-items: center;
}

.rank-box label {
    margin-right: 10px;
    font-weight: bold;
    font-size: 0.95rem; 
}

/* --- Modal (Paper Box Styling) --- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden { display: none; }

.modal-content {
    background-color: #e6dcb8;
    background-image: url('../Images/paper.jpg');
    background-size: cover;
    background-position: center;
    color: var(--card-text);
    padding: 40px;
    border-radius: 4px;
    max-width: 700px;
    width: 90%;
    position: relative;
    border: 3px solid #333;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3), 10px 10px 30px rgba(0,0,0,0.8);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: #444;
    font-weight: bold;
    transition: color 0.2s;
}

.close-btn:hover { color: var(--accent-color); }

#modal-title {
    margin-top: 0;
    border-bottom: 2px solid rgba(0,0,0,0.4);
    padding-bottom: 5px;
    font-size: 2rem;
    margin-bottom : 5px
}

#modal-body {
    margin-top: 2px; 
    font-size: 1.2rem;
    line-height: 1.6;
}

button.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%; 
    
    background-color: #e6dcb8;
    background-image: url('../Images/paper.jpg'); 
    background-size: cover;
    
    color: #110a05; 
    font-size: 2.5rem;
    font-family: 'Almendra', serif, Arial;
    text-shadow: none; 
    padding: 0;
    
    border: 3px solid #333;
    box-shadow: 3px 5px 15px rgba(0,0,0,0.6), inset 0 0 15px rgba(0,0,0,0.3);
    z-index: 999; 
}

button.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 3px 5px 20px rgba(0,0,0,0.8), inset 0 0 15px rgba(0,0,0,0.3);
}

button.floating-btn:active {
    transform: scale(0.95);
}

/* --- Help Modal Tabs --- */
.tab-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(0,0,0,0.4); 
    padding-bottom: 15px;
}

.tab-btn {
    opacity: 0.6; 
}

.tab-btn.active {
    opacity: 1; 
    border-color: var(--accent-color);
    box-shadow: inset 0 0 25px rgba(0,0,0,0.9); 
}

.tab-pane {
    display: none; 
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


.tab-pane h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2rem;
}

.axiom-list {
    list-style-type: none;
    padding: 0;
    margin-bottom: 20px;
}

.axiom-list li {
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.5;
    color: #222;
}

.axiom-list strong {
    color: var(--accent-color); 
    font-size: 1.3rem;
    margin-right: 5px;
}

#scholar-notes-input {
    width: 100%;
    height: 150px;
    margin-top: 10px;
    background: transparent; 
    border: 2px solid rgba(0,0,0,0.5); 
    border-radius: 4px;
    padding: 15px;
    font-family: 'Almendra', serif, Arial; 
    font-size: 1.1rem;
    color: #110a05;
    resize: vertical; 
    box-sizing: border-box;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

#scholar-notes-input:focus {
    outline: none;
    border-color: var(--accent-color); 
    background-color: rgba(255, 255, 255, 0.1); 
}

#scholar-notes-input::placeholder {
    color: rgba(0,0,0,0.4);
    font-style: italic;
}