* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}

.header {
    background: radial-gradient(circle at top right, #1f3f8f 0%, #111827 46%, #0b1020 100%);
    color: #f8fafc;
    padding: 34px 30px 28px;
    text-align: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header h1 {
    font-size: 2.1em;
    margin-bottom: 12px;
    letter-spacing: 0.01em;
    text-shadow: 0 6px 24px rgba(10, 15, 30, 0.45);
}

.header p {
    opacity: 0.92;
    font-size: 0.98em;
    color: #cbd5e1;
}

.header-divider {
    color: #64748b;
    margin: 0 6px;
}

.header-version {
    margin-top: 12px;
    font-size: 0.82em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;
}

.alpha-badge {
    display: inline-block;
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 60%, #6366f1 100%);
    color: #f8fafc;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.65em;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: 10px;
    border: 1px solid rgba(191, 219, 254, 0.35);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
    vertical-align: middle;
}

.content {
    padding: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 24px;
    background: #e0e0e0;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab:hover:not(.active) {
    background: #ccc;
}

.tab-content {
    display: none;
    padding: 20px;
    border: 2px solid #667eea;
    border-radius: 0 12px 12px 12px;
    background: #fafafa;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    font-weight: 600;
}

.subsection-title {
    font-size: 1em;
    color: #764ba2;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.input-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.input-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.85em;
}

input, select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    margin: 0;
    font-size: 0.9em;
}

.pal-effect {
    font-size: 0.8em;
    color: #666;
    margin-left: 5px;
}

.pal-rarity-group {
    margin-bottom: 18px;
}

.pal-rarity-title {
    margin-top: 0;
}

.pal-card {
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pal-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.pal-card-header {
    margin-bottom: 0;
    background: transparent;
    border-radius: 0;
}

.pal-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #ddd;
    flex: 0 0 auto;
}

.pal-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: 700;
    color: #667eea;
}

.pal-rarity-badge,
.pal-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    white-space: nowrap;
}

.pal-rarity-immortal {
    background: #f3e8ff;
    color: #7b2cbf;
}

.pal-rarity-legendary {
    background: #fff3cd;
    color: #8a5a00;
}

.pal-rarity-epic {
    background: #e8f4fd;
    color: #0d47a1;
}

.pal-status-implemented {
    background: #e8f9ed;
    color: #2b8a3e;
}

.pal-status-pending {
    background: #fff4e6;
    color: #d9480f;
}

.pal-description {
    padding: 0 12px 6px 12px;
    color: #4a4a4a;
    font-size: 0.88em;
    line-height: 1.45;
}

.pal-status-line {
    padding: 0 12px 10px 12px;
    color: #666;
    font-size: 0.78em;
}

/* ====== ARTIFACTS (cards) ====== */
.artifact-rarity-group {
    margin-bottom: 18px;
}

.artifact-rarity-title {
    margin-top: 0;
}

.artifact-card {
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.artifact-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

.artifact-card-header {
    margin-bottom: 0;
    background: transparent;
    border-radius: 0;
}

.artifact-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #ddd;
    flex: 0 0 auto;
}

.artifact-icon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    font-weight: 700;
    color: #667eea;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
}

.artifact-rarity-badge,
.artifact-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    white-space: nowrap;
}

.artifact-rarity-immortal {
    background: #f3e8ff;
    color: #7b2cbf;
}

.artifact-rarity-legendary {
    background: #fff3cd;
    color: #8a5a00;
}

.artifact-rarity-epic {
    background: #e8f4fd;
    color: #0d47a1;
}

.artifact-status-implemented {
    background: #e8f9ed;
    color: #2b8a3e;
}

.artifact-status-pending {
    background: #fff4e6;
    color: #d9480f;
}

.artifact-description {
    padding: 0 12px 6px 12px;
    color: #4a4a4a;
    font-size: 0.88em;
    line-height: 1.45;
}

.artifact-sim-note {
    margin: 0 12px 8px 12px;
    padding: 8px 10px;
    border-left: 3px solid #5c6bc0;
    background: #f5f6ff;
    color: #3d4a8f;
    font-size: 0.8em;
    line-height: 1.4;
}

.artifact-status-line {
    padding: 0 12px 10px 12px;
    color: #666;
    font-size: 0.78em;
}

