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

/* Base Styles */
body {
    font-family: Georgia, 'Times New Roman', serif;
    background-color: #e6f2ff;
    color: #000;
    line-height: 1.6;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('bg.png');
    background-repeat: repeat;
    opacity: 0.03;
    filter: grayscale(100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 650px;
    margin: 0 auto;
}

/* Header */
#header-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0px;
}

.blurb {
    font-style: italic;
}

.blurb,
.caution {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1em;
}

.caution {
    font-weight: bold;
    margin-bottom: 15px;
}

.instructions {
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Questions */
ol {
    list-style-position: inside;
    margin: 10px 0;
}

.question {
    padding: 8px 0;
    line-height: 1.8;
}

.question input[type="checkbox"] {
    margin-right: 8px;
}

.question label {
    cursor: pointer;
}

/* Tooltips */
.tooltip {
    border-bottom: 1px dotted #666;
    text-decoration: none;
    cursor: help;
    position: relative;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 3px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85em;
    line-height: 1.4;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Reference Links */
.ref {
    text-decoration: none;
    color: #8b8b8b;
    font-size: 0.7em;
    vertical-align: super;
    font-weight: bold;
}

.ref:hover {
    color: #999;
}

/* Buttons */
#button-container {
    text-align: center;
    margin: 30px 0;
}

button {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1em;
    padding: 12px 24px;
    margin: 0 8px;
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background-color: #000;
    color: #fff;
}

/* References Section */
#references {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ccc;
    font-size: 0.85em;
}

#references h3 {
    font-size: 1em;
    font-weight: normal;
    margin-bottom: 15px;
    text-align: center;
}

.references-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
}

.ref-item {
    display: flex;
    gap: 8px;
}

.ref-num {
    font-weight: bold;
    flex-shrink: 0;
}

.ref-link {
    word-break: break-word;
}

.ref-link a {
    color: #000;
    text-decoration: none;
}

.ref-link a:hover {
    text-decoration: underline;
}

#author-link {
    text-decoration: none;
}
#rice-link {
    text-decoration: none;
}
#author-link:hover {
    text-decoration: underline;
}
#rice-link:hover {
    text-decoration: underline;
}
@media (max-width: 600px) {
    .references-grid {
        grid-template-columns: 1fr;
    }
}

/* Results */
#result-container {
    text-align: center;
    padding: 0;
}

#result-container #header-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0px;
}

#result-container .blurb,
#result-container .caution {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1em;
}

#result-container .blurb {
    font-style: italic;
}

#result-container .caution {
    font-weight: bold;
    margin-bottom: 20px;
}

.score-heading {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 15px;
    margin-top: 20px;
}

#score {
    font-size: 5em;
    font-weight: normal;
    margin-bottom: 15px;
    color: #ff0000;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.share-buttons button {
    font-size: 1.1em;
    padding: 15px 30px;
}

/* Mobile Button Adjustments */
@media (max-width: 767px) {
    button {
        font-size: 0.95em;
        padding: 10px 18px;
        margin: 0 4px;
    }
    
    #button-container {
        margin: 20px 0;
    }
    
    #button-container button {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .share-buttons {
        gap: 10px;
    }
    
    .share-buttons button {
        font-size: 1em;
        padding: 12px 20px;
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
    }
}

@media (min-width: 768px) {
    .share-buttons {
        flex-wrap: nowrap;
    }
}

.result-footer {
    margin-top: 30px;
    font-size: 1em;
    line-height: 1.8;
}

/* Checkbox Animation Overlay */
.checkbox-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: bold;
    color: #ff0000;
    pointer-events: none;
    z-index: 9999;
    animation: scaleAndFade 1.5s ease-out forwards;
}

.checkbox-overlay img {
    width: 200px;
    height: auto;
    display: block;
}

@keyframes scaleAndFade {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

