/* VARIABLES */
:root {
    --bg-color: #0a0e17;
    --card-bg: #141a26;
    --primary-color: #3d8aff;
    --secondary-color: #7f5fff;
    --accent-color: #4effcb;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --glow-color: rgba(61, 138, 255, 0.4);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* BACKGROUND EFFECTS */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(61, 138, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 138, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: perspective(500px) rotateX(30deg);
    transform-origin: center bottom;
    opacity: 0.3;
}

.glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(61, 138, 255, 0.1) 0%,
        rgba(61, 138, 255, 0) 50%
    );
    opacity: 0.6;
    pointer-events: none;
}

/* LAYOUT */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

main {
    flex: 1;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background-color: var(--bg-color);
    border-radius: 5px;
    clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

.highlight {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* SEARCH */
.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(61, 138, 255, 0.2);
}

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

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 6px;
    background-color: var(--text-secondary);
    bottom: -4px;
    right: -2px;
    transform: rotate(45deg);
}

/* APPS GRID */
.apps-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.app-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3), 
                0 0 15px var(--glow-color);
}

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

.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.app-icon::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
}

.app-content {
    padding: 1.5rem;
}

.app-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
}

.app-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 50px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.app-button:hover {
    box-shadow: 0 0 15px var(--glow-color);
}

/* FOOTER */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-text {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .apps-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .apps-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .footer-text {
        flex-direction: column;
        gap: 0.5rem;
    }
}