/*
Theme Name: OnMe APK
Theme URI: 
Author: OnMe Team
Author URI: 
Description: 
Version: 1.0.2
Text Domain: onme-apk
Tags: mobile-first, flat-design, responsive, apk-download
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --border-color: #E5E7EB;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --bg-glass: rgba(255, 255, 255, 0.4);
    --bg-glass-strong: rgba(255, 255, 255, 0.6);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-glass: 0 4px 16px rgba(0, 0, 0, 0.06);
    --border-radius: 16px;
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #f5f7fa 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1976D2;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container - Mobile Optimized */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

@media screen and (min-width: 640px) {
    .container {
        padding: 0 16px;
    }
}

@media screen and (min-width: 1024px) {
    .container {
        padding: 0 24px;
    }
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

/* Admin Bar Compatibility - Adjust header position when logged in */
.admin-bar .site-header {
    top: 32px; /* WordPress admin bar height on desktop */
}

/* Admin Bar - Mobile */
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px; /* WordPress admin bar height on mobile */
    }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    transition: all 0.3s ease;
    display: inline-block;
    line-height: 1.2;
}

.site-logo:hover {
    color: #1F2937;
    transform: scale(1.02);
}

/* Custom Logo - Fixed size */
.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.custom-logo {
    max-height: 50px;
    width: auto;
    height: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

/* Hover bridge - vùng đệm invisible giữa menu và submenu */
.main-navigation .menu-item-has-children::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
    z-index: 999;
    display: none;
}

.main-navigation .menu-item-has-children:hover::before {
    display: block;
}

