@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');

* {
    font-family: "Oswald", sans-serif;
    box-sizing: border-box;
}

/* =========================
   GLOBAL
========================= */

html {
    font-size: clamp(14px, 1.2vw, 18px);
}

body {
    font-size: 18px;
    line-height: 1.7;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================
   PROFILE PHOTO
========================= */

#Photo {
    width: 150px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 8%;
    border: 2px solid black;
}

/* =========================
   TABLE BASE
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-color: black;
}

/* Scroll container */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

/* Test table */
.test-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px; /* ป้องกัน layout พัง */
    table-layout: auto;
}

/* Header */
.test-table th {
    background: #d9d9d9;
    font-weight: bold;
    text-align: center;
}

/* Cells */
.test-table th,
.test-table td {
    border: 1px solid #999;
    padding: 10px;
    vertical-align: top;
    font-size: 14px;
    white-space: normal;
    word-break: break-word;
}

/* Column min width */
.test-table th:nth-child(1),
.test-table td:nth-child(1) { min-width: 80px; }

.test-table th:nth-child(2),
.test-table td:nth-child(2) { min-width: 280px; }

.test-table th:nth-child(3),
.test-table td:nth-child(3) { min-width: 160px; }

.test-table th:nth-child(4),
.test-table td:nth-child(4) { min-width: 280px; }

.test-table th:nth-child(5),
.test-table td:nth-child(5) { min-width: 220px; }

.test-table th:nth-child(6),
.test-table td:nth-child(6) { min-width: 420px; }

/* Section row */
.section-row td {
    background: #eef2f7;
    font-weight: bold;
}

/* =========================
   COVER
========================= */

.cover {
    min-height: 40vh;
    color: rgb(0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.cover h1 {
    font-size: clamp(32px, 6vw, 56px);
    margin-bottom: 15px;
}

.cover p {
    font-size: clamp(16px, 3vw, 22px);
}

/* =========================
   SECTIONS
========================= */

.section {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    padding: clamp(20px, 5vw, 40px) 20px;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 15px;
    border-left: 6px solid #000000;
    padding-left: 12px;
}

/* Content box */
.box {
    background: #ffffff;
    padding: clamp(20px, 4vw, 30px);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    min-height: 120px;
    font-size: 18px;
    overflow-x: auto;
}

.box .Profile_Text_Base #ProgrammingLanguage {
    padding-top: 1%;
    padding-left: 4%;
    font-size: 30px;
}

.box .Profile_Text_Base #LanguageLogo {
    margin-right: 1%;
    margin-top: 1%;
    width: 40px;
}

.box .Profile_Text_Base .CodeLogo {
    padding-left: 4%;
}

/* =========================
   LINK
========================= */

.link-box a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
}

/* =========================
   BUG REPORT
========================= */

.bug-box {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.bug-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bug-header h3 {
    margin: 0;
}

/* Badges */
.bug-badges span {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 10px;
    color: #fff;
}

.severity.high { background: #e74c3c; }
.priority.medium { background: #f39c12; }

/* Environment grid */
.bug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Section */
.bug-section {
    margin-top: 20px;
}

.bug-section h4 {
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
    padding-left: 8px;
}

/* Image placeholder */
.image-placeholder {
    margin-top: 10px;
    height: 150px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    background: #fafafa;
}

/* =========================
   PRE FIX (Responsive)
========================= */

pre {
    white-space: pre;
    overflow-x: auto;
    max-width: 100%;
    font-size: clamp(13px, 1vw, 16px);
    line-height: 1.5;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    body {
        font-size: 16px;
    }

    .section h2 {
        font-size: 24px;
    }

    .bug-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bug-badges span {
        margin-left: 0;
        margin-right: 8px;
        margin-top: 5px;
    }

    .test-table th,
    .test-table td {
        font-size: 13px;
        padding: 8px;
    }

}