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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: #007bff;
}

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

/* Search Section */
.search-section {
    background: white;
    padding: 2rem 0;
}

/* Platform nav (iOS/Android/MacOS/Windows) */
.platform-nav {
    background: transparent;
}

.platform-nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.platform-link:hover {
    border-color: #007bff;
    color: #007bff;
}

.platform-link.active {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-bar {
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
}

.country-dropdown {
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.search-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background: #218838;
}

/* Filter Container */
.filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.category-select,
.sort-select {
    min-width: 200px;
}

.category-dropdown,
.sort-dropdown {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.category-dropdown:focus,
.sort-dropdown:focus {
    outline: none;
    border-color: #007bff;
}

.category-dropdown:hover,
.sort-dropdown:hover {
    border-color: #007bff;
}

/* Information Bar */
.information-bar {
    background: white;
    border-bottom: 1px solid #e9ecef;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #007bff;
}

.information-bar i {
    font-size: 0.9rem;
}

/* Footer */
.container_footer {
    background: white;
    border-bottom: 1px solid #e9ecef;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #007bff;
}

.container_footer i {
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: #333;
}

.section-title i {
    color: #007bff;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.app-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.app-title {
    flex: 1;
}

.app-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.app-developer {
    color: #666;
    font-size: 0.9rem;
}

.app-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.detail-label {
    color: #666;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: #333;
    margin-left: 0;
}

.size-help {
    color: #007bff;
    cursor: help;
}

.app-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.decrypt-btn {
    flex: 1;
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.decrypt-btn:hover {
    background: #0056b3;
}

.history-btn {
    background: none;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.history-btn:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal-body {
    margin-top: 1rem;
}

.app-details {
	/* display: flex; */
	gap: 2rem;
	align-items: flex-start;
}

.app-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
}

.download-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background: #0056b3;
}

/* History Modal Styles */
.history-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.app-icon-history {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.history-title h2 {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.history-title p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.history-content h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.2rem;
}

.history-content h3 i {
    color: #007bff;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.version-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #007bff;
    transition: all 0.2s;
}

.version-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.version-info h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.version-info p {
    margin: 0.25rem 0 0 0;
    color: #666;
    font-size: 0.85rem;
}

.version-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.version-badge.current {
    background: #007bff;
}

.version-badge.old {
    background: #6c757d;
}

.version-details {
    margin-top: 0.75rem;
}

.version-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.version-detail-label {
    color: #666;
    font-weight: 500;
}

.version-detail-value {
    color: #333;
}

.version-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.version-download-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
}

.version-download-btn:hover {
    background: #0056b3;
}

/* Dark mode styles for history modal */
body.dark-mode .version-item {
    background: #3d3d3d;
    color: #e9ecef;
}

body.dark-mode .version-item:hover {
    background: #4d4d4d;
}

body.dark-mode .history-title h2,
body.dark-mode .history-content h3,
.history-title p,
body.dark-mode .version-info h4,
body.dark-mode .version-detail-value {
    color: #e9ecef;
}

body.dark-mode .version-detail-label {
    color: #adb5bd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .search-container {
        flex-direction: column;
        padding: 0 1rem;
    }
    .platform-nav-content {
        padding: 0 1rem 1rem 1rem;
    }
    
    .filter-container {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .category-select,
    .sort-select {
        min-width: auto;
        width: 100%;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .app-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    .information-bar {
        padding: 1rem 1rem;
    }
}

/* Dark Mode Support */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e9ecef;
}

body.dark-mode .header,
body.dark-mode .information-bar,
body.dark-mode .search-section {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .information-bar {
    background: #2d2d2d;
    border-color: #404040;
    color: #66a3ff;
}

body.dark-mode .platform-link {
    background: #2d2d2d;
    border-color: #404040;
    color: #e9ecef;
}

body.dark-mode .platform-link:hover {
    border-color: #66a3ff;
    color: #66a3ff;
}

body.dark-mode .platform-link.active {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

body.dark-mode .app-card {
    background: #2d2d2d;
    color: #e9ecef;
}

body.dark-mode .app-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e9ecef;
    margin-bottom: 0.25rem;
}

body.dark-mode .search-input,
body.dark-mode .category-dropdown,
body.dark-mode .sort-dropdown {
    background: #2d2d2d;
    border-color: #404040;
    color: #e9ecef;
}

body.dark-mode .modal-content {
    background: #2d2d2d;
}

body.dark-mode .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: #e9ecef;
}

body.dark-mode .section-title i {
    color: #007bff;
}

body.dark-mode .detail-value {
    color: #e9ecef;
    margin-left: 0;
}

body.dark-mode .detail-label {
    color: #d1d1d1;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

body.dark-mode .app-developer {
    color: #d1d1d1;
    font-size: 0.9rem;
}

.history-btn {
    background: none;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    color: #d1d1d1;
    transition: all 0.2s;
}

.history-btn:hover {
    background-color: #2d2d2d;
    border-color: #007bff;
    color: #007bff;
}

