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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f8f9fa; /* Light gray background, Google-like */
    color: #3c4043; /* Dark gray text */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align container to the top */
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: #ffffff; /* White card background */
    padding: 30px 40px;
    border-radius: 12px; /* Softer corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    max-width: 700px;
    width: 100%;
    text-align: center;
}

/* Header */
header h1 {
    font-size: 2.2em;
    font-weight: 700;
    color: #1a73e8; /* Google Blue */
    margin-bottom: 10px;
}

header p {
    font-size: 1em;
    color: #5f6368; /* Medium gray text */
    margin-bottom: 30px;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Space between elements */
}

.input-section label {
    font-weight: 500;
    font-size: 1.1em;
    color: #3c4043;
}

#nameInput {
    width: 100%;
    max-width: 400px; /* Limit input width */
    padding: 12px 15px;
    font-size: 1em;
    border: 1px solid #dadce0; /* Google-style input border */
    border-radius: 8px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#nameInput:focus {
    outline: none;
    border-color: #1a73e8; /* Blue focus border */
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2); /* Subtle focus glow */
}

#generateBtn {
    background-color: #1a73e8; /* Google Blue */
    color: white;
    font-size: 1.1em;
    font-weight: 500;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#generateBtn:hover {
    background-color: #1765cc; /* Darker blue on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#generateBtn:active {
    background-color: #145ab3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Results Section */
.results-section {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0; /* Separator line */
    padding-top: 30px;
}

.results-section .placeholder-text {
    color: #9aa0a6; /* Lighter gray for placeholder */
    font-style: italic;
}

.result-item {
    background-color: #f1f3f4; /* Very light gray background for each item */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.result-item:hover {
    background-color: #e8eaed; /* Slightly darker on hover */
}

.result-text {
    font-size: 1.2em; /* Make styled names slightly larger */
    color: #202124; /* Darker text for readability */
    flex-grow: 1; /* Allow text to take available space */
    margin-right: 15px;
    text-align: left; /* Align text left within the item */
    word-break: break-all; /* Prevent long names from overflowing badly */
    overflow-wrap: break-word;
}

.copy-btn {
    background-color: #4caf50; /* Green for copy */
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.3s ease;
    white-space: nowrap; /* Prevent button text wrapping */
}

.copy-btn:hover {
    background-color: #45a049;
}

.copy-btn.copied {
    background-color: #ff9800; /* Orange when copied */
    opacity: 0.8;
    cursor: default;
}

/* Footer */
footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

footer p {
    font-size: 0.9em;
    color: #5f6368;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    #nameInput {
        max-width: 100%;
    }

    .result-item {
        flex-direction: column;
        align-items: stretch; /* Stretch items full width */
    }

    .result-text {
        margin-right: 0;
        margin-bottom: 10px; /* Space between text and button */
        text-align: center;
    }

    .copy-btn {
        align-self: center; /* Center the button */
        width: 120px; /* Give button a fixed width */
    }
}