:root {
    --bg: #0d120d; /* Very dark jungle green / almost black */
    --bg-soft: rgba(20, 28, 20, 0.85);
    --panel: rgba(24, 32, 24, 0.95);
    --panel-strong: #1a241a;
    --line: rgba(143, 159, 126, 0.25);
    --text: #e0e6dd;
    --muted: #8b9986;
    --accent: #aaca60; /* high-tech neon green / camo highlight */
    --accent-2: #849b49;
    --danger: #d97a46;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    --camo-1: #2a3424;
    --camo-2: #3a4531;
    --camo-3: #4b5a3d;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    min-height: 100%;
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(170, 202, 96, 0.04), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(132, 155, 73, 0.05), transparent 35%);
}

body {
    margin: 0;
    color: var(--text);
    font: 15px/1.65 "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-image:
        linear-gradient(rgba(170, 202, 96, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(170, 202, 96, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

::selection {
    background: var(--accent);
    color: #000;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.site-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.homepage {
    display: grid;
    gap: 32px;
}

.site-header,
.site-footer,
.hero,
.feature-hero,
.card,
.blog-post,
.admin-grid,
.auth-card,
.stat-card,
.post-card,
.table-wrap,
.empty-state {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    border-radius: 4px; /* Hard, technical edges */
}

/* Add an angle-cut technical look */
.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    position: sticky;
    top: 16px;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #0d120d;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%); /* Tech slant */
}

.brand strong {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
}

.brand small {
    display: none; /* Keep it minimal */
}

.site-nav {
    display: flex;
    gap: 24px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 600;
}

.site-nav a {
    color: var(--muted);
    position: relative;
}

.site-nav a:hover {
    color: var(--accent);
}

.home-hero {
    min-height: 600px;
    padding: 60px 48px;
    background: 
        linear-gradient(rgba(13, 18, 13, 0.7), rgba(13, 18, 13, 0.9)),
        url('../images/banner-home.svg') center/cover;
    border: 1px solid var(--line);
    border-radius: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.home-hero::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.3; }
    100% { transform: scale(1); opacity: 1; }
}

.home-nav, .home-logo {
    display: none; /* Removed for minimalism, handled by main header */
}

.hero-title-back {
    margin: 0;
    font-size: clamp(48px, 8vw, 90px);
    line-height: 1;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
    margin-bottom: 16px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.hero-copy {
    max-width: 500px;
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-product {
    display: none; /* hide SVG illustration for photo background */
}

.hero-side-note {
    font-size: 14px;
    border-left: 2px solid var(--accent);
    padding-left: 16px;
    margin-bottom: 24px;
}

.hero-bottom {
    display: flex;
    gap: 16px;
    align-items: center;
}

.button, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    transition: background 0.2s, transform 0.1s;
}

.button:hover, button:hover, input[type="submit"]:hover {
    background: var(--text);
}

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

.button.ghost-button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    clip-path: none;
    border-radius: 2px;
}

.button.ghost-button:hover {
    background: rgba(170, 202, 96, 0.1);
}

.home-store {
    padding: 40px;
    border-radius: 4px;
    background: repeating-linear-gradient(45deg, rgba(20,28,20,0.4), rgba(20,28,20,0.4) 10px, rgba(26,36,26,0.4) 10px, rgba(26,36,26,0.4) 20px);
    border: 1px solid var(--line);
}

.home-store-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
}

.home-store-title {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    color: var(--accent);
}

.circle-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.circle-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    transition: border-color 0.2s;
}

.circle-link:hover {
    border-color: var(--accent);
}

.circle-link img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s;
}

.circle-link:hover img {
    filter: grayscale(0%);
}

.circle-link span {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.info-tile {
    padding: 30px;
    background: var(--bg-soft);
    border: 1px dashed var(--line);
    position: relative;
    border-radius: 2px;
    transition: border-color 0.2s;
}

.info-tile:hover {
    border-style: solid;
    border-color: var(--accent);
}

.info-tile::before {
    content: '[ DATA_MODULE ]';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 10px;
    color: var(--muted);
    font-family: monospace;
}

.info-tile h3 {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    margin: 0 0 10px 0;
}

.info-tile p {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 8px;
    font-family: monospace;
    font-weight: 600;
}

.feature-hero {
    margin-top: 28px;
    padding: 36px;
    border-radius: 4px;
}

.hero-media,
.feature-media,
.card-media,
.post-media {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2px;
    border: 1px solid var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.feature-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: center;
}

h1, h2, h3 {
    margin: 0 0 12px;
    line-height: 1.1;
}

.card,
.stat-card,
.post-card,
.contact-card,
.auth-card,
.table-wrap,
.empty-state,
.blog-post {
    border-radius: 4px;
    padding: 24px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
}

.post-media {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin-bottom: 20px;
    filter: sepia(0.3) saturate(0.5) hue-rotate(60deg);
}

.admin-mode .editable-image-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.admin-mode .editable-image-trigger {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-mode .editable-image-wrap:hover .editable-image-trigger,
.admin-mode .editable-image-wrap:focus-within .editable-image-trigger {
    opacity: 1;
    pointer-events: auto;
}

.admin-mode .editable-image-trigger {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(13, 18, 13, 0.9);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
}

.admin-mode .editable-image-trigger:hover {
    background: var(--accent);
    color: #0d120d;
}

.admin-mode .editable-image-trigger:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.crop-box {
    position: absolute;
    inset: auto auto auto auto;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25);
    cursor: move;
    touch-action: none;
}

.crop-box::before,
.crop-box::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.crop-box::after {
    inset: auto 12px 12px auto;
    width: 110px;
    height: auto;
    border: none;
}

.crop-box-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    background: rgba(13, 18, 13, 0.85);
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.media-library {
    display: grid;
    gap: 18px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.media-item {
    display: grid;
    gap: 12px;
    padding: 18px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.media-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--accent);
}

.media-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.media-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-card h3 {
    font-size: 18px;
    margin: 8px 0;
}

.text-link {
    color: var(--accent);
    font-family: monospace;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    margin-top: auto;
}

.text-link::before {
    content: '> ';
}

.site-footer {
    display: flex;
    justify-content: space-between;
    padding: 24px;
    margin-top: 40px;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--accent);
    border-radius: 0;
}

/* Base elements */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

th {
    color: var(--accent);
    font-family: monospace;
    text-transform: uppercase;
}

input, textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 12px;
    font-family: inherit;
    width: 100%;
    border-radius: 2px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stats-grid, .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2, .contact-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

.list-clean {
    padding-left: 20px;
}

@media (max-width: 900px) {
    .home-grid, .posts-grid, .circle-links, .admin-grid, .feature-hero-grid, .grid-2, .grid-3, .stats-grid, .contact-layout {
        grid-template-columns: 1fr;
    }
    .site-nav {
        display: none;
    }
    .hero-title-back {
        font-size: 40px;
    }
    .hero-copy {
        grid-template-columns: 1fr;
    }
}
