* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #050505;
    color: #e5e5e5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: #00FF66;
}

.back-home-link {
    color: #888888;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.back-home-link:hover {
    color: #00FF66;
}

.search-box {
    flex: 0 1 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px;
    background-color: #121212;
    border: 1px solid #222222;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #00FF66;
}

.categories-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 15px 0 5px 0;
    scrollbar-width: none;
}

.categories-row::-webkit-scrollbar {
    display: none;
}

.cat-tag {
    padding: 6px 14px;
    background-color: #121212;
    border: 1px solid #222222;
    border-radius: 20px;
    color: #a0a0a0;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-tag:hover, .cat-tag.active {
    background-color: #00FF66;
    color: #000000;
    border-color: #00FF66;
    font-weight: 600;
}

main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px;
}

.adsense-placement {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    width: 100%;
    overflow: hidden;
}

.grid-header {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.grid-header span {
    font-size: 15px;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    transition: color 0.2s;
}

.grid-header span.active {
    color: #ffffff;
    position: relative;
}

.grid-header span.active::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00FF66;
}

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

.wallpaper-card {
    display: flex;
    flex-direction: column;
    background: #111111;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222222;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.wallpaper-card:hover {
    transform: translateY(-4px);
    border-color: #00FF66;
}

.card-preview-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: #090909;
    cursor: pointer;
}

.card-preview-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-details-area {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
}

.card-meta-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Unified Green with Black Text Accent Buttons Across App */
.direct-download-btn, .master-download-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #00FF66;
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s;
}

.direct-download-btn {
    width: 90%;
    padding: 10px 16px;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.master-download-trigger {
    min-width: 280px;
    padding: 16px 32px;
    font-size: 15px;
    letter-spacing: 1px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 255, 102, 0.2);
}

.direct-download-btn:hover, .master-download-trigger:hover {
    background-color: #00E45B;
}

.master-download-trigger:hover {
    box-shadow: 0 6px 24px rgba(0, 255, 102, 0.3);
}

.direct-download-btn:active, .master-download-trigger:active {
    transform: scale(0.97);
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 16px;
    background-color: #111111;
    border: 1px solid #222222;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.page-btn:hover, .page-btn.active {
    background-color: #00FF66;
    color: #000000;
    border-color: #00FF66;
    font-weight: 600;
}

footer {
    background-color: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #666666;
    margin-top: auto;
}

footer a {
    color: #666666;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.2s;
}

footer a:hover {
    color: #00FF66;
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-box {
        width: 100%;
    }
    footer {
        flex-direction: column;
        text-align: center;
    }
    footer a {
        margin: 0 10px;
    }
}