* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* TinyURL exact color palette */
    --primary-blue: #2c5282;
    --primary-blue-dark: #2a4a6b;
    --secondary-blue: #3182ce;
    --accent-green: #38a169;
    --accent-green-dark: #2f855a;
    --text-dark: #2d3748;
    --text-light: #718096;
    --text-muted: #a0aec0;
    --background-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Diagonal background pattern like TinyURL */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    background-size: 100px 100px;
    opacity: 0.1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

/* Main title - matches TinyURL style */
.main-title {
    color: white;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    width: 100%;
}

/* Main card - exactly like TinyURL */
.main-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    position: relative;
    width: 100%;
    text-align: center;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
}

.section-icon {
    font-size: 1.5rem;
}


/* Input styling */
.url-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1.1rem;
    transition: var(--transition);
    background: var(--background-white);
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.url-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Main button - exact TinyURL green */
.shorten-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
}

.shorten-btn:hover {
    background: var(--accent-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.3);
}

/* Message and result styles */
.message {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

.message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.result {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease-out;
    margin-bottom: 1rem;
}

.url-result {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.result-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
}

.copy-btn {
    padding: 0.875rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

.test-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-blue);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    gap: 0.5rem;
    font-family: inherit;
}

.test-link:hover {
    background: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

/* Body - remove fixed footer constraints */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    margin: 0 auto;
}

/* Footer - expanded page-bottom style */
.footer, footer {
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 5rem 2rem 3rem;
    margin-top: auto;
    position: relative;
    min-height: 300px;
}

.footer::before, footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" x="0" y="0" width="25" height="25" patternUnits="userSpaceOnUse"><circle cx="12" cy="12" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
    opacity: 0.8;
    pointer-events: none;
}

.footer-content, footer-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer p, footer p {
    text-align: center;
    margin: 0 0 4rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem 4rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, #87CEEB, #ffffff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-links a:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-links a:hover::after {
    width: 100%;
}

/* Copyright section */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 1rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .main-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .main-card {
        padding: 2rem 1.5rem;
    }
    
    .url-result {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer, footer {
        padding: 4rem 1rem 2rem;
        min-height: 250px;
    }
    
    .footer-links {
        gap: 2rem 3rem;
    }
    
    .footer-links a {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.5rem;
    }
    
    .main-card {
        padding: 1.5rem 1rem;
    }
    
    .url-input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .shorten-btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .footer, footer {
        padding: 3rem 0.75rem 2rem;
        min-height: 200px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .footer-links a {
        font-size: 0.95rem;
    }
    
    .footer p, footer p {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }
}

/* Focus and accessibility */
*:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.main-card *:focus {
    outline-color: var(--primary-blue);
}