/* --- Global Styles and Colors --- */
:root {
    --color-blue: #5b9bd5; /* Background Blue (approximated from image) */
    --color-black: #000000;
    --color-yellow: #f8c800; /* McShort Yellow */
    --color-white: #ffffff;
    --font-stack: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--color-blue);
    font-family: var(--font-stack);
    height: 100vh;
    display: flex;
    flex-direction: column; /* Allows navbar and main content to stack */
    align-items: center;
}

/* --- Navigation Bar --- */
.navbar {
    width: 100%;
    display: flex;
    justify-content: center; /* Center the buttons */
    padding: 20px 0;
    position: absolute;
    top: 0;
    gap: 15px; /* Spacing between buttons */
}

.nav-button {
    background-color: var(--color-black);
    color: var(--color-white);
    text-decoration: none;
    padding: 6px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    border: 1px solid var(--color-black);
}

/* --- Main Content (Logo & Form) --- */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center content vertically in the available space */
    position: relative; 
    top: 35vh; /* Adjust as needed for vertical center, accounting for nav bar */
    width: 90%;
    max-width: 600px;
}

/* --- Logo Styling --- */
.logo {
    font-size: 80px;
    font-weight: 900;
    color: var(--color-black);
    margin-bottom: 50px;
    letter-spacing: -2px;
}

.logo-mc {
    color: var(--color-yellow);
    font-weight: 900;
}

/* --- Input Form --- */
#link-create-form {
    width: 100%;
    /* Note: We use the input's style to create the rounded bar look */
}

.link-input {
    width: 100%;
    padding: 20px 30px;
    border: none;
    border-radius: 50px; /* Highly rounded corners */
    background-color: var(--color-black);
    color: var(--color-white);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    /* Hide the default focus outline */
    outline: none; 
}

/* Custom placeholder styling to match image */
.link-input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* --- Message/Result Area (for success/error) --- */
.message {
    color: var(--color-black);
    font-weight: 600;
    margin-top: 15px;
    font-size: 18px;
}

/* Hide the result box until we have a link */
.hidden {
    display: none;
}

.result-box {
    margin-top: 20px;
    padding: 15px;
    background: var(--color-yellow);
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
}

/* --- Styles for Short Link Display --- */
.short-url-display {
    display: flex;
    flex-direction: column; /* Stack link, copy, and another button */
    align-items: center;
    gap: 15px; /* Space between elements */
    width: 100%;
    margin-top: 20px; /* Space below the hidden input */
}

#final-short-link {
    background-color: var(--color-black);
    color: var(--color-yellow); /* Make the link stand out */
    padding: 20px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-decoration: none; /* Remove underline */
    width: 100%;
    white-space: nowrap; /* Prevent URL from wrapping */
    overflow: hidden;    /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for long URLs */
}

.copy-button, .shorten-another-button {
    background-color: var(--color-yellow);
    color: var(--color-black);
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: fit-content; /* Adjust button width to content */
}

.copy-button:hover, .shorten-another-button:hover {
    background-color: darken(var(--color-yellow), 10%); /* Make it slightly darker on hover */
    opacity: 0.9;
}

/* --- Utility Class for Hiding --- */
.hidden {
    display: none !important;
}

/* --- Error/Success Messages --- */
.message.error {
    color: red;
}

.message.success {
    color: green; /* Or a light color against the blue background */
}