@import url('../tokens.css');

body {
    font-family: 'M PLUS 1p', 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
    color: #333;
}

h2 {
    color: #3200FF;
    position: relative;
    padding-left: 15px;
    font-size: 20px;
    margin: 10px 0 14px;
}
h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 100%;
    background-color: #3200FF;
}

.banner {
    background-color: #3200FF;
    color: white;
    text-align: left;
    padding: 0 var(--space-page-x);
    height: 56px;
    display: flex;
    align-items: center;
    font-size: 18px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}
.banner_title_phone { display: none; }

.back-button {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: #3200FF;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: 1px solid #3200FF;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}
.back-button:hover { background-color: #3200FF; color: white; }

.selector-container {
    padding: 20px var(--space-page-x);
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.card-selectors {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.card-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
    flex: 1;
}
.card-selector label {
    font-weight: bold;
    font-size: 14px;
    color: #3200FF;
}
.combobox {
    position: relative;
}
.combo-input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}
.combo-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.combo-group {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #888;
    background: #f5f5f5;
    position: sticky;
    top: 0;
}
.combo-option {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}
.combo-option:hover, .combo-option.selected, .combo-option.keyboard-focused {
    background: #e8f0fe;
}
.combo-option.data-incomplete::after {
    content: ' ⚠';
    color: #cc7700;
    font-weight: bold;
}

.compare-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.copy-url-btn {
    background: #3200FF;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.copy-url-btn:hover { background: var(--color-primary-dark); }
.copy-url-msg {
    font-size: 12px;
    color: #2a9d2a;
    font-weight: bold;
}

.compare-result {
    padding: 20px var(--space-page-x);
    overflow-x: auto;
    background-color: #fff;
    box-shadow: 0 4px 14px rgba(50, 0, 255, 0.08);
}

.hint {
    color: #888;
    font-size: 15px;
    text-align: center;
    margin-top: 40px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}
.compare-table th,
.compare-table td {
    border-bottom: 1px solid #eee;
    padding: 10px 12px;
    font-size: 14px;
    vertical-align: top;
    text-align: center;
    min-width: 160px;
}
.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
    border-left: 1px solid #eee;
}
.compare-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
    white-space: nowrap;
}
.compare-table thead th {
    text-align: center;
    background: linear-gradient(180deg, #4a1fff, #3200FF);
    color: white;
    padding: 14px 12px;
    border-bottom: none;
}
.compare-table thead th a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
.compare-table thead th a:hover { text-decoration: underline; }
.compare-table td.yell-cell { vertical-align: middle; }
.yell-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.yell-icon { height: 32px; }
.compare-incomplete-notice {
    margin-top: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #ffe08a;
    white-space: normal;
}

.section-header td {
    background-color: #e8e8ff;
    color: #3200FF;
    font-weight: bold;
    text-align: left;
    font-size: 13px;
    padding: 6px 12px;
}

.stat-best {
    background-color: #fff9c4;
    font-weight: bold;
}

.skill-row td {
    text-align: left;
    line-height: 1.6;
}
.skill-effect {
    font-size: 13px;
    color: #555;
}

.card-icon {
    width: 72px;
    display: block;
    margin: 0 auto 6px;
}

#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3200FF;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    display: none;
    border-radius: var(--radius-sm);
}
#scrollToTopBtn:hover { background-color: var(--color-primary-dark); }

@media screen and (max-width: 768px) {
    .banner { padding: 0 15px; height: 44px; }
    .banner_title { display: none; }
    .banner_title_phone { display: block; }
    .back-button { display: none; }
    .selector-container { padding: 16px var(--space-page-x-mobile); }
    .card-selectors { gap: 12px; }
    .card-selector { min-width: 100%; }
    .compare-result { padding: var(--space-page-x-mobile); }
    .compare-table th,
    .compare-table td { font-size: 12px; padding: 7px 8px; min-width: 90px; }
    .compare-table th:first-child,
    .compare-table thead th:first-child { min-width: 70px; max-width: 100px; }
    .yell-name { display: none; }
    #scrollToTopBtn { padding: 10px 16px; }
}
