:root {
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7c3aed;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--purple-50) 0%, var(--white) 50%, var(--purple-100) 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.logo h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--gray-500);
    font-size: 1.125rem;
}

.highlight {
    color: var(--purple-600);
    font-weight: 600;
}

.shorten-section {
    margin-bottom: 2rem;
}

.shorten-form {
    width: 100%;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--purple-100);
    transition: all 0.2s ease;
}

.input-group:focus-within {
    border-color: var(--purple-300);
    box-shadow: var(--shadow-xl), 0 0 0 4px var(--purple-100);
}

.url-input {
    flex: 1;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    background: transparent;
    color: var(--gray-800);
    outline: none;
    font-family: inherit;
}

.url-input::placeholder {
    color: var(--gray-400);
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
    color: var(--white);
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.submit-btn:active {
    transform: translateY(0);
}

.message {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.message-icon {
    font-size: 1.25rem;
}

.result {
    margin-top: 1.5rem;
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--purple-200);
}

.result-header {
    margin-bottom: 1rem;
}

.mood {
    display: inline-block;
    background: linear-gradient(135deg, var(--purple-100), var(--purple-200));
    color: var(--purple-700);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.result-url {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.result-input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--purple-50);
    border: 2px solid var(--purple-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Space Grotesk', monospace;
    color: var(--purple-700);
    font-weight: 500;
}

.copy-btn {
    padding: 0.875rem 1rem;
    background: var(--purple-100);
    border: 2px solid var(--purple-200);
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--purple-600);
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--purple-200);
    color: var(--purple-700);
}

.result-actions {
    text-align: center;
}

.stats-link {
    color: var(--purple-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.stats-link:hover {
    text-decoration: underline;
}

.stats-section {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--purple-100);
}

.stats-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--gray-700);
}

.slug-name {
    font-family: 'Space Grotesk', monospace;
    color: var(--purple-600);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--purple-50), var(--purple-100));
    padding: 1.25rem;
    border-radius: 0.75rem;
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--purple-700);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.original-url {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    word-break: break-all;
}

.original-url a {
    color: var(--purple-600);
    text-decoration: none;
}

.original-url a:hover {
    text-decoration: underline;
}

.overview-section {
    margin-bottom: 2rem;
}

.overview-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--purple-100);
}

.overview-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overview-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--purple-600);
}

.overview-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.overview-divider {
    width: 1px;
    height: 3rem;
    background: var(--purple-200);
}

.recent-section {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--purple-100);
}

.recent-section h3 {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.recent-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    transition: background 0.2s ease;
}

.recent-link:hover {
    background: var(--purple-50);
}

.recent-slug {
    flex: 1;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    color: var(--purple-600);
}

.recent-clicks {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.recent-stats-btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: var(--purple-100);
    color: var(--purple-700);
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.recent-stats-btn:hover {
    background: var(--purple-200);
}

.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.heart {
    color: var(--purple-500);
}

@media (max-width: 640px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .submit-btn {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .overview-divider {
        width: 3rem;
        height: 1px;
    }
}