.main-navigation a {
    color: #374151;
    font-weight: 500;
    padding: 10px 18px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

/* Underline effect using ::before */
.main-navigation a::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation a:hover::before {
    transform: scaleX(1);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
    color: var(--primary-color);
    font-weight: 600;
}

.main-navigation .current-menu-item > a::before,
.main-navigation .current_page_item > a::before,
.main-navigation .current-menu-ancestor > a::before {
    transform: scaleX(1);
}

/* Dropdown Submenu */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 8px;
    padding-top: 12px;
    margin-top: 4px;
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-navigation li:hover > .sub-menu {
    display: flex;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    padding: 10px 16px;
    white-space: nowrap;
    border-radius: 10px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

/* Submenu underline adjustment */
.main-navigation .sub-menu a::before {
    left: 16px;
    right: 16px;
    bottom: 6px;
}

.main-navigation .sub-menu a:hover {
    color: #1F2937;
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Level 2 Submenu (nested) */
.main-navigation .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 4px;
}

/* Menu item with children indicator - using ::after for arrow */
.main-navigation .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23374151"%3E%3Cpath d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"%3E%3C/path%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.main-navigation .menu-item-has-children:hover > a::after {
    opacity: 1;
}

.main-navigation .sub-menu .menu-item-has-children > a::after {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23374151"%3E%3Cpath d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"%3E%3C/path%3E%3C/svg%3E');
    float: right;
    margin-left: 12px;
}

/* Mobile Menu Toggle - Simple Flat Design */
.menu-toggle {
    display: none;
    background: var(--white-color);
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1001;
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle.active {
   color: #1F2937;
}

/* Hamburger Icon - Simple */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 5px;
}

.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: #1F2937;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Active State - X */

.menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Main Content */
.site-main {
    padding: 32px 0;
    min-height: calc(100vh - 300px);
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
    padding: 24px;
    text-align: center;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.page-description {
    color: var(--text-light);
    font-size: 16px;
}

/* Home Sections */
.home-section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.section-description {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/* App Grid - Mobile First Responsive */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

/* Tablet: 2 columns */
@media screen and (min-width: 640px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* Desktop: 3 columns */
@media screen and (min-width: 1024px) {
    .app-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Large Desktop: 4 columns */
@media screen and (min-width: 1280px) {
    .app-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

/* App Card - Mobile Optimized */
.app-card {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.5);
}

.app-card:active {
    transform: scale(0.98);
}

/* App Icon - Responsive Size */
.app-icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 14px;
    overflow: hidden;
}

@media screen and (min-width: 640px) {
    .app-icon {
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }
}

@media screen and (min-width: 1024px) {
    .app-icon {
        width: 88px;
        height: 88px;
    }
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* App Content */
.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.app-content .app-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media screen and (min-width: 640px) {
    .app-content .app-title {
        font-size: 15px;
        line-height: 1.4;
    }
}

@media screen and (min-width: 1024px) {
    .app-content .app-title {
        font-size: 16px;
    }
}

.app-content .app-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.app-content .app-title a:hover {
    color: var(--primary-color);
}

/* App Meta - Mobile Optimized */
.app-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}

@media screen and (min-width: 640px) {
    .app-meta {
        gap: 8px;
        font-size: 13px;
    }
}

@media screen and (min-width: 1024px) {
    .app-meta {
        gap: 10px;
        font-size: 14px;
    }
}

.app-version {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(243, 244, 246, 0.8) !important;
    color: #4B5563 !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.app-version::before {
    content: "";
}

.app-size {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(243, 244, 246, 0.8) !important;
    color: #4B5563 !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.app-size::before {
    content: "";
}

.app-mod-features {
    margin-top: 8px;
}

.mod-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: background 0.2s ease;
}

.mod-badge:hover {
    background: #388E3C;
}

.mod-badge-sm.app-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.app-meta span {
    background: var(--bg-light);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.3;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1F2937;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    margin-top: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.download-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

/* Single App Page */
.app-single {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* App Color Blur Background */
.app-blur-background {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 600px;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    filter: blur(100px);
    -webkit-filter: blur(100px);
}

/* Ensure container has relative positioning */
.site-main .container {
    position: relative;
}

.app-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.app-header .app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
}

.app-header-content {
    flex: 1;
}

.app-header .app-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    color: var(--text-dark);
}

.app-details {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.app-details h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.app-description {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 16px;
}

/* Typography - Headings */
.app-description h1,
.app-description h2,
.app-description h3,
.app-description h4,
.app-description h5,
.app-description h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.app-description h1 {
    font-size: 28px;
}

.app-description h2 {
    font-size: 24px;
}

.app-description h3 {
    font-size: 20px;
}

.app-description h4 {
    font-size: 18px;
}

.app-description h5 {
    font-size: 16px;
}

.app-description h6 {
    font-size: 14px;
}

/* Typography - Paragraphs */
.app-description p {
    margin-bottom: 16px;
    line-height: 1.8;
}

/* Typography - Lists */
.app-description ul,
.app-description ol {
    margin: 16px 0;
    padding-left: 24px;
}

.app-description li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.app-description ul {
    list-style: disc;
}

.app-description ol {
    list-style: decimal;
}

.app-description ul ul,
.app-description ol ul {
    list-style: circle;
    margin-top: 8px;
}

.app-description ol ol,
.app-description ul ol {
    list-style: lower-alpha;
    margin-top: 8px;
}

/* Typography - Links */
.app-description a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.app-description a:hover {
    color: #1e40af;
    text-decoration: none;
}

/* Typography - Emphasis */
.app-description strong,
.app-description b {
    font-weight: 700;
    color: var(--text-dark);
}

.app-description em,
.app-description i {
    font-style: italic;
}

/* Typography - Code */
.app-description code {
    background: var(--bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e83e8c;
}

.app-description pre {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.app-description pre code {
    background: none;
    padding: 0;
    color: var(--text-dark);
}

/* Typography - Blockquote */
.app-description blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 16px;
    margin: 20px 0;
    color: var(--text-light);
    font-style: italic;
}

/* Typography - Tables */
.app-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.app-description table th,
.app-description table td {
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.app-description table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.app-description table tr:nth-child(even) {
    background: rgba(249, 250, 251, 0.5);
}

/* Typography - Horizontal Rule */
.app-description hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

/* Typography - Images */
.app-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.app-info-list {
    list-style: none;
}

.app-info-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.app-info-list li:last-child {
    border-bottom: none;
}

/* Table of Contents - Modern Minimal Design */
.table-of-contents {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0;
    margin: 24px 0 32px;
    box-shadow: var(--shadow-glass);
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(249, 250, 251, 0.5);
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.toc-header:hover {
    background: rgba(249, 250, 251, 0.8);
}

.toc-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.toc-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.toc-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.toc-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
}

.toc-toggle-icon {
    width: 18px;
    height: 18px;
    color: var(--text-dark);
    transition: transform 0.3s ease;
}

.table-of-contents.collapsed .toc-toggle-icon {
    transform: rotate(-90deg);
}

.table-of-contents.collapsed .toc-list {
    display: none;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 16px 0;
    counter-reset: toc-counter;
}

.toc-item {
    position: relative;
    counter-increment: toc-counter;
}

.toc-link {
    display: block;
    padding: 10px 24px 10px 52px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.2s ease;
    position: relative;
}

.toc-link::before {
    content: counter(toc-counter);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
}

.toc-link:hover {
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary-color);
    padding-left: 56px;
}

.toc-link:hover::before {
    background: var(--primary-color);
    color: white;
}

.toc-level-3 .toc-link {
    padding-left: 68px;
    font-size: 13px;
    color: var(--text-gray);
}

.toc-level-3 .toc-link::before {
    left: 40px;
    width: 18px;
    height: 18px;
    font-size: 10px;
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-gray);
}

.toc-level-3 .toc-link:hover {
    padding-left: 72px;
}

.toc-level-4 .toc-link {
    padding-left: 84px;
    font-size: 12px;
    color: var(--text-gray);
    opacity: 0.8;
}

.toc-level-4 .toc-link::before {
    left: 56px;
    width: 16px;
    height: 16px;
    font-size: 9px;
    background: rgba(107, 114, 128, 0.08);
    color: var(--text-gray);
}

.toc-level-4 .toc-link:hover {
    padding-left: 88px;
    opacity: 1;
}

/* Smooth scroll behavior for TOC links */
html {
    scroll-behavior: smooth;
}

/* Highlight target heading */
:target {
    scroll-margin-top: 100px;
    animation: highlightHeading 2s ease-out;
}

@keyframes highlightHeading {
    0% {
        background: rgba(59, 130, 246, 0.15);
        padding: 8px 16px;
        margin: -8px -16px;
        border-radius: 8px;
    }
    100% {
        background: transparent;
        padding: 0;
        margin: 0;
    }
}

/* Responsive TOC */
@media (max-width: 768px) {
    .table-of-contents {
        margin: 20px 0 24px;
        border-radius: 12px;
    }
    
    .toc-header {
        padding: 16px 20px;
    }
    
    .toc-title {
        font-size: 15px;
    }
    
    .toc-list {
        padding: 12px 0;
    }
    
    .toc-link {
        padding: 8px 20px 8px 48px;
        font-size: 13px;
    }
    
    .toc-link::before {
        left: 20px;
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .toc-link:hover {
        padding-left: 52px;
    }
    
    .toc-level-3 .toc-link {
        padding-left: 60px;
        font-size: 12px;
    }
    
    .toc-level-3 .toc-link::before {
        left: 36px;
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
    
    .toc-level-3 .toc-link:hover {
        padding-left: 64px;
    }
    
    .toc-level-4 .toc-link {
        padding-left: 72px;
        font-size: 11px;
    }
    
    .toc-level-4 .toc-link::before {
        left: 52px;
        width: 14px;
        height: 14px;
        font-size: 8px;
    }
    
    .toc-level-4 .toc-link:hover {
        padding-left: 76px;
    }
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
    min-width: 120px;
}

.info-value {
    color: var(--text-light);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    word-break: break-all;
}

/* Allow wrapping for links and long text on mobile */
.info-value a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 639px) {
    .info-label {
        min-width: 100px;
        font-size: 14px;
    }
    
    .info-value {
        font-size: 14px;
    }
}

/* Footer */
.site-footer {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 48px 0 32px;
    margin-top: 64px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    color: var(--text-light);
    font-size: 14px;
}

/* Footer Navigation */
.footer-navigation {
    width: 100%;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin: 0;
    padding: 0;
}

.footer-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.footer-menu a:hover::after {
    width: 100%;
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-light);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Social Icon Colors on Hover */
.social-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.social-tiktok:hover {
    background: #000000;
    border-color: #000000;
    color: white;
}

.social-youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: white;
}

.social-x:hover {
    background: #000000;
    border-color: #000000;
    color: white;
}

.social-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.social-pinterest:hover {
    background: #e60023;
    border-color: #e60023;
    color: white;
}

.social-mastodon:hover {
    background: #6364ff;
    border-color: #6364ff;
    color: white;
}

.social-bluesky:hover {
    background: #1185fe;
    border-color: #1185fe;
    color: white;
}

.social-telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: white;
}

/* Footer Copyright & Disclaimer */
.footer-copyright,
.footer-disclaimer {
    text-align: center;
    line-height: 1.6;
}

.footer-copyright {
    font-weight: 500;
    color: var(--text-dark);
}

.footer-copyright a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-copyright a:hover {
    opacity: 0.8;
}

.footer-disclaimer {
    font-size: 13px;
    color: var(--text-light);
    max-width: 800px;
    opacity: 0.85;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .site-footer {
        padding: 32px 0 24px;
        margin-top: 48px;
    }
    
    .footer-content {
        gap: 20px;
    }
    
    .footer-menu {
        gap: 8px 20px;
        font-size: 13px;
    }
    
    .footer-social {
        gap: 12px;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .footer-disclaimer {
        font-size: 12px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-dark);
    min-width: 44px;
    text-align: center;
    transition: all 0.3s ease;
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Search Form */
.search-form {
    margin-bottom: 32px;
}

.search-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-submit {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: #1F2937;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    flex-shrink: 0;
}

.search-submit:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.search-submit:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

.search-submit svg {
    width: 22px;
    height: 22px;
}

/* Load More Button */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 32px;
    margin-bottom: 16px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.load-more-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.load-more-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

.load-more-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.load-more-btn .btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    height: 20px;
}

.load-more-btn .btn-text {
    display: inline-block;
    min-width: 84px;
    text-align: center;
}

.load-more-btn .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.load-more-error {
    text-align: center;
    color: #DC2626;
    font-size: 14px;
    margin-top: 16px;
    padding: 12px 20px;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

/* Tablet Styles */
@media screen and (min-width: 768px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .site-main {
        padding: 48px 0;
    }
}

/* Desktop Styles - Archive Cards */
@media screen and (min-width: 1024px) {
    .app-card {
        padding: 18px;
    }
    
    .app-icon {
        width: 90px;
        height: 90px;
    }
    
    .app-content .app-title {
        font-size: 17px;
    }
}

/* Mobile Archive Cards - Removed (using new responsive design above) */

/* Mobile Menu */
@media screen and (max-width: 767px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-navigation {
        display: none;
        position: fixed;
        top: 76px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(25px) saturate(150%);
        -webkit-backdrop-filter: blur(25px) saturate(150%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        z-index: 1000;
    }
    
    .main-navigation.active {
        display: block;
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Simple scrollbar */
    .main-navigation.active::-webkit-scrollbar {
        width: 4px;
    }
    
    .main-navigation.active::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .main-navigation.active::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 2px;
    }
    
    
    /* Admin Bar - Adjust mobile menu position */
    .admin-bar .main-navigation {
        top: 122px; /* 76px header + 46px admin bar */
    }
    
    .admin-bar .main-navigation.active {
        max-height: calc(100vh - 122px);
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 16px;
        max-width: 100%;
        background: transparent;
        position: relative;
    }
    
    .main-navigation li {
        width: 100%;
        margin-bottom: 1px;
        opacity: 0;
        animation: fadeInUp 0.4s ease-out forwards;
    }
    
    .main-navigation.active li:nth-child(1) { animation-delay: 0.05s; }
    .main-navigation.active li:nth-child(2) { animation-delay: 0.1s; }
    .main-navigation.active li:nth-child(3) { animation-delay: 0.15s; }
    .main-navigation.active li:nth-child(4) { animation-delay: 0.2s; }
    .main-navigation.active li:nth-child(5) { animation-delay: 0.25s; }
    .main-navigation.active li:nth-child(6) { animation-delay: 0.3s; }
    .main-navigation.active li:nth-child(7) { animation-delay: 0.35s; }
    .main-navigation.active li:nth-child(8) { animation-delay: 0.4s; }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .main-navigation li:last-child {
        margin-bottom: 0;
    }
    
    .main-navigation a {
        display: flex;
        align-items: center;
        padding: 16px;
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(15px) saturate(120%);
        -webkit-backdrop-filter: blur(15px) saturate(120%);
        border-radius: 12px;
        transition: all 0.2s ease;
        font-weight: 500;
        font-size: 15px;
        color: #1F2937;
        border: 1px solid rgba(255, 255, 255, 0.5);
        margin-bottom: 4px;
        position: relative;
        min-height: 52px;
    }
    
    .main-navigation a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 3px;
        background: var(--primary-color);
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    
    .main-navigation a:hover::before {
        opacity: 1;
    }
    
    .main-navigation a:hover {
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(20px) saturate(130%);
        -webkit-backdrop-filter: blur(20px) saturate(130%);
        color: var(--primary-color);
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .main-navigation .current-menu-item > a,
    .main-navigation .current_page_item > a {
        background: rgba(59, 130, 246, 0.12);
        backdrop-filter: blur(20px) saturate(130%);
        -webkit-backdrop-filter: blur(20px) saturate(130%);
        color: var(--primary-color);
        font-weight: 600;
        border-color: rgba(59, 130, 246, 0.3);
    }
    
    .main-navigation .current-menu-item > a::before,
    .main-navigation .current_page_item > a::before {
        opacity: 1;
    }
    
    /* Mobile Submenu - Glass Effect */
    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        background: rgba(249, 250, 251, 0.4);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: none;
        border-radius: 12px;
        padding: 0;
        margin: 8px 0 4px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .main-navigation .menu-item-has-children.active > .sub-menu {
        max-height: 500px;
        padding: 8px;
    }
    
    .main-navigation .sub-menu li {
        margin-bottom: 0;
    }
    
    .main-navigation .sub-menu a {
        padding: 12px 16px 12px 32px;
        font-size: 14px;
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(12px) saturate(110%);
        -webkit-backdrop-filter: blur(12px) saturate(110%);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        margin-bottom: 4px;
        min-height: 44px;
        color: #1F2937;
    }
    
    .main-navigation .sub-menu a::before {
        width: 2px;
        left: 16px;
    }
    
    .main-navigation .sub-menu a:hover {
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(18px) saturate(120%);
        -webkit-backdrop-filter: blur(18px) saturate(120%);
        transform: translateX(4px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    }
    
    /* Mobile submenu toggle - Simple */
    .main-navigation .menu-item-has-children > a {
        position: relative;
        padding-right: 48px;
    }
    
    .main-navigation .menu-item-has-children > a::after {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        content: '';
        width: 14px;
        height: 14px;
        background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23374151"%3E%3Cpath d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"%3E%3C/path%3E%3C/svg%3E');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        transition: transform 0.2s ease, opacity 0.2s ease;
        opacity: 0.5;
        margin-left: 0;
        float: none;
        z-index: 2;
    }
    
    .main-navigation .menu-item-has-children.active > a::after {
        transform: translateY(-50%) rotate(180deg);
        opacity: 0.8;
    }
    
    .main-navigation .sub-menu .menu-item-has-children > a::after {
        right: 16px;
    }
    
    /* Touch optimizations */
    .main-navigation a,
    .menu-toggle {
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .app-header {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 16px;
        margin-bottom: 20px;
    }
    
    .app-header .app-icon {
        width: 110px;
        height: 110px;
        margin: 0 auto;
        border-radius: 22px;
    }
    
    .app-header .app-title {
        font-size: 20px;
        margin-bottom: 0;
        line-height: 1.3;
    }
    
    .app-details {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    
    .app-details h2 {
        font-size: 20px;
        margin-bottom: 14px;
    }
}

/* Tablet Optimization (640px - 1023px) */
@media screen and (min-width: 640px) and (max-width: 1023px) {
    .app-header {
        flex-direction: row;
        text-align: left;
        padding: 20px;
        gap: 20px;
    }
    
    .app-header .app-icon {
        width: 110px;
        height: 110px;
        margin: 0;
        border-radius: 22px;
    }
    
    .app-header .app-title {
        font-size: 24px;
        margin-bottom: 0;
        line-height: 1.25;
    }
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 48px 0;
    color: var(--text-light);
}

/* Screenshots Horizontal Scroll */
.app-screenshots-horizontal {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin: 20px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.app-screenshots-horizontal::-webkit-scrollbar {
    height: 8px;
}

.app-screenshots-horizontal::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.app-screenshots-horizontal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.app-screenshots-horizontal::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

.app-screenshots-horizontal .screenshot-item {
    flex-shrink: 0;
    width: 220px;
    height: auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.app-screenshots-horizontal .screenshot-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

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

.app-screenshots-horizontal .screenshot-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Styles - Optimized */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

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

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
    min-height: 300px;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    transform-origin: center center;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.lightbox-image:active {
    cursor: grabbing;
}

/* Loading Spinner */
.lightbox-loader {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 36px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    font-weight: 300;
    user-select: none;
    z-index: 10;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.lightbox-nav[style*="visibility: hidden"],
.lightbox-nav[style*="opacity: 0"] {
    opacity: 0;
    pointer-events: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Zoom Controls */
.lightbox-controls {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lightbox-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

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

/* Counter */
.lightbox-counter {
    position: absolute;
    top: -50px;
    left: 0;
    color: white;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* ========== ARCHIVE ULTRA FLAT DESIGN ========== */

/* Clickable Card Link */
.app-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.app-card-link:hover {
    text-decoration: none;
}

/* Archive Icon */
.app-icon {
    position: relative;
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.app-card:hover .app-icon img {
    transform: scale(1.05);
}

/* Archive MOD Features - Mobile Optimized */
.app-mod-features-archive {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

@media screen and (min-width: 640px) {
    .app-mod-features-archive {
        gap: 6px;
        margin-top: 8px;
    }
}

.mod-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(240, 240, 240, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-dark);
    padding: 2px 6px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media screen and (min-width: 640px) {
    .mod-badge-small {
        padding: 3px 8px;
        font-size: 11px;
        gap: 3px;
    }
}

.mod-badge-small:first-child {
    background: rgba(243, 244, 246, 0.9);
    color: #374151;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.mod-badge-small.more {
    background: var(--bg-light);
    color: var(--text-light);
}

.mod-badge-small:hover {
    background: #E0E0E0;
}

/* App Icon Enhancements - Ultra Flat */
.app-single .app-icon img {
    border-radius: 20px;
}

.app-card .app-icon img {
    border-radius: 12px;
}

/* Screenshot Skeleton Loading */
.app-screenshots-horizontal .screenshot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(245, 245, 245, 0.1) 0%,
        rgba(245, 245, 245, 0.2) 50%,
        rgba(245, 245, 245, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 12px;
    z-index: -1;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.app-screenshots-horizontal .screenshot-item img {
    animation: fadeInImage 0.3s ease;
}

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

/* Responsive Screenshots & Lightbox */
@media screen and (max-width: 767px) {
    .app-screenshots-horizontal .screenshot-item {
        width: 180px;
    }
    
    .lightbox-nav {
        font-size: 28px;
        width: 44px;
        height: 44px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: -45px;
        right: 0;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .lightbox-counter {
        top: -45px;
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .lightbox-controls {
        bottom: -55px;
        gap: 6px;
        padding: 6px;
    }
    
    .lightbox-controls button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .lightbox-image {
        max-height: 70vh;
        border-radius: 6px;
    }
    
    .lightbox-image-wrapper {
        min-width: 200px;
        min-height: 200px;
        max-width: 95vw;
        max-height: 75vh;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .app-screenshots-horizontal .screenshot-item {
        width: 200px;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
}

@media screen and (min-width: 1024px) {
    .app-screenshots-horizontal .screenshot-item {
        width: 240px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .lightbox-nav:hover,
    .lightbox-close:hover,
    .lightbox-controls button:hover {
        transform: none;
    }
    
    .lightbox-nav:active {
        transform: translateY(-50%) scale(0.9) !important;
    }
    
    /* Ensure buttons are visible and clickable on mobile */
    .lightbox-nav {
        opacity: 1 !important;
    }
    
    .lightbox-nav[style*="visibility: hidden"] {
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    .lightbox-close:active {
        transform: rotate(90deg) scale(0.9);
    }
    
    .lightbox-controls button:active {
        transform: scale(0.9);
    }
}

/* Prevent text selection and improve touch handling */
.lightbox-overlay * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ========== MODERN FLAT DOWNLOAD BUTTON ========== */
.app-download-section {
    margin: 28px 0;
}

.download-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.download-btn-large:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.download-btn-large:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
}

.download-btn-large svg {
    flex-shrink: 0;
}

.download-btn-large span {
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

/* ========== ULTRA FLAT DESIGN: MOD FEATURES ========== */
.mod-features-section {
    margin-top: 24px;
}

.app-mod-features-flat {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.mod-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #FAFAFA;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
    transition: background 0.2s ease, border-left-color 0.2s ease;
}

.mod-feature-item:hover {
    background: #F0F0F0;
    border-left-color: #388E3C;
}

.mod-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.mod-text {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.4;
}

/* Old mod badges - hide them */
.app-mod-features {
    display: none;
}

/* ========== RESPONSIVE MODERN FLAT DESIGN ========== */
@media screen and (max-width: 767px) {
    .download-btn-large {
        padding: 12px 20px;
        gap: 10px;
        font-size: 15px;
    }
    
    .download-icon {
        font-size: 18px;
    }
    
    .download-title {
        font-size: 15px;
    }
    
    .download-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    .mod-feature-item {
        padding: 10px 14px;
        gap: 10px;
    }
    
    .mod-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .mod-text {
        font-size: 13px;
    }
}

/* ========== BREADCRUMBS - SEO OPTIMIZED ========== */
.breadcrumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.4;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    margin: 0;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color .2s;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #1565C0;
}

.breadcrumb-item.active span {
    color: var(--text-dark);
    font-weight: 600;
}

.breadcrumb-separator {
    color: var(--text-light);
    user-select: none;
    padding: 0 4px;
}

/* Mobile optimization */
@media (max-width: 640px) {
    .breadcrumbs {
        font-size: 12px;
        padding: 8px 0;
        margin-bottom: 16px;
    }
    
    .breadcrumb-list {
        padding: 0 12px;
        gap: 4px;
    }
    
    .breadcrumb-separator {
        padding: 0 2px;
    }
    
    .breadcrumb-item span,
    .breadcrumb-item a {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
