/* Material Design CSS - Чистый CSS без зависимостей */

:root {
    --primary-color: #000000;
    --primary-dark: #1a1a1a;
    --primary-light: #333333;
    --accent-color: #0066ff;
    --background: #ffffff;
    --surface: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --divider: #e5e5e5;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-3: 0 4px 8px rgba(0, 0, 0, 0.08);
    --border-radius: 6px;
    --transition: all 0.2s ease;
    --spacing-unit: 0.5rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
}

/* Header */
.header {
    background-color: var(--surface);
    color: var(--text-primary);
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--divider);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.03em;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.7;
}

.nav {
    display: none;
}


/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-form-inline {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input-inline {
    width: 0;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    outline: none;
    opacity: 0;
    pointer-events: none;
}

.header-search .search-input-inline {
    color: rgba(0, 0, 0, 0.87);
}

.header-search .search-form-inline.active .search-input-inline::placeholder {
    color: var(--text-secondary);
}


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

.search-form-inline.active .search-input-inline {
    width: 320px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border-bottom-color: transparent;
    opacity: 1;
    pointer-events: auto;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid var(--divider);
    box-shadow: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
}


.search-form-inline.active .search-input-inline:focus {
    border-color: var(--primary-color);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    outline: none;
}

.search-button {
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-left: 0.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.search-button:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.header-search .search-button {
    position: absolute;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    background: transparent;
    padding: 0.25rem;
    width: 28px;
    height: 28px;
}

.header-search .search-form-inline.active .search-button {
    color: var(--text-secondary);
}

.header-search .search-form-inline.active .search-button:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    color: var(--text-primary);
}


.search-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-button:active {
    transform: scale(0.95);
}

.search-button svg {
    width: 20px;
    height: 20px;
}

.header-search .search-button svg {
    width: 18px;
    height: 18px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    flex-shrink: 0;
}

.lang-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background-color: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 44px;
    justify-content: center;
}

.lang-link:hover {
    background-color: #f8f8f8;
    color: var(--text-primary);
}

.lang-link.active {
    background-color: var(--text-primary);
    color: var(--surface);
    border-color: var(--text-primary);
}

.lang-flag {
    font-size: 1.125rem;
    line-height: 1;
}

.lang-code {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Mobile menu toggle - скрыт, так как навигация не используется */
.menu-toggle {
    display: none;
}

.menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.page-header h1 {
    margin-bottom: 0;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.page-content {
    margin-top: 0;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .page-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }
    
    .category-filter {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1.25rem;
    }
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 2rem;
    box-shadow: none;
}

.card:hover {
    border-color: #d0d0d0;
    box-shadow: var(--shadow-1);
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--divider);
}

.card-header h2 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
}

.card-body {
    padding: 2.5rem 3rem;
}

.card-body h1 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.card-body h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-body h2:first-of-type {
    margin-top: 1.5rem;
}

.card-body p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.card-body p:last-child {
    margin-bottom: 0;
}

.card-body ul {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.card-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.card-body em {
    color: var(--text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem 1.5rem;
    }
    
    .card-body h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .card-body h2 {
        margin-top: 1.5rem;
        margin-bottom: 0.625rem;
        font-size: 1.125rem;
    }
    
    .card-body h2:first-of-type {
        margin-top: 1.25rem;
    }
    
    .card-body p {
        margin-bottom: 0.875rem;
    }
    
    .card-body ul {
        margin: 0.875rem 0 1.25rem;
        padding-left: 1.25rem;
    }
    
    .card-body li {
        margin-bottom: 0.375rem;
    }
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--divider);
    background-color: #fafafa;
}

/* App Cards Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 2rem;
}

.app-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: none;
}

.app-card:hover {
    border-color: #d0d0d0;
    box-shadow: var(--shadow-1);
    transform: translateY(-2px);
}

.app-card-icon {
    width: 100%;
    height: 120px;
    object-fit: contain;
    padding: 0.75rem;
    display: block;
    box-sizing: border-box;
    background: transparent;
    flex-shrink: 0;
}

.app-card-content {
    padding: 0.625rem 0.75rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.app-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    gap: 0.5rem;
}

.app-card-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #000000;
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-verified-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.app-card-verified-text {
    display: inline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--text-primary);
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: none;
    line-height: 1.5;
    background: transparent;
    color: var(--text-primary);
}

.btn:hover {
    background-color: var(--text-primary);
    color: var(--surface);
    transform: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--surface);
    border-color: var(--text-primary);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--surface);
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-secondary:hover {
    background-color: #616161;
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control,
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--divider);
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    transition: var(--transition);
    background-color: var(--surface);
    color: var(--text-primary);
    font-family: inherit;
    line-height: 1.5;
    box-shadow: none;
}

.form-control:focus,
.search-input:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-control:hover,
.search-input:hover {
    border-color: #d0d0d0;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select.form-control:hover {
    border-color: #d0d0d0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* App Detail Page */
