/*
Theme Name: LinkDir
Description: Simple hardlinked image and text link directory with widget support.
Version: 1.0
Text Domain: linkdir
*/

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

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

a { color: #e0e0e0; text-decoration: none; }
a:hover { color: #ff2222; }

/* ── HEADER ── */
#site-header {
    background: #111;
    border-bottom: 2px solid #cc0000;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#site-header .site-title a {
    color: #ff2222;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── MAIN ── */
#main-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
}

/* ── WIDGET AREAS ── */
.widget-area {
    margin-bottom: 30px;
}

/* ── LINK GRID WIDGET ── */
/* Users paste raw HTML into a Custom HTML widget using this structure */
.link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.link-item a {
    display: block;
    background: #151515;
    border: 1px solid #222;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}

.link-item a:hover {
    border-color: #cc0000;
    transform: translateY(-2px);
}

.link-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.link-item .link-label {
    padding: 7px 10px;
    border-top: 1px solid #1e1e1e;
}

.link-item .link-title {
    font-size: 14px;
    font-weight: 600;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-item a:hover .link-title { color: #fff; }

.link-item .link-domain {
    font-size: 11px;
    color: #cc0000;
    margin-top: 2px;
}

/* ── FOOTER ── */
#site-footer {
    background: #0d0d0d;
    border-top: 2px solid #cc0000;
    padding: 18px 20px;
    text-align: center;
    font-size: 12px;
    color: #444;
    margin-top: 30px;
}

#site-footer a { color: #666; margin: 0 10px; }
#site-footer a:hover { color: #cc0000; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
    .link-grid { grid-template-columns: repeat(2, 1fr); }
}
