/*
Theme Name: modscraft
Author: modscraft
Description: A premium, dashboard-style theme acting as an API backend for the Modscraft app.
Version: 1.1
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #10b981; /* Premium Emerald Green */
    --primary-hover: #059669;
    --bg-main: #f3f4f6; /* Light gray background */
    --surface: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

h1.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1.site-title a {
    text-decoration: none;
    color: var(--text-main);
    background: linear-gradient(135deg, #1f2937 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.2s;
}

h1.site-title a:hover {
    opacity: 0.8;
}

/* Search */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input[type="text"] {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    width: 250px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-form button {
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.search-form button:hover {
    background-color: var(--primary-hover);
}

.search-form button:active {
    transform: scale(0.98);
}

/* Main Container */
main.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    min-height: calc(100vh - 200px);
}

main > h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    background: var(--surface);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #d1d5db;
}

.post-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.post-item-info h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.post-item-info h2 a {
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.2s;
}

.post-item-info h2 a:hover {
    color: var(--primary);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Buttons */
.post-item-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-download, .btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-download {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

.btn-download:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-view {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-view:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Single Post */
.post-content {
    background: var(--surface);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.post-content h1 {
    margin-top: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.post-content .post-meta {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.content-body {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
}

.content-body p {
    margin-bottom: 1rem;
}

/* Download Section Single */
.download-section {
    margin-top: 3rem;
    padding: 2rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    text-align: center;
}

.download-section h3 {
    margin-top: 0;
    color: #166534;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.download-section p {
    margin: 0.5rem 0;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* Status Indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-success {
    background-color: #dcfce7;
    color: #166534;
}

.status-warning {
    background-color: #fef9c3;
    color: #854d0e;
}
