/* ============================================
   W7 — STREET / PURPLE-BLACK EDITION
   ดำ-ม่วง · ฟอนต์ขาว · ขอบหนา · เงาแข็ง
   ============================================ */

:root {
    --ink:    #ffffff; /* ฟอนต์สีขาว */
    --paper:  #0a0a0a; /* พื้นหลังสีดำสนิท */
    --muted:  #a3a3a3; /* สีเทาสำหรับข้อความรอง */
    --line:   #9d4edd; /* สีม่วงสตรีท สำหรับเส้นขอบและเงา */
    --wash:   #1a1a1a; /* พื้นหลังฟอร์มสีดำหม่น */
    --danger: #ff0055; /* สีแดงอมชมพูสำหรับปุ่มอันตราย/ปุ่มลบ */
}

* { box-sizing: border-box; }

body {
    font-family: "Courier New", "DM Mono", ui-monospace, monospace;
    background-color: var(--paper);
    
    /* ลบเส้นขีดออก และใส่ภาพพื้นหลังแทน + ทำให้จางด้วย linear-gradient สีดำโปร่งแสง 88% */
    background-image: 
        linear-gradient(rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.88)), 
        url(''); /* <-- เปลี่ยนชื่อไฟล์ตรงนี้เป็นรูปลายการ์ตูนของคุณ */
        
    background-repeat: repeat; /* ให้ลายซ้อนต่อกัน (Pattern) */
    background-size: 250px; /* ขนาดของลายการ์ตูน (ปรับเพิ่ม-ลดได้) */
    background-position: center;
    background-attachment: fixed; /* ให้พื้นหลังอยู่กับที่ตอนเลื่อนจอ */
    
    color: var(--ink);
    margin: 0;
    padding: 32px 16px;
    line-height: 1.55;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* ---------- HEADINGS ---------- */
h1, h2, h3 {
    font-weight: 900;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    margin: 0 0 18px;
}

h1 {
    font-size: 30px;
    border-bottom: 6px solid var(--line);
    padding-bottom: 10px;
}

h1::before {
    content: "// ";
    color: var(--line);
}

/* ---------- LIST ---------- */
.list {
    border: 3px solid var(--line);
    background: var(--paper);
    box-shadow: 8px 8px 0 var(--line); /* เงาสีม่วง */
}

.row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 2px solid var(--line);
    background: var(--paper);
    transition: background .12s ease, transform .12s ease;
}

.row:last-child { border-bottom: none; }

.row:hover {
    background: var(--line); /* ชี้แล้วพื้นเป็นสีม่วง */
    color: var(--ink);
    transform: translateX(4px);
}

.row:hover .id,
.row:hover .sub { color: var(--ink); }

.row:hover .pic { border-color: var(--ink); }

.id {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    min-width: 54px;
    letter-spacing: 1px;
}

.id::before { content: "#"; }

.info { flex: 1; min-width: 0; }

.name {
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.sub {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .5px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ---------- IMAGE ---------- */
.pic {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 3px solid var(--line);
    /* ทำภาพให้เป็นขาวดำแต่แรก */
    filter: grayscale(100%) contrast(125%);
    transition: filter .15s ease;
}

/* เมาส์ชี้แล้วภาพกลับมามีสี */
.pic:hover { filter: grayscale(0%) contrast(100%); }

/* ---------- BUTTONS ---------- */
a.btn, button, input[type="submit"] {
    display: inline-block;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    padding: 9px 16px;
    background: var(--line);
    color: var(--ink);
    border: 3px solid var(--line);
    box-shadow: 4px 4px 0 var(--muted);
    cursor: pointer;
    transition: transform .1s ease, box-shadow .1s ease;
}

a.btn:hover, button:hover, input[type="submit"]:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--muted);
}

a.btn:active, button:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 var(--muted);
}

/* ปุ่มรอง */
.btn-gray, .btn-secondary {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--muted);
}

/* ปุ่มลบ ลายทางเตือน */
.btn-danger, .btn-red {
    background: repeating-linear-gradient(
        45deg,
        var(--danger) 0 8px,
        var(--paper) 8px 16px
    );
    color: var(--ink);
    border-color: var(--danger);
    text-shadow: 1px 1px 0 var(--paper), -1px -1px 0 var(--paper);
}

/* ---------- FORM ---------- */
.form {
    border: 3px solid var(--line);
    background: var(--paper);
    padding: 24px;
    box-shadow: 8px 8px 0 var(--line);
    max-width: 560px;
}

.field { margin-bottom: 20px; }

.field label {
    display: block;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    color: var(--line);
}

.field label::after {
    content: " ▸";
    color: var(--muted);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="email"],
.field input[type="file"],
.field textarea,
.field select {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 12px;
    background: var(--wash);
    color: var(--ink);
    border: 3px solid var(--line);
    outline: none;
    transition: background .12s ease, box-shadow .12s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--line);
}

.field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--line) 50%),
                      linear-gradient(135deg, var(--line) 50%, transparent 50%);
    background-position: calc(100% - 18px) center, calc(100% - 12px) center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

/* ---------- CHOICES ---------- */
.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choices label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 14px;
    border: 3px solid var(--line);
    background: var(--paper);
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

.choices label::after { content: none; }

.choices label:hover {
    background: var(--line);
    color: var(--ink);
}

.choices input[type="radio"],
.choices input[type="checkbox"] {
    accent-color: var(--line);
    width: 15px;
    height: 15px;
    margin: 0;
}

/* ---------- EMPTY STATE ---------- */
.empty {
    padding: 40px 16px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--line);
}

.empty::before { content: "[ "; }
.empty::after  { content: " ]"; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    body { padding: 20px 12px; }
    h1 { font-size: 22px; }

    .row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .actions { width: 100%; }
    a.btn, button { flex: 1; text-align: center; }

    .list, .form { box-shadow: 5px 5px 0 var(--line); }
}