/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 2rem 0;
    text-align: center;
    color: white;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Main content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Search */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}



/* Links container */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.link-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.link-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.link-url {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

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

.link-meta {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #888;
    flex-shrink: 0;
}



.link-clicks {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Loading state */
.loading {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    padding: 2rem;
}

.no-results {
    text-align: center;
    color: white;
    font-size: 1.1rem;
    padding: 2rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .main {
        padding: 1.5rem 0;
    }
    
    .links-container {
        gap: 0.75rem;
    }
    
    .link-card {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    

}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .search-input {
        padding: 0.875rem 2.5rem 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .search-icon {
        right: 1.25rem;
        font-size: 1rem;
    }
    
    .link-card {
        padding: 1rem;
    }
    
    .link-title {
        font-size: 1.1rem;
    }
    
    .link-meta {
        align-self: flex-end;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card {
    animation: fadeInUp 0.6s ease forwards;
}

.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }

/* Focus styles for accessibility */
.search-input:focus,
.link-card:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .link-card {
        background: rgba(30, 30, 30, 0.95);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .link-title {
        color: #fff;
    }
    
    .link-description {
        color: #ccc;
    }
    
    .link-meta {
        border-top-color: #444;
        color: #aaa;
    }
}

/* Utility classes for CSP compliance */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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