/* Base Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #F8F9FA;
    color: #1A1A1A;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Ambient background */
.ambient-blob {
    position: fixed;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.05) 0%, rgba(255, 255, 255, 0) 60%);
    border-radius: 50%;
    top: -30vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}

/* Top Navigation */
.top-nav {
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    color: #1A1A1A;
    letter-spacing: -0.5px;
}

.nav-logo span { color: #FF6B00; }

.nav-back {
    font-size: 0.9rem;
    color: #555555;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-back:hover { color: #FF6B00; }

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 60px 20px;
    z-index: 1;
}

/* Hero & Search Section */
.repo-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 50; 
    animation: fadeInDown 0.6s ease forwards;
}

.repo-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.repo-header p {
    color: #777777;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Search Bar Wrapper */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    border: 2px solid #EAEAEA;
    border-radius: 16px;
    background-color: #FFFFFF;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.search-input:focus {
    border-color: #FF6B00;
    box-shadow: 0 8px 24px rgba(255,107,0,0.1);
}

/* Auto-suggest Dropdown */
.suggestions-box {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #EAEAEA;
    margin-top: 8px;
    list-style: none;
    overflow: hidden;
    display: none; 
    z-index: 60; 
}

.suggestions-box li {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
    text-align: left;
}

.suggestions-box li:last-child { border-bottom: none; }
.suggestions-box li:hover { background: #F8F9FA; color: #FF6B00; }
.suggest-name { font-weight: 600; }
.suggest-os { font-size: 0.75rem; color: #888; background: #F0F0F0; padding: 2px 8px; border-radius: 10px; }

/* Category Filters */
.filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease forwards;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #DDDDDD;
    background: #FFFFFF;
    color: #555555;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover { border-color: #FF6B00; color: #FF6B00; }
.filter-btn.active { background: #FF6B00; color: #FFFFFF; border-color: #FF6B00; }

/* Software Grid */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    animation: fadeInUp 0.8s ease forwards;
}

/* Software Card */
.app-card {
    background-color: #FFFFFF;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 8px 24px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
    border-color: #FF6B00;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #1A1A1A;
}

.app-version {
    font-size: 0.8rem;
    color: #888888;
    font-family: monospace;
    background: #F0F0F0;
    padding: 4px 8px;
    border-radius: 6px;
}

.app-desc {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
    flex: 1;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #F0F0F0;
    padding-top: 20px;
}

.os-tags { display: flex; gap: 8px; }

.os-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
}

.os-windows { background: rgba(0, 120, 215, 0.1); color: #0078D7; }
.os-android { background: rgba(61, 220, 132, 0.1); color: #2E8B57; }

/* Visual button inside anchor tag */
.btn-visual {
    background-color: #1A1A1A;
    color: #FFFFFF;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.app-card:hover .btn-visual { 
    background-color: #FF6B00; 
}

/* No Results State */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #888;
    display: none;
}

/* Footer */
.site-footer {
    width: 100%;
    padding: 32px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888888;
    font-size: 0.95rem;
    margin-top: auto;
    z-index: 1;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .repo-header h1 { font-size: 2.2rem; }
    .software-grid { grid-template-columns: 1fr; }
    .top-nav { padding: 16px 20px; }
}