/* Global Reset and Body Styling */
body {
    background-color: #0f172a; /* Sleek dark theme background */
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* Main Container Card Box */
.container {
    background-color: #1e293b;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 540px;
    text-align: center;
    border: 1px solid #334155;
}

/* Beautiful Title Text with Blue-to-Purple Gradient */
h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: #94a3b8;
    font-size: 16px;
    margin-bottom: 30px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: #94a3b8;
}

/* Input Form Controls */
.input-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #cbd5e1;
}

input {
    width: 100%;
    padding: 12px 16px;
    background-color: #0f172a;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #6366f1;
}

/* Glow Action Button styling */
button {
    width: 100%;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 10px;
}

button:hover {
    opacity: 0.95;
}

button:active {
    transform: scale(0.98);
}

/* Output Display Window Box */
.result-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #0f172a;
    border-radius: 8px;
    border: 1px dashed #475569;
    text-align: left;
    display: none; /* Controlled via JS toggles */
}

.result-box h3 {
    margin-top: 0;
    font-size: 16px;
    color: #38bdf8;
}

.short-url-display {
    font-size: 16px;
    font-weight: bold;
    color: #34d399;
    word-break: break-all;
}

/* Loader Animation Ring for 404 router page */
.loader {
    border: 4px solid #1e293b;
    border-top: 4px solid #38bdf8;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

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