/* assets/css/style.css */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.7);
}

html, body {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.15s ease, color 0.15s ease; /* FAST THEME TOGGLE */
    margin: 0;
    padding: 0;
    padding-top: 76px; /* FIX: Prevents content from hiding behind the fixed navbar */
}

/* Glassmorphism Header */
.navbar-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed; /* FIX: Locks navbar to the top permanently */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Premium App Cards */
.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); /* FAST HOVER ANIMATION */
    will-change: transform, box-shadow; /* HARDWARE ACCELERATION FOR FAST LOADING & NO LAG */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
    color: var(--text-color);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20%;
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.app-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.badge-premium {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary);
    color: white;
    border-radius: 8px;
    border: none;
    padding: 8px 20px;
    font-weight: 500;
    transition: 0.15s ease-out; /* FAST BUTTON ANIMATION */
}
.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: scale(1.05);
}

/* Animations */
.skeleton {
    animation: skeleton-loading 0.1s linear infinite alternate; /* FAST SKELETON BLINK */
}
@keyframes skeleton-loading {
    0% { background-color: hsl(200, 20%, 80%); }
    100% { background-color: hsl(200, 20%, 95%); }
}


/* =========================================
   RESPONSIVE FIXES (MOBILE & DESKTOP FIXED)
   ========================================= */

/* Desktop Specific Fixes (Large Screens) */
@media (min-width: 992px) {
    .app-card {
        padding: 20px;
    }
    .app-icon {
        width: 90px;
        height: 90px;
    }
    .app-title {
        font-size: 1.15rem;
    }
}

/* Tablet & Mobile Layout Fixes */
@media (max-width: 768px) {
    .app-card {
        padding: 12px;
        border-radius: 12px;
    }
    .app-icon {
        width: 65px;
        height: 65px;
        margin-bottom: 8px;
        border-radius: 18%;
    }
    .app-title {
        font-size: 0.95rem;
    }
    .btn-primary-custom {
        padding: 6px 16px;
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile Devices (Fixes Grid Breaking) */
@media (max-width: 480px) {
    .app-card {
        padding: 10px;
    }
    .app-icon {
        width: 55px;
        height: 55px;
    }
    .app-title {
        font-size: 0.85rem;
    }
    /* Rating & Size font size fix for small mobiles */
    .app-card .badge, .app-card .small {
        font-size: 0.65rem !important;
    }
}