.app-detail-header {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    padding: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: flex-start;
    box-shadow: none;
}

.app-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
}

.app-detail-info {
    flex: 1;
    min-width: 250px;
}

.app-detail-title {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.app-detail-meta {
    color: var(--text-secondary);
    margin: 0.75rem 0;
    font-size: 0.9375rem;
}

.app-detail-meta p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.app-security-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-primary);
}

.app-security-verified .verified-icon-inline {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.screenshot-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

/* Галерея (Lightbox) */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gallery-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
    z-index: 10000;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-close:hover {
    opacity: 0.7;
}

.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    transition: opacity 0.2s ease;
    user-select: none;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-prev:hover,
.gallery-next:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.5);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.app-description {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    padding: 2.5rem;
    margin: 3rem 0;
    line-height: 1.75;
    box-shadow: none;
}

.app-description h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.app-description p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.app-description p:last-child {
    margin-bottom: 0;
}

/* Admin Panel */
.admin-sidebar {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: none;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 0.5rem;
}

.admin-sidebar a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background-color: var(--text-primary);
    color: var(--surface);
}

.admin-content {
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid var(--divider);
    box-shadow: none;
    padding: 2rem;
}

/* Admin layout container */
.admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* Admin mobile menu toggle */
.admin-menu-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin-bottom: 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.admin-menu-toggle:hover {
    background-color: var(--primary-dark);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--divider);
    vertical-align: middle;
}

.table td img {
    display: inline-block;
    vertical-align: middle;
    max-width: 50px;
    max-height: 50px;
    object-fit: cover;
}

.table th {
    background-color: transparent;
    font-weight: 600;
    border-bottom: 1px solid var(--divider);
    color: var(--text-primary);
}

.table tr:hover {
    background-color: #fafafa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Table responsive wrapper */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid var(--primary-color);
}

/* Category Filter */
.category-filter {
    margin: 0 0 1.5rem;
}

.category-filter-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-select {
    min-width: 220px;
    max-width: 300px;
    border: 1px solid var(--divider);
    background: var(--surface);
}

.category-select:hover {
    border-color: #d0d0d0;
}

.category-select:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Search input использует те же стили, что и form-control */

