/* ============================================================
   WallpaperHD - Main Stylesheet (Clean Light Theme)
   ============================================================ */

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

:root {
    --bg-primary:   #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card:      #ffffff;
    --bg-hover:     #f1f3f5;
    --accent:       #000000;
    --accent-light: #333333;
    --accent-glow:  rgba(0,0,0,0.1);
    --gold:         #f59e0b;
    --text-primary: #212529;
    --text-secondary:#495057;
    --text-muted:   #868e96;
    --border:       #e9ecef;
    --radius:       0px;
    --radius-lg:    0px;
    --shadow:       none;
    --shadow-card:  none;
    --transition:   0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- NAVBAR ---- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.brand-icon { font-size: 1.5rem; }
.brand-text {
    color: var(--accent);
}
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link {
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-admin {
    background: var(--bg-secondary);
    color: var(--accent);
    border: 1px solid var(--border);
}
.nav-admin:hover { background: var(--bg-hover); }

/* ---- MAIN ---- */
.main-content { min-height: calc(100vh - 60px); }

/* ---- HERO ---- */
.hero {
    position: relative;
    padding: 5rem 1.5rem 4rem;
    text-align: center;
    overflow: visible;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--accent);
    margin-bottom: 1rem;
    line-height: 1.15;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- GALLERY ---- */
.gallery-section { padding: 2rem 0 4rem; }
.gallery-container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.gallery-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ---- CARD ---- */
.gallery-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color var(--transition);
}
.gallery-card:hover {
    border-color: var(--accent);
}
.card-link { display: block; }
@keyframes placeholderPulse {
    0% { background-color: var(--bg-secondary); }
    50% { background-color: #e2e8f0; }
    100% { background-color: var(--bg-secondary); }
}
.card-image-wrap { position: relative; overflow: hidden; aspect-ratio: 16/10; background: var(--bg-secondary); animation: placeholderPulse 1.5s infinite ease-in-out; }
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-card:hover .card-img { transform: scale(1.02); }
.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.gallery-card:hover .card-overlay { opacity: 1; }
.card-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transform: translateY(10px);
    transition: transform var(--transition);
}
.gallery-card:hover .card-overlay-content { transform: translateY(0); }
.overlay-icon { font-size: 1.8rem; }
.overlay-text { font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-primary);
    color: var(--accent);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-weight: 600;
}
.card-body { padding: 1rem; }
.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- PAGINATION ---- */
.pagination-wrap {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}
.pagination { list-style: none; display: flex; gap: 0; flex-wrap: wrap; justify-content: center; }
.pagination li a, .pagination li span {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    margin-left: -1px;
}
.pagination li a:hover { background: var(--bg-hover); color: var(--text-primary); position: relative; z-index: 2; border-color: var(--accent); }
.pagination li.active a, .pagination li.active span {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    position: relative;
    z-index: 2;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}
.empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.empty-state a { color: var(--accent-light); font-weight: 600; }

/* ---- DETAIL PAGE ---- */
.breadcrumb-wrap {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); font-weight: 500; transition: var(--transition); }
.breadcrumb a:hover { text-decoration: underline; }
.bc-sep { color: var(--text-muted); }

.detail-section { padding: 3rem 0; }
.detail-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}
@media (max-width: 900px) {
    .detail-container { grid-template-columns: 1fr; }
}

.detail-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    background: var(--bg-card);
    animation: placeholderPulse 1.5s infinite ease-in-out;
}
.detail-img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); }
.detail-img-actions {
    position: absolute;
    top: 12px;
    right: 12px;
}
.btn-fullscreen {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-fullscreen:hover { background: var(--bg-hover); border-color: var(--accent); }

.detail-info {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.detail-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-primary);
}
.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.75rem;
    margin: -1px 0 0 -1px; /* collapse borders */
}
.meta-icon { font-size: 1.2rem; flex-shrink: 0; }
.meta-label { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.meta-value { display: block; font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--accent);
}
.btn-download:hover {
    background: var(--bg-primary);
    color: var(--accent);
}
.btn-icon { font-size: 1.2rem; }

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.detail-description p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
}
.tag:hover { background: var(--bg-hover); color: var(--accent); border-color: var(--accent); }

.share-buttons { display: flex; gap: 0; flex-wrap: wrap; }
.share-btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
    margin-left: -1px;
}
.share-wa { background: var(--bg-primary); color: #25d366; }
.share-wa:hover { background: #25d366; color: #fff; border-color: #25d366; z-index: 2; position: relative;}
.share-tg { background: var(--bg-primary); color: #0088cc; }
.share-tg:hover { background: #0088cc; color: #fff; border-color: #0088cc; z-index: 2; position: relative;}
.share-copy { background: var(--bg-primary); color: var(--text-secondary); }
.share-copy:hover { background: var(--accent); color: #fff; border-color: var(--accent); z-index: 2; position: relative;}

/* ---- RELATED ---- */
.related-section { padding: 0 0 4rem; border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 3rem;}
.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* ---- FULLSCREEN MODAL ---- */
.fullscreen-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.fullscreen-modal.active { display: flex; }
.fullscreen-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius);
}
.fullscreen-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
}
.fullscreen-close:hover { background: var(--bg-hover); }

/* ---- FOOTER ---- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem;
    text-align: center;
}
.footer-container { max-width: 600px; margin: 0 auto; }
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}
.footer-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.footer-links a { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); transition: var(--transition); }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .hero { padding: 3rem 1rem 2.5rem; }
    .hero-stats { gap: 1.5rem; }
    .detail-meta-grid { grid-template-columns: 1fr; }
}
