        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; color: #333; max-width: 800px; margin: 0 auto; padding: 20px; background-color: #f4f7f6; }
        .card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px; }
        h1 { color: #2c3e50; text-align: center; }
.profile-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    background: #ebf0f1;
    padding: 15px;
    border-radius: 8px;
    
    /* ADD THESE TWO LINES */
    flex-wrap: wrap; 
    text-align: center;
}


        .input-group { margin: 15px 0; }
        label { display: block; font-weight: bold; margin-bottom: 5px; color: #7f8c8d; font-size: 0.9em; }
        input[type="text"], select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 16px; box-sizing: border-box; }
        button { cursor: pointer; border: none; border-radius: 6px; padding: 10px 20px; font-size: 14px; font-weight: 600; transition: opacity 0.2s; }
        .btn-primary { background-color: #3498db; color: white; }
        .btn-success { background-color: #27ae60; color: white; }
        .btn-warning { background-color: #d35400; color: white; }
        .btn-outline { background: transparent; border: 1px solid #3498db; color: #3498db; }
        .hidden { display: none !important; }
        .creativity-box { border-left: 4px solid #3498db; padding-left: 20px; }
        .question-text { font-size: 1.2em; font-weight: 500; margin: 20px 0; padding: 15px; background: #fffbe6; border-radius: 8px; }
        .stats { font-size: 0.8em; color: #95a5a6; margin-top: 10px; }
.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap; /* Allows items to wrap if they run out of space */
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 100;
    border-radius: 8px;
    padding: 10px 0;
}

.show-menu {
    display: block !important;
}

.dropdown-content button {
    color: #333;
    padding: 10px 16px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown-content button:hover {
    background-color: #f1f1f1;
}

#reviewPhase {
    position: relative;
}

.source-link {
    display: inline-block; 
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    color: #3498db;
    transition: color 0.2s;
}

.source-link:hover {
    color: #2980b9;
    transform: scale(1.2); /* Subtle grow effect on hover */
}

.bsd {
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: "SBL Hebrew", "Times New Roman", serif;
    font-size: 14px;
    direction: rtl;
    color: #7f8c8d; /* A subtle grey to match your UI */
}

/* Pushes the button to the right within the .actions flex container */
.btn-outline.btn-back {
    margin-left: auto;
}

.progress-info {
    font-size: 0.85em;
    margin-top: 8px;
    display: flex;
    gap: 10px;
    color: #555;
}

.progress-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot { height: 8px; width: 8px; border-radius: 50%; display: inline-block; }
.dot-done { background-color: #27ae60; }
.dot-review { background-color: #d35400; }
.dot-new { background-color: #95a5a6; }
 
.hidden-button {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content { max-width: 400px; text-align: center; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

#historySection.hidden {
    display: none;
}

.tooltip-wrapper {
    position: relative;
    display: inline-block;
    flex: 1; /* Keeps your flex layout intact */
}

/* The hidden tooltip box */
.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the button */
    left: 50%;
    margin-left: -100px; /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    line-height: 1.4;
    pointer-events: none; /* Prevents the tooltip from flickering if mouse moves over it */
}

/* Tooltip arrow */
.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

/* Show the tooltip on hover */
.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Ensure buttons take full width of their wrapper */
.tooltip-wrapper button {
    width: 100%;
}

@media (max-width: 600px) {
    .tooltip-text {
        position: static;
        visibility: visible;
        opacity: 1;
        width: 100%;
        margin: 5px 0 15px 0;
        background: none;
        color: #7f8c8d;
        font-size: 0.8em;
    }
    .tooltip-text::after {
        display: none; /* Hide arrow on mobile */
    }
}

.info-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #3498db;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
}

.info-toggle:hover {
    background: #f0f7ff;
}

.hidden-info {
    display: none !important;
}