/* ====== STAR HEROES ====== */
.star-hero-row-main {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.star-hero-row-support {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.star-hero-slot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.star-hero-slot-title {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}

.star-hero-slot-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed #c8c8c8;
    border-radius: 14px;
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    max-width: 320px;
    width: 100%;
    text-align: center;
}

.star-hero-row-main .star-hero-slot-btn {
    max-width: 420px;
}

.star-hero-row-support .star-hero-slot-btn {
    max-width: 340px;
}

.star-hero-slot-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.12);
}

.star-hero-slot-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8e8e8;
}

.star-hero-row-main .star-hero-slot-img {
    width: 140px;
    height: 140px;
}

.star-hero-slot-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    background: linear-gradient(145deg, #eee, #f7f7f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #aaa;
    font-weight: 300;
}

.star-hero-row-main .star-hero-slot-placeholder {
    width: 140px;
    height: 140px;
}

.star-hero-slot-name {
    font-weight: 700;
    font-size: 0.9em;
    color: #222;
    line-height: 1.25;
}

.star-hero-slot-meta {
    width: 100%;
    font-size: 0.82em;
    line-height: 1.5;
    color: #444;
}

.star-hero-slot-hint {
    color: #888;
    font-style: italic;
}

.star-hero-skill-desc {
    margin-bottom: 8px;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

.star-hero-level-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.star-hero-level-label {
    font-size: 0.75em;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.star-hero-level-select {
    min-width: 132px;
    border: 1px solid #d6dae3;
    border-radius: 8px;
    padding: 9px 14px;
    background: #fff;
    color: #222;
    font-size: 0.95em;
    font-weight: 600;
    min-height: 40px;
}

.star-hero-level-select:disabled {
    background: #f1f3f5;
    color: #6c757d;
    cursor: default;
}

.star-hero-skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.star-hero-cost-pill {
    font-size: 0.72em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef0f4;
    color: #333;
}

.star-hero-skill-type {
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.star-hero-type-active {
    background: #e03131;
}

.star-hero-type-passive {
    background: #1c7ed6;
}

.star-hero-type-shield {
    background: #f59f00;
    color: #1a1a1a;
}

.star-hero-type-none {
    background: #868e96;
}

.star-hero-validation-host {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f4f5f7;
    border: 1px solid #e2e3e8;
    font-size: 0.82em;
    line-height: 1.45;
}

.star-hero-cost-line {
    margin-bottom: 6px;
    color: #333;
}

.star-hero-validation-msg {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff5f5;
    border-left: 4px solid #fa5252;
    color: #c92a2a;
}

.star-hero-validation-ok {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ebfbee;
    border-left: 4px solid #37b24d;
    color: #2b8a3e;
}

.star-hero-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(15, 18, 28, 0.55);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.star-hero-modal.is-open {
    display: flex;
}

.star-hero-modal-panel {
    background: #fff;
    border-radius: 16px;
    max-width: min(960px, 100%);
    max-height: min(88vh, 900px);
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.star-hero-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #ececf1;
}

.star-hero-modal-title {
    font-weight: 800;
    font-size: 1.05em;
}

.star-hero-modal-close {
    border: none;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 8px;
}

.star-hero-modal-close:hover {
    background: #f1f3f5;
    color: #111;
}

.star-hero-modal-clear {
    margin: 10px 18px 0;
    align-self: flex-start;
}

.star-hero-modal-scroll {
    overflow-y: auto;
    padding: 14px 18px 18px;
    flex: 1;
}

.star-hero-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.star-hero-pick-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    text-align: center;
}

.star-hero-pick-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.18);
    transform: translateY(-2px);
}

.star-hero-pick-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eee;
}

.star-hero-pick-fallback {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ccc;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.star-hero-pick-name {
    font-size: 0.8em;
    font-weight: 700;
    color: #222;
    line-height: 1.25;
}

.pal-editor {
    border-top: 1px solid #e3e3e3;
    background: #fbfbff;
    padding: 12px;
}

.pal-editor-note {
    font-size: 0.8em;
    color: #5f5f5f;
    margin-bottom: 10px;
}

.pal-stats-grid {
    margin-bottom: 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #e94560 0%, #0f3460 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-outline {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
}

.btn-success {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #000;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}

.import-export-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 8px;
}

.import-export-row input[type="file"] {
    display: none;
}

/* OCR Import Styles */
.ocr-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e8ff 100%);
    border-radius: 12px;
    border: 2px dashed #667eea;
}

.ocr-section.collapsed {
    padding: 15px;
    background: #f5f5f5;
}

.ocr-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ocr-title::before {
    content: 'Import';
}

.ocr-title::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s;
}

.ocr-section.collapsed .ocr-title::after {
    transform: rotate(-90deg);
}

