/* Поддержка маленьких экранов (240x320) */
@media (max-width: 320px) {
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    .navbar-brand {
        font-size: 1rem;
    }
    .nav-link {
        padding: 0.3rem 0.5rem;
    }
}

/* Карточки программ */
.app-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: .25rem;
    padding: 10px;
    margin-bottom: 1rem;
}

.app-card .screenshot-container {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.app-card .screenshot-container img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.app-card .app-title {
    margin-bottom: 10px;
}

.app-card .app-description {
    flex-grow: 1;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Навигация */
.breadcrumb {
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 320px) {
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
}

/* Terms pages (categories, platforms) */
.term-card {
    transition: transform 0.2s ease-in-out;
}

.term-card:hover {
    transform: translateY(-2px);
}

.term-count {
    font-size: 2rem;
    font-weight: 300;
    color: #6c757d;
}

/* Footer customization */
.footer {
    border-top: 1px solid var(--bs-border-color);
    margin-top: 5rem;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .footer {
    background-color: var(--bs-dark-bg-subtle);
}

/* Single app page */
.app-screenshot {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

@media (max-width: 320px) {
    .app-screenshot {
        box-shadow: none;
    }
}

/* Dark mode customizations */
[data-bs-theme="dark"] .app-screenshot {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

/* Theme toggle button */
.btn-outline-secondary .bi-moon-stars {
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: middle;
}

[data-bs-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* General spacing utilities */
@media (max-width: 320px) {
    .mb-sm-2 {
        margin-bottom: 0.5rem !important;
    }
    .py-sm-2 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
}
