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

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    background-color: var(--bg-color);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

p {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
    animation: fadeIn 1s ease-out;
}

/* Hero Section */
.hero {
    padding: 6rem 2rem 8rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUp 0.8s ease-out;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    animation: slideUp 1s ease-out;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: -4rem auto 4rem;
    position: relative;
    z-index: 10;
    padding: 0 1.5rem;
    animation: scaleIn 1s ease-out;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--primary);
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    color: white;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* App Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

/* App Card */
.app-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    z-index: 0;
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(99, 102, 241, 0.2);
}

.app-card > * {
    position: relative;
    z-index: 1;
}

.app-logo-wrapper {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-color));
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.app-card:hover .app-logo {
    transform: scale(1.1);
}

.app-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.app-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: white;
}

.app-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.star-icon { color: #fbbf24; }
.shield-icon { color: #34d399; }

.app-actions {
    flex-shrink: 0;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-download::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.4s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-download:hover::after {
    left: 100%;
}

.btn-disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    grid-column: 1 / -1;
    display: none;
    animation: fadeIn 0.5s ease;
}

.empty-state.active {
    display: block;
}

.empty-state i {
    font-size: 5rem;
    color: var(--bg-secondary);
    margin-bottom: 1.5rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 1.5rem;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 1.5rem auto 0;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Cookie Banner for Compliance */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    z-index: 1050;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1;
}

.cookie-icon {
    font-size: 1.5rem;
    color: var(--secondary);
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.cookie-actions {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.btn-cookie {
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cookie-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.btn-cookie-outline:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.btn-cookie-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.btn-cookie-primary:hover {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero { padding: 4rem 1rem 6rem; }
    
    .app-card {
        padding: 1.25rem;
    }
    
    .app-logo-wrapper {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }
    
    .app-name { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .app-grid { grid-template-columns: 1fr; }
    .search-container { margin: -3rem auto 3rem; }
    .app-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .app-info { align-items: center; }
    .app-actions { width: 100%; }
    .btn-download { width: 100%; justify-content: center; }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 1.2rem;
    }
    .cookie-content {
        flex-direction: column;
    }
    .cookie-actions {
        width: 100%;
        justify-content: stretch;
    }
    .btn-cookie {
        flex: 1;
    }
}