/* Footer */
.footer {
    background-color: #fafafa;
    color: var(--text-secondary);
    padding: 4rem 0 3rem;
    margin-top: 5rem;
    border-top: 1px solid var(--divider);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-about {
    order: 1;
}

.footer-links {
    order: 2;
}

.footer h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: nowrap;
        padding: 0 1rem;
        gap: 1rem;
        overflow: hidden;
    }
    
    .logo {
        flex-shrink: 0;
        font-size: 1.25rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        order: 1;
    }
    
    .footer-about {
        order: 2;
    }
    
    .app-card-badge {
        background: transparent;
        color: var(--text-primary);
        padding: 0;
        margin-top: 0.5rem;
        font-size: 0.75rem;
        font-weight: 500;
        white-space: nowrap;
        width: fit-content;
        gap: 0.375rem;
    }
    
    .app-card-verified-icon {
        width: 16px;
        height: 16px;
    }
    
    .app-card-verified-text {
        color: var(--text-secondary);
    }
    
    .header-right {
        gap: 0.75rem;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .header-search .search-form-inline.active .search-input-inline {
        width: 220px;
        max-width: calc(100vw - 200px);
        padding: 0.5rem 2.25rem 0.5rem 0.875rem;
        border-radius: 6px;
        border: 1px solid var(--divider);
        background: #f8f8f8;
        box-shadow: none;
        color: var(--text-primary);
        font-size: 0.875rem;
    }
    
    .header-search .search-form-inline.active .search-input-inline::placeholder {
        color: var(--text-secondary);
    }
    
    .header-search .search-form-inline.active .search-button {
        color: var(--text-secondary);
    }
    
    .header-search .search-form-inline.active .search-button:hover {
        color: var(--text-primary);
    }
    
    .language-switcher {
        gap: 0.25rem;
    }
    
    .lang-link {
        padding: 0.3125rem 0.5rem;
        font-size: 0.6875rem;
    }
    
    .lang-flag {
        font-size: 0.875rem;
    }
    
    .lang-code {
        font-size: 0.625rem;
    }
    
    .language-switcher {
        gap: 0.25rem;
    }
    
    .lang-link {
        padding: 0.3125rem 0.5rem;
        font-size: 0.6875rem;
    }
    
    .lang-flag {
        font-size: 0.875rem;
    }
    
    .lang-code {
        font-size: 0.625rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .app-card {
        flex-direction: row;
        height: auto;
        align-items: center;
    }
    
    .app-card-icon {
        width: 80px;
        height: 80px;
        min-width: 80px;
        padding: 0.5rem;
        flex-shrink: 0;
    }
    
    .app-card-content {
        padding: 0.75rem;
        flex: 1;
        min-width: 0;
    }
    
    .app-card-title {
        font-size: 0.9375rem;
        margin-bottom: 0.375rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .app-card-meta {
        font-size: 0.75rem;
        margin-top: 0.375rem;
    }
    
    .app-card-badge {
        margin-top: 0.5rem;
        white-space: nowrap;
        width: fit-content;
    }
    
    .search-box form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input,
    .form-control {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .app-detail-header {
        flex-direction: column;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        gap: 1.5rem;
    }
    
    .app-detail-icon {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .app-detail-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .app-detail-meta {
        margin: 0.5rem 0;
    }
    
    .app-detail-meta p {
        margin: 0.375rem 0;
        font-size: 0.875rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .card-header {
        padding: 1rem 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .gallery-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
        width: 30px;
        height: 30px;
    }
    
    .gallery-prev,
    .gallery-next {
        font-size: 24px;
        width: 40px;
        height: 40px;
        padding: 12px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-image {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .gallery-caption {
        bottom: 15px;
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .app-description {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .app-description h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .app-description p {
        margin-bottom: 0.75rem;
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    /* Admin Panel Mobile */
    .admin-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-menu-toggle {
        display: block;
        width: 100%;
    }
    
    .admin-sidebar {
        display: none;
        margin-bottom: 1rem;
    }
    
    .admin-sidebar.active {
        display: block;
    }
    
    .admin-content {
        padding: 1.5rem;
    }
    
    /* For tablets and small desktops, keep table but make it scrollable */
    .admin-content .table {
        display: table;
        width: 100%;
        border-collapse: collapse;
    }
    
    .admin-content .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Admin tables mobile - only for very small screens */
@media (max-width: 600px) {
    .admin-content .table {
        display: block;
        overflow-x: visible;
        border-collapse: separate;
    }
    
    .admin-content .table thead,
    .admin-content .table tbody,
    .admin-content .table tr {
        display: block;
    }
    
    .admin-content .table thead {
        display: none;
    }
    
    .admin-content .table tr {
        border: 1px solid var(--divider);
        border-radius: var(--border-radius);
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: var(--surface);
        box-shadow: none;
    }
    
    .admin-content .table td {
        display: block;
        text-align: right;
        padding: 0.75rem 0;
        border: none !important;
        border-bottom: 1px solid var(--divider) !important;
        overflow: hidden;
        clear: both;
        min-height: 2.5rem;
    }
    
    .admin-content .table td:last-child {
        border-bottom: none !important;
        padding-top: 0.75rem;
    }
    
    .admin-content .table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 500;
        color: var(--text-secondary);
    }
    
    .admin-content .table td img {
        display: inline-block;
        vertical-align: middle;
        margin-left: 0.5rem;
        max-width: 50px;
        max-height: 50px;
        float: right;
        clear: right;
        margin-bottom: 0.25rem;
    }
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .app-card {
        flex-direction: row;
        height: auto;
        align-items: center;
    }
    
    .app-card-icon {
        width: 70px;
        height: 70px;
        min-width: 70px;
        padding: 0.5rem;
        flex-shrink: 0;
    }
    
    .app-card-content {
        padding: 0.625rem;
        flex: 1;
        min-width: 0;
    }
    
    .app-card-title {
        font-size: 0.875rem;
        margin-bottom: 0.3125rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .app-card-meta {
        font-size: 0.6875rem;
        margin-top: 0.3125rem;
    }
    
    .app-card-badge {
        background: transparent;
        color: var(--text-primary);
        padding: 0;
        margin-top: 0.5rem;
        font-size: 0.75rem;
        font-weight: 500;
        white-space: nowrap;
        width: fit-content;
        gap: 0.375rem;
    }
    
    .app-card-verified-icon {
        width: 16px;
        height: 16px;
    }
    
    .app-card-verified-text {
        color: var(--text-secondary);
    }
    
    .container {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Admin Panel Small Mobile */
    .admin-content {
        padding: 1rem;
    }
    
    .admin-sidebar {
        padding: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .admin-content .table td {
        font-size: 0.875rem;
    }
    
    .admin-content .table td:before {
        font-size: 0.75rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

