/* 
 * FreeWallpapers.cc - Master Stylesheet
 * Theme: Cozy Rainy Forest (Dark Mode)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    /* Color Palette */
    --bg-deep: #050a05;         /* Deepest forest black */
    --bg-surface: #0f1a0f;      /* Card and section background */
    --bg-elevated: #1a2a1a;     /* Hover and input background */
    
    --accent-forest: #4a7c59;   /* Main brand green */
    --accent-sage: #8bad95;     /* Lighter sage for highlights */
    --accent-rain: #708090;     /* Muted rainy blue-grey */
    
    --text-main: #e0e7e0;       /* Soft mint-white */
    --text-muted: #8a9a8a;      /* Muted sage-grey */
    --text-dim: #4a5a4a;        /* Low contrast text */
    
    --border-thin: rgba(255, 255, 255, 0.06);
    --border-light: rgba(74, 124, 89, 0.2);
    
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .font-serif { font-family: 'Playfair Display', serif; }

a { color: inherit; text-decoration: none; transition: var(--transition); }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass {
    background: rgba(15, 26, 15, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
}

/* --- Navigation --- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-thin);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--accent-sage);
}

.logo span { color: var(--text-main); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a:hover { color: var(--accent-sage); }

/* --- Hero Section --- */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at top, #0a1f0a 0%, var(--bg-deep) 70%);
}

.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Wallpaper Grid --- */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.wallpaper-card {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-thin);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.wallpaper-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-light);
}

.wallpaper-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    opacity: 0.85;
    transition: var(--transition);
}

.wallpaper-card:hover img { opacity: 1; }

.card-info {
    padding: 1.5rem;
}

.card-info h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--bg-elevated);
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-forest {
    background: var(--accent-forest);
    color: white;
}

.btn-forest:hover {
    background: #5c8d6b;
    box-shadow: 0 0 20px rgba(74, 124, 89, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-elevated);
}

/* --- Newsletter Section --- */
.newsletter-box {
    margin-top: 6rem;
    padding: 5rem 2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-thin);
}

.newsletter-box input {
    background: var(--bg-deep);
    border: 1px solid var(--border-thin);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    color: white;
    width: 100%;
    max-width: 400px;
    margin-right: 0.5rem;
}

.newsletter-box input:focus {
    outline: none;
    border-color: var(--accent-forest);
}

/* --- Admin Specific Styles --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-thin);
    padding: 2rem;
    position: fixed;
    height: 100vh;
}

.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 3rem;
}

.admin-nav-item {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.admin-nav-item.active, .admin-nav-item:hover {
    background: var(--bg-elevated);
    color: var(--accent-sage);
}

.admin-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-thin);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

/* Data Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-thin);
}

/* Form Styles */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
.form-control {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border-thin);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-forest);
}

/* Status Badges */
.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}
.badge-pub { background: rgba(45, 90, 39, 0.2); color: #81c784; }
.badge-draft { background: rgba(124, 74, 74, 0.2); color: #e57373; }

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 2.5rem; }
    .admin-sidebar { width: 80px; padding: 1rem; }
    .admin-sidebar span { display: none; }
    .admin-main { margin-left: 80px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Add a hamburger menu in JS later */
    .hero { padding: 5rem 0 2rem; }
    .wallpaper-grid { grid-template-columns: 1fr; }
    .newsletter-box input { margin-bottom: 1rem; margin-right: 0; }
}

/* --- Footer --- */
.site-footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-thin);
    margin-top: 6rem;
    text-align: center;
    color: var(--text-dim);
}