:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.url-shortener {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.url-shortener:hover {
    transform: translateY(-5px);
}

.title {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    animation: fadeIn 0.5s ease;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

input[type="url"] {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

button:hover {
    background: #357abd;
    transform: scale(1.05);
}

.result {
    animation: slideUp 0.5s ease;
}

.short-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

#shortUrl {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8f9fa;
}

.copy-btn {
    padding: 15px;
    background: var(--success-color);
}

.copy-btn:hover {
    background: #219a52;
}

.stats {
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Loading Animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}