.ocr-content {
    display: block;
}

.ocr-section.collapsed .ocr-content {
    display: none;
}

.ocr-mode-select {
    margin-bottom: 15px;
}

.ocr-mode-select label {
    margin-right: 20px;
    cursor: pointer;
}

.upload-zones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.upload-zone {
    border: 2px dashed #aaa;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-zone.has-file {
    border-color: #51cf66;
    background: #e8f9ed;
}

.upload-zone.processing {
    border-color: #ffc107;
    background: #fff8e1;
}

.upload-zone input {
    display: none;
}

.upload-zone .icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.upload-zone .label {
    font-size: 0.75em;
    color: #666;
}

.upload-zone .status {
    font-size: 0.7em;
    margin-top: 5px;
    color: #888;
}

.upload-zone.has-file .status {
    color: #37b24d;
}

.ocr-progress {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 15px 0;
    display: none;
}

.ocr-progress.active {
    display: block;
}

.ocr-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75em;
    font-weight: bold;
}

.ocr-status {
    font-size: 0.85em;
    color: #666;
    margin: 10px 0;
    text-align: center;
}

.ocr-results {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.8em;
    display: none;
}

.ocr-results.active {
    display: block;
}

.ocr-results h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.ocr-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid #eee;
}

.ocr-stat-row:last-child {
    border-bottom: none;
}

.ocr-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ocr-review-panel {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.ocr-review-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .ocr-review-columns {
        grid-template-columns: 1fr;
    }
}

.ocr-review-column {
    background: white;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.ocr-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin: 4px 0;
    border-radius: 4px;
    font-size: 0.85em;
}

.ocr-stat-item.confident {
    background: #e8f9ed;
    border-left: 3px solid #51cf66;
}

.ocr-stat-item.warning {
    background: #fff8e1;
    border-left: 3px solid #ffc107;
}

.ocr-stat-item.error {
    background: #ffe8e8;
    border-left: 3px solid #e94560;
}

.ocr-stat-item .stat-name {
    font-weight: 500;
    color: #333;
}

.ocr-stat-item .stat-value {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ocr-stat-item .stat-value input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    text-align: right;
}

.ocr-stat-item.warning .stat-value input {
    border-color: #ffc107;
}

.ocr-stat-item.error .stat-value input {
    border-color: #e94560;
}

.results-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    color: white;
}

.results-section h3 {
    color: #e94560;
    margin-bottom: 20px;
    text-align: center;
}

.battle-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.fighter-card {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.fighter-card h4 {
    color: #ffc107;
    margin-bottom: 10px;
}

.hp-bar {
    background: #333;
    border-radius: 10px;
    height: 25px;
    overflow: hidden;
    margin: 10px 0;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8em;
}

.hp-fill.enemy {
    background: linear-gradient(90deg, #e94560, #ff6b6b);
}

.vs-badge {
    font-size: 2em;
    color: #e94560;
    font-weight: bold;
}

.graph-container {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.graph-container h4 {
    color: #ffc107;
    margin-bottom: 15px;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.battle-log {
    background: #000;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.85em;
    line-height: 1.6;
}

.battle-log .damage { color: #ff6b6b; }
.battle-log .heal { color: #51cf66; }
.battle-log .crit { color: #ffd43b; }
.battle-log .skill { color: #74c0fc; }
.battle-log .buff { color: #20c997; }
.battle-log .debuff { color: #ffa94d; }
.battle-log .stack { color: #e599f7; }
.battle-log .guardian { color: #f59f00; }
.battle-log .abnormal { color: #ffffff; }
.battle-log .time { color: #868e96; }

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-card .value {
    font-size: 1.3em;
    color: #ffc107;
    font-weight: bold;
}

.stat-card .label {
    font-size: 0.8em;
    color: #aaa;
}

.info-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.9em;
    color: #856404;
}

.info-box.info {
    background: #e8f4fd;
    border-color: #2196F3;
    color: #0d47a1;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
    }
    .battle-display {
        grid-template-columns: 1fr;
    }
    .vs-badge {
        font-size: 1.5em;
    }
    .pal-card-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

.collapsible {
    cursor: pointer;
    user-select: none;
}

.collapsible::before {
    content: '▼ ';
    font-size: 0.8em;
}

.collapsible.collapsed::before {
    content: '▶ ';
}

.collapse-content {
    overflow: hidden;
    transition: max-height 0.3s;
}

.collapse-content.collapsed {
    max-height: 0 !important;
}

.hidden { display: none !important; }
