:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover-bg: rgba(255, 255, 255, 0.1);
    --card-hover-border: rgba(255, 255, 255, 0.2);
    --accent-color: #38bdf8;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    z-index: -1;
}

.background-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 50%);
    animation: rotate 60s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.header p {
    color: #94a3b8;
    font-size: 1.125rem;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: var(--text-color);
}

.app-card:hover::before {
    opacity: 1;
}

.app-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    /* Optional: add a subtle drop shadow for icons */
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.app-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #0ea5e9 100%);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.app-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-description {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 4rem;
    font-size: 1.125rem;
}

.error-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #ef4444;
    padding: 4rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 2rem 1rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }
}

.footer {
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.creator-name {
    font-weight: 600;
    color: var(--text-color);
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #0ea5e9;
    text-decoration: underline;
}