body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    background-color: #1e1e1e;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 2em;
}

.subtitle {
    color: #a0a0a0;
    margin-bottom: 30px;
    font-size: 1em;
}

.input-group {
    display: flex;
    margin-bottom: 25px;
    gap: 10px;
}

@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    #convert-button {
        width: 100%;
    }
}

#url-input {
    flex-grow: 1;
    padding: 15px;
    font-size: 1em;
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

#url-input:focus {
    border-color: #007bff; /* A neutral bright blue for focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#convert-button {
    padding: 15px 25px;
    font-size: 1em;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    font-family: inherit;
}

#convert-button:hover {
    background-color: #0056b3;
}

.spinner {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #007bff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#result-container {
    margin-top: 30px;
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
}

#result-container p:first-child {
    margin-top: 0;
    margin-bottom: 10px;
    color: #a0a0a0;
    font-size: 0.9em;
}

.result-line {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #333333;
    padding: 10px 15px;
    border-radius: 6px;
}

#result-url {
    color: #61dafb; /* A light teal/blue for links */
    text-decoration: none;
    word-break: break-all;
    flex-grow: 1;
}

#result-url:hover {
    text-decoration: underline;
}

.copy-button {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-button svg {
    stroke: #a0a0a0;
}

.copy-button:hover svg {
    stroke: #ffffff;
}

.copy-feedback {
    font-size: 0.85em;
    color: #28a745; /* Green for success feedback */
    margin-top: 10px;
    margin-bottom: 0;
    height: 1.2em; /* Reserve space to prevent layout shift */
}

.error-message {
    color: #dc3545; /* Red for errors */
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 25px;
    word-break: break-word;
}
