body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #E0F0FF;
    /* Light Piplup blue background */
    color: #2A466A;
    /* Darker Piplup blue text */
}

/* Go Back Icon */
.go-back-icon {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #386797;
    /* Piplup dark blue for consistency */
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 1000;
    /* Ensure it's on top */
}

.go-back-icon:hover {
    background-color: #2A466A;
    /* Darker shade on hover */
    transform: translateY(-1px);
}


header {
    background-color: #70A7D8;
    /* Piplup light blue */
    color: white;
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* To contain the image if it's larger */
    height: 250px;
    /* Adjust as needed */
}

#header-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover the area, might crop */
    object-position: center 30%;
    /* Try to focus on Piplup's upper body */
    opacity: 0.8;
}

header h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    width: 90%;
}

main {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #B0D0EF;
    /* Lighter border */
    border-radius: 8px;
    background-color: #F0F8FF;
    /* Very light blue section background */
}

h2 {
    color: #386797;
    /* Piplup dark blue */
    border-bottom: 2px solid #FAD44F;
    /* Piplup yellow accent */
    padding-bottom: 10px;
    margin-top: 0;
}

h3 {
    color: #386797;
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2A466A;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="date"],
select,
textarea {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #70A7D8;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
}

input[type="radio"]+label,
input[type="checkbox"]+label {
    display: inline-block;
    font-weight: normal;
    margin-bottom: 0;
}


.form-fields>div {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px dashed #B0D0EF;
    border-radius: 4px;
}

#medium-options>div,
#online-specific-fields>div,
#book-chapter-fields>div,
#no-author-webpage-option,
#common-fields>div,
#specific-fields>div {
    border: none;
    padding: 0;
}

#medium-options,
#online-specific-fields,
#book-chapter-fields,
#no-author-webpage-option {
    border: 1px dashed #B0D0EF;
    padding: 15px;
    margin-bottom: 15px;
}


#medium-options label,
#online-specific-fields label,
#no-author-webpage-option label {
    margin-right: 15px;
    display: inline-block;
}


button#generate-btn {
    /* Specific ID for generate button */
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #FAD44F;
    color: #386797;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button#generate-btn:hover {
    background-color: #e9c440;
}

.citation-output-container {
    background-color: #E6F3FF;
    padding: 15px;
    border-left: 5px solid #70A7D8;
    margin-bottom: 15px;
    border-radius: 0 5px 5px 0;
}

.citation-wrapper {
    display: flex;
    align-items: flex-start;
    /* Align items to the top */
    gap: 10px;
    /* Space between text and button */
}

.citation-text {
    flex-grow: 1;
    /* Text takes available space */
    font-family: 'Courier New', Courier, monospace;
    background-color: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    min-height: 40px;
    /* Ensure some height even if empty */
}

.copy-btn {
    padding: 8px 12px;
    background-color: #386797;
    /* Piplup dark blue */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    /* Prevent button from shrinking */
}

.copy-btn:hover {
    background-color: #2A466A;
    /* Darker shade */
}

.copy-btn.copied {
    background-color: #28a745;
    /* Green for success */
    color: white;
}


.citation-output-container small {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #555;
}

.disclaimer {
    font-size: 0.9em;
    color: #444;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 10px;
    border-radius: 4px;
    margin-top: 20px;
}

#guide-section ul {
    list-style-type: disc;
    margin-left: 25px;
    padding-left: 0;
}

#guide-section li {
    margin-bottom: 12px;
}

#guide-section pre {
    background-color: #f4f4f4;
    padding: 12px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #ddd;
    font-size: 0.95em;
}

#guide-section a {
    color: #0056b3;
    text-decoration: underline;
}

#guide-section a:hover {
    color: #003d80;
}


footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background-color: #386797;
    color: #E0F0FF;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .go-back-icon {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.9em;
    }

    header h1 {
        font-size: 1.8em;
    }

    main {
        margin: 10px;
        margin-top: 60px;
        padding: 15px;
    }

    .citation-wrapper {
        flex-direction: column;
        /* Stack text and button on small screens */
        align-items: stretch;
        /* Make button full width below text */
    }

    .copy-btn {
        margin-top: 5px;
        /* Add some space when stacked */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }

    #header-image {
        object-position: 40% 30%;
    }

    label {
        font-size: 0.95em;
    }

    input[type="text"],
    input[type="number"],
    input[type="url"],
    input[type="date"],
    select,
    textarea {
        font-size: 0.95em;
    }
}