:root{
    --primary: #1e3a5f;    /* deep academic blue */
    --secondary: #f0f7f8; /* soft off-white */
    --accent: #3b82f6;     /* modern blue (CTA) */
    --text: #1f2933;       /* near-black */
    --muted: #6b7280;      /* secondary text */
    --border: #e5e7eb;
}

/* Global layout */
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--secondary);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h2, h3, h4 {
    margin-top: 10px;
    margin-bottom: 10px;
    color: var(--primary);
}

label {
    font-weight: 600;
    color: var(--text);
}


/* HEADER / NAVIGATION */

/* main wrapper for the header */
.head-wrapper{
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 150px;
    background-color: var(--primary);
}

.nav-bar{
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
}

/* work on the list float */
.nav-bar li{
    float: left;
}

/*organize the navbar items */
.nav-bar li a{
    display: block;
    color: var(--secondary);
    text-align: center;
    padding: 14px 12px;
    text-decoration: none;
}

.nav-bar li a:hover{
    background-color: var(--accent);
}

.logo-container{
    display: block;
}

#logo{
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.logo-holder span{
    margin-left: 40px; 
    margin-top: 0px;
    margin-bottom: 40px;
    color: var(--secondary);
}


/* MAIN CONTAINERS / SECTIONS */

/* container layout */
.main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
}

.reference-search,
.reference-holder {
    flex: 1;
    min-width: 420px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.05);
    
}

.reference-options{
    display: flex;
    list-style: none;
    gap: 10px;
    padding: 0;
    margin: 10px;
}

.reference-options li a{
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 10px;
    display: inline-block;
    font-weight: 600;
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--border);
}

.reference-options li a:hover{
    background-color: var(--accent);
}


/* FORMS / INPUTS */

/*    Input + Selects */
input, select {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: 0.2s ease;
}

input:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.searchQuery{
    width: 100%;
    max-width: 600px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 15px;
    box-sizing: border-box;
}

.metadata-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.form-group input,
.form-group select{
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

#authors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.authorInput {
    padding: 6px;
}

#addAuthor {
    margin-top: 8px;
    align-self: flex-start;
}

/* Citation Preview Box */
#citationPreview{
    margin-top: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f9fafb;
    font-size: 15px;

    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* Saved References Box */
#savedReferences{
    margin-top: 15px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    max-height: 420px;
    overflow-y: auto;
}

.saved-item{
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #f9fafb;
}

.saved-item:last-child{
    border-bottom: none;
}

.saved-item .saved-title{
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary);
}

.saved-item .saved-citation{
    font-size: 14px;
    color: var(--text);
    overflow-wrap: break-word;
}

/* Buttons inside saved items */
.saved-item button {
    margin-top: 10px;
    margin-right: 6px;
    padding: 7px 12px;
    font-size: 13px;
}

/* Copied item Status */
.copy-status{
    color: #16a34a;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
}


/* BUTTONS / ACTIONS */

/* All Buttons */
button {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s ease;
}

button:hover {
    background: var(--accent);
}

button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Manual Entry Button Styling */
#manualEntry {
    background: #0f766e; /* teal */
    margin-top: 10px;
}

#manualEntry:hover {
    background: #14b8a6;
}

/*  Action button rows */
.preview-actions,
.saved-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

/* Copy button should look different */
#copyCitation {
    background: #2563eb;
}

#copyCitation:hover {
    background: #3b82f6;
}

/* Save button highlight */
#saveCitation {
    background: #16a34a;
}

#saveCitation:hover {
    background: #22c55e;
}

/* Download button */
#downloadSaved {
    background: #7c3aed;
}

#downloadSaved:hover {
    background: #8b5cf6;
}

/* Clear button */
#clearSaved {
    background: #dc2626;
}

#clearSaved:hover {
    background: #ef4444;
}


/* About / Content Section */

.main-about-us{
    display: flex;
    flex-flow: row wrap;
    gap: 10px;
}

.intro,
.mission,
.purpose,
.users,
.differentiation,
.AI-help,
.future-promises,
.get-in-touch{
    width: 600px;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    margin: 10px;
    padding: 10px;
}

.generatedSources{
    width: 600px;
    height: auto;
    border: 2px solid var(--border);
    border-radius: 10px;
    margin-top: 20px;
}

.generatedSources h4{
    text-align: center;
    text-decoration: underline;
    margin-top: 5px;
}

.contact-area{
    margin: 0 auto;
}

.contact-us{
    width: 400px;
}

.contact-us label{
    font-weight: bold;
}

.contact-us input{
    width: 100%;
    border-radius: 5px;
    padding: 5px;
    margin: 5px;
}

.contact-us textarea{
    width: 100%;
    height: 200px;
    border-radius: 5px;
    padding: 5px;
    margin: 5px;
}

.contact-us button{
    width: 90px;
    height: 50px;
    border: 1px solid var(--border);
    text-align: center;
    border-radius: 10px;
    background-color: var(--primary);
    color: var(--secondary);
}

.contact-us button:hover{
    background-color:  var(--accent);
}

/* Results List UI */
.result-item {
    border-radius: 12px;
    background: #fff;
    transition: 0.2s ease;
}

.result-item:hover {
    background: #f3f4f6;
    border-color: var(--accent);
}


/* FOOTER */

.main-footer {
    background-color: var(--primary);
    color: var(--secondary);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 40px;
    margin-top: 50px;
}

.main-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-footer a {
    color: var(--secondary);
    text-decoration: none;
    display: inline-block;
    margin-top: 6px;
}

.main-footer a:hover {
    color: var(--accent);
}

.footer-nav-bar,
.socials{
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav-bar li,
.socials li{
    margin-bottom: 8px;
}

.footer-nav-bar a,
.social-media a{
    color: var(--secondary);
    text-decoration: none;
    font-size: 14px;
}

.footer-nav-bar a:hover,
.socials a:hover{
    color: var(--accent);
}


/* Responsiveness */
@media (max-width: 768px){
    .main-container{
        flex-direction: column;
    }

    .reference-search,
    .reference-holder{
        min-width: 100%;
    }

    .head-wrapper{
        height: auto;
    }

    .searchQuery{
        max-width: 100%;
    }
}

@media(max-width: 900px){
    .reference-search,
    .reference-holder {
        min-width: 100%;
    }
}