/*
Theme Name: MacDownloader Pro
Theme URI: https://macdownloader.com
Author: MacDownloader Team
Author URI: https://macdownloader.com
Description: A professional WordPress theme designed for Mac software and games downloading websites. Features custom post types for apps and games, advanced filtering, download management, and a clean, modern interface optimized for Mac users.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: macdownloader
Tags: blog, custom-menu, custom-logo, e-commerce, featured-images, full-width-template, theme-options, translation-ready
*/

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --accent-color: #FF9500;
    --success-color: #34C759;
    --danger-color: #FF3B30;
    --dark-bg: #1C1C1E;
    --light-bg: #F2F2F7;
    --card-bg: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #6E6E73;
    --border-color: #D1D1D6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.site-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

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

.site-logo a {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.site-logo img {
    height: 45px;
    width: auto;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    padding: 10px 20px;
    border-radius: 10px;
}

.main-navigation a:hover {
    color: var(--primary-color);
    background: rgba(0, 122, 255, 0.08);
}

.search-form {
    position: relative;
    margin-left: 20px;
}

.search-form input[type="search"] {
    padding: 12px 45px 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 280px;
    font-size: 15px;
    transition: var(--transition);
    background: var(--light-bg);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.search-form button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 30px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-section p {
    font-size: 22px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.category-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.category-tab {
    padding: 14px 32px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.category-tab:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px 80px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.app-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.app-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px);
    border-color: rgba(0, 122, 255, 0.2);
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    margin-bottom: 20px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

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

.app-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.app-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.app-category {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    display: inline-block;
    margin-bottom: 16px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.download-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.download-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 16px;
}

.single-app-header {
    background: var(--card-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.single-app-top {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.single-app-icon {
    width: 140px;
    height: 140px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.single-app-info h1 {
    font-size: 42px;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -1px;
}

.single-app-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.download-section {
    display: flex;
    gap: 16px;
    align-items: center;
}

.download-btn-large {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 18px 48px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.download-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.45);
}

.app-content {
    background: var(--card-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.app-content h2 {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.app-content p {
    margin-bottom: 20px;
    font-size: 17px;
    color: var(--text-primary);
}

.app-content ul,
.app-content ol {
    margin-left: 24px;
    margin-bottom: 20px;
}

.app-content li {
    margin-bottom: 10px;
    font-size: 17px;
}

.app-screenshots {
    background: var(--card-bg);
    padding: 50px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.app-screenshots h2 {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.screenshot-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.screenshot-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0;
    transition: var(--transition);
}

.screenshot-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-hover);
}

.screenshot-item:hover::after {
    opacity: 0.9;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 40px;
}

.screenshot-modal.active {
    opacity: 1;
}

.screenshot-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.screenshot-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.screenshot-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.screenshot-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.site-footer {
    background: var(--dark-bg);
    color: white;
    padding: 80px 30px 30px;
    margin-top: 80px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto 50px;
}

.footer-widget h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: white;
    font-weight: 700;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 15px;
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 60px 0;
}

.pagination a,
.pagination span {
    padding: 12px 20px;
    background: var(--card-bg);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
}

.filter-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

.filter-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    background: white;
    font-weight: 600;
    transition: var(--transition);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.breadcrumbs {
    padding: 24px 30px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.no-results {
    text-align: center;
    padding: 100px 30px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.no-results h2 {
    font-size: 32px;
    margin-bottom: 16px;
    font-weight: 800;
}

.no-results p {
    color: var(--text-secondary);
    font-size: 18px;
}

@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 42px;
    }

    .apps-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 24px;
    }

    .single-app-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .single-app-meta {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 36px;
    }

    .hero-section p {
        font-size: 18px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow);
        padding: 20px;
    }

    .main-navigation.active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 8px;
    }

    .main-navigation a {
        display: block;
        padding: 12px 16px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .search-form {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }

    .search-form input[type="search"] {
        width: 100%;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .filter-section {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .single-app-header,
    .app-content,
    .app-screenshots {
        padding: 30px;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
