/* ================================
   가이드 스타일 - 블랙 모던 테마
================================ */

/* 가이드 페이지 컨테이너 */
.guide-container {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-container h2 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* 가이드 콘텐츠 */
.guide-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 가이드 섹션 */
.guide-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.guide-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.guide-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

.guide-section-title .section-icon {
    font-size: 1.8rem;
}

/* 가이드 테이블 */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.guide-table th,
.guide-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guide-table th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.guide-table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.guide-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.guide-table tr:last-child td {
    border-bottom: none;
}

/* 가이드 리스트 */
.guide-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.guide-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--gold-primary);
}

.guide-list-item .item-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
}

.guide-list-item .item-value {
    color: var(--text-secondary);
    flex: 1;
}

/* 가이드 그리드 (2열) */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.guide-grid-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-grid-item .grid-label {
    font-weight: 600;
    color: var(--gold-primary);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.guide-grid-item .grid-value {
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* 타입 상성표 스타일 (개선된 버전) */
.type-chart-container {
    overflow-x: auto;
    margin-top: 12px;
    -webkit-overflow-scrolling: touch;
}

.type-chart-wrapper {
    position: relative;
}

.type-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-color.type-effective {
    background: rgba(0, 255, 136, 0.4);
    border-color: #00ff88;
}

.legend-color.type-normal {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.legend-color.type-resist {
    background: rgba(255, 51, 102, 0.4);
    border-color: #ff3366;
}

.legend-color.type-immune {
    background: rgba(100, 100, 100, 0.4);
    border-color: #666;
}

.type-chart-table-improved {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 2px;
    font-size: 0.9rem;
}

.type-chart-table-improved th,
.type-chart-table-improved td {
    padding: 10px 8px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.type-chart-table-improved th {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold-primary);
    font-weight: 700;
    position: sticky;
    z-index: 1;
    border: 2px solid rgba(212, 175, 55, 0.4);
    font-size: 0.85rem;
}

.type-chart-table-improved th.chart-corner {
    position: sticky;
    left: 0;
    z-index: 3;
    background: rgba(212, 175, 55, 0.3);
    border: 2px solid var(--gold-primary);
}

.type-chart-table-improved th.type-header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-width: 60px;
}

.type-chart-table-improved th.type-header:first-of-type {
    position: sticky;
    left: 0;
    z-index: 3;
}

.type-chart-table-improved td {
    min-width: 50px;
    font-weight: 600;
    cursor: help;
}

.type-chart-table-improved td.type-normal {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.type-chart-table-improved td.type-normal:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1);
    z-index: 10;
    position: relative;
}

.type-chart-table-improved td.type-effective {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.25), rgba(0, 255, 136, 0.15));
    color: #00ff88;
    border: 2px solid rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
}

.type-chart-table-improved td.type-effective:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.35), rgba(0, 255, 136, 0.25));
    border-color: #00ff88;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
    transform: scale(1.15);
    z-index: 10;
    position: relative;
}

.type-chart-table-improved td.type-resist {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.25), rgba(255, 51, 102, 0.15));
    color: #ff3366;
    border: 2px solid rgba(255, 51, 102, 0.5);
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.2);
}

.type-chart-table-improved td.type-resist:hover {
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.35), rgba(255, 51, 102, 0.25));
    border-color: #ff3366;
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.4);
    transform: scale(1.15);
    z-index: 10;
    position: relative;
}

.type-chart-table-improved td.type-immune {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(100, 100, 100, 0.2));
    color: #999;
    border: 2px solid rgba(100, 100, 100, 0.5);
    box-shadow: 0 0 8px rgba(100, 100, 100, 0.2);
}

.type-chart-table-improved td.type-immune:hover {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.4), rgba(100, 100, 100, 0.3));
    border-color: #999;
    box-shadow: 0 0 12px rgba(100, 100, 100, 0.4);
    transform: scale(1.15);
    z-index: 10;
    position: relative;
}

/* 배지 스타일 */
.guide-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 4px;
}

.badge-common {
    background: rgba(200, 200, 200, 0.2);
    color: #c8c8c8;
}

.badge-uncommon {
    background: rgba(0, 200, 0, 0.2);
    color: #00c800;
}

.badge-rare {
    background: rgba(0, 150, 255, 0.2);
    color: #0096ff;
}

.badge-epic {
    background: rgba(150, 0, 255, 0.2);
    color: #9600ff;
}

.badge-legendary {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
}

.badge-mythical {
    background: rgba(255, 100, 200, 0.2);
    color: #ff64c8;
}

.badge-grade-c {
    background: rgba(150, 150, 150, 0.2);
    color: #969696;
}

.badge-grade-b {
    background: rgba(0, 150, 255, 0.2);
    color: #0096ff;
}

.badge-grade-a {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.badge-grade-s {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
}

/* 설명 텍스트 */
.guide-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid rgba(212, 175, 55, 0.5);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .guide-container {
        padding: 16px;
    }

    .guide-section {
        padding: 16px;
    }

    .guide-section-title {
        font-size: 1.3rem;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .guide-table {
        font-size: 0.85rem;
    }

    .guide-table th,
    .guide-table td {
        padding: 8px;
    }

    .guide-list-item {
        flex-direction: column;
        gap: 6px;
    }

    .guide-list-item .item-label {
        min-width: auto;
    }

    .type-chart-container {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .type-chart-legend {
        gap: 12px;
        padding: 10px;
    }

    .legend-item {
        font-size: 0.85rem;
    }

    .legend-color {
        width: 20px;
        height: 20px;
    }

    .type-chart-table-improved {
        min-width: 700px;
        font-size: 0.8rem;
    }

    .type-chart-table-improved th,
    .type-chart-table-improved td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .guide-container {
        padding: 12px;
    }

    .guide-section {
        padding: 12px;
    }

    .guide-section-title {
        font-size: 1.1rem;
    }

    .guide-table {
        font-size: 0.8rem;
    }

    .guide-table th,
    .guide-table td {
        padding: 6px;
    }
}
