:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-sub: #aaaaaa;
    --accent: #ff5252;
    --success: #00e676;
    --border: #333;
    --table-header: #2c2c2c;
    --link: #448aff;
    --link-btn: #448aff;
}

body {
    font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    line-height: 1.6;
}

/* Advisory Page (Default Body) */
body:not(.scanner-body) {
    padding: 40px 20px;
}

/* Scanner Page Body */
body.scanner-body {
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    font-family: 'Segoe UI', monospace, sans-serif;
}

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

body.scanner-body .container {
    max-width: 800px;
}

/* Header */
.header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content h1 {
    margin: 0 0 10px 0;
    color: var(--accent);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-content p {
    margin: 5px 0 0 0;
    color: #888;
}

.header-meta {
    color: var(--text-sub);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-meta>span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    background: #333;
    color: #fff;
}

.badge-cve {
    background: var(--accent);
    color: white;
}

.badge-score {
    background: #d32f2f;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border: 1px solid #ff5252;
}

.badge-info {
    background: #333;
    color: white;
    border: 1px solid #555;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

body.scanner-body .card {
    padding: 25px;
}

h2 {
    margin-top: 0;
    font-size: 20px;
    color: #fff;
    border-left: 4px solid var(--link);
    padding-left: 12px;
    margin-bottom: 20px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

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

th {
    background-color: var(--table-header);
    color: #fff;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #252525;
}

tr:hover {
    background-color: #2a2a2a;
}

.ver-vuln {
    color: var(--accent);
    font-family: 'Consolas', monospace;
}

.ver-fixed {
    color: var(--success);
    font-family: 'Consolas', monospace;
    font-weight: bold;
}

.product-name {
    font-weight: bold;
    color: #fff;
}

/* Lists */
ul {
    padding-left: 20px;
    color: var(--text-sub);
}

li {
    margin-bottom: 8px;
}

/* Links */
a {
    color: var(--link);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: #82b1ff;
    text-decoration: underline;
}

/* Buttons */
.btn-scanner,
.btn-advisory {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}

.btn-scanner:hover {
    background-color: #d32f2f;
    text-decoration: none;
}

.btn-advisory {
    background-color: var(--card-bg);
    padding: 10px 15px;
    white-space: nowrap;
}

.btn-advisory:hover {
    background-color: #2962ff;
}

/* Footer */
.footer {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 50px;
}

/* Scanner Specifics */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #aaa;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    background: #2c2c2c;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
    font-family: 'Consolas', monospace;
    font-size: 16px;
    box-sizing: border-box;
}

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

button {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    filter: brightness(1.1);
}

button:disabled {
    background: #555;
    cursor: not-allowed;
}

.console {
    margin-top: 30px;
    margin-bottom: 30px;
    background: #000;
    border: 1px solid #333;
    border-radius: 5px;
    overflow: hidden;
}

.console-header {
    background: #333;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.console-body {
    padding: 20px;
    min-height: 200px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    color: #00ff00;
    font-size: 14px;
    line-height: 1.5;
}

.log-error {
    color: #ff5252;
}

.log-warn {
    color: #ffab40;
}

.log-info {
    color: #40c4ff;
}

.log-success {
    color: #00e676;
    font-weight: bold;
}

.cors-alert {
    background: #2a1a1a;
    border: 1px solid #ff5252;
    color: #ffcccc;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.mobile-modal {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 0 30px rgba(255, 82, 82, 0.2);
}

.mobile-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.mobile-title {
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.mobile-desc {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.mobile-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s;
}

.mobile-close:hover {
    color: #fff;
}

/* [추가] 모바일 반응형 스타일 (화면 너비 800px 이하일 때 적용) */
@media (max-width: 800px) {
    .header {
        /* 헤더 전체를 수직 방향으로 변경 (제목 영역 위, 버튼 아래) */
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .header-meta {
        /* 메타 정보(날짜, CVE-ID, CVSS)를 수직으로 나열 */
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 10px;
    }

    .header-meta>span {
        /* 각 항목이 꽉 차보이지 않게 여유를 줌 */
        width: 100%;
    }

    .btn-scanner {
        /* 스캐너 버튼을 모바일 너비에 맞춰 꽉 채움 */
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .header-content h1 {
        font-size: 22px;
        /* 모바일에서 제목 크기 약간 축소 */
    }

    .container {
        padding: 10px;
        /* 좌우 여백 축소 */
    }
}

/* Bookmarklet Styles */
.bookmark-btn {
    background-color: var(--accent);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(255, 82, 82, 0.3);
    border: 2px dashed #fff;
    cursor: move;
    display: inline-block;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s;
}

.bookmark-btn:hover {
    background-color: #d32f2f;
    color: white;
}

.section-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #fff;
    border-left: 4px solid var(--accent);
    padding-left: 10px;
}