:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --icon-bg-1: linear-gradient(135deg, #ff2a5f, #ff7e5f);
    --icon-bg-2: linear-gradient(135deg, #00d2ff, #3a7bd5);
    --icon-bg-3: linear-gradient(135deg, #11998e, #38ef7d);
    --icon-bg-4: linear-gradient(135deg, #8e2de2, #4a00e0);
    --icon-bg-5: linear-gradient(135deg, #f7971e, #ffd200);
    --badge-hot: #ff2a5f;
    --badge-active: #00d2ff;
    --badge-neglected: #4a4a4a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    padding: 40px 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Launcher Grid */
.launcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 30px 20px;
    width: 100%;
    max-width: 1200px;
    justify-content: center;
}

/* App Item */
.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease;
    position: relative;
}

.app-item:hover {
    transform: scale(1.05);
}

/* Premium Tooltip */
.app-tooltip {
    position: absolute;
    bottom: -35px;
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px);
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.15);
}

.app-item:hover .app-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Icon Wrapper for Positioning Badges */
.app-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
}

/* The Square App Icon */
.app-icon {
    width: 100%;
    height: 100%;
    border-radius: 18px; /* iOS style squircle */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Different color variations */
.app-item[data-color="1"] .app-icon { background: var(--icon-bg-1); }
.app-item[data-color="2"] .app-icon { background: var(--icon-bg-2); }
.app-item[data-color="3"] .app-icon { background: var(--icon-bg-3); }
.app-item[data-color="4"] .app-icon { background: var(--icon-bg-4); }
.app-item[data-color="5"] .app-icon { background: var(--icon-bg-5); }

/* Notification Badge (Commits) */
.notification-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    border: 2px solid var(--bg-color);
    z-index: 10;
}

.badge-hot { background-color: var(--badge-hot); }
.badge-active { background-color: var(--badge-active); color: #000; }
.badge-neglected { background-color: var(--badge-neglected); }

/* Dim neglected icons */
.app-item.is-neglected .app-icon {
    filter: grayscale(80%) opacity(0.6);
}
.app-item.is-neglected:hover .app-icon {
    filter: grayscale(0%) opacity(1);
}

/* App Name Text */
.app-name {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
