@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #fafafa;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --border: #e5e5e5;
    --accent: #0066ff;
    --accent-hover: #0052cc;
    --success: #00c853;
    --error: #ff3b30;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 540px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-card {
    width: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    color: var(--text);
    background: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.disclaimer {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 1rem;
}

input[type="url"] {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="url"]:hover {
    border-color: #d0d0d0;
    background: #ffffff;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    transform: translateY(-1px);
}

input[type="url"]::placeholder {
    color: #999;
}

button {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(135deg, var(--accent) 0%, #0052cc 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.result-card {
    margin-top: 2rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 16px;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.short-url {
    display: inline-block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    background: rgba(0, 102, 255, 0.05);
    border-radius: 8px;
}

.short-url:hover {
    color: var(--accent-hover);
    background: rgba(0, 102, 255, 0.1);
    transform: scale(1.02);
}

.copy-btn {
    margin-top: 1rem;
    width: auto;
    padding: 0.625rem 1.5rem;
    background: white;
    color: var(--accent);
    border: 2px solid var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: none;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.error-message {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border: 2px solid #ffcdd2;
    border-radius: 12px;
    color: var(--error);
    font-size: 0.875rem;
    text-align: center;
    font-weight: 500;
    animation: shake 0.4s ease-in-out;
}

.not-found-container {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-out;
}

.not-found-title {
    font-size: 8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e5e5e5 0%, #d0d0d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.not-found-text {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }

    .main-card {
        padding: 2.5rem 2rem;
    }

    .container {
        padding: 1.5rem;
    }

    .not-found-title {
        font-size: 5rem;
    }
}