/* Wonder Weapon Page Styles - based on revelations.css */


.header-container { padding: 0px; }
.navigation-path { padding: 0px; }

.main-content { background-color: transparent; width: 100%; }

/* One-column grid at all widths */
.weapon-cards { display: grid; grid-template-columns: 1fr; gap: 20px; justify-content: left; padding: 20px; }

.card { position: relative; width: 100%; background: var(--card-background); border-radius: 10px; padding: 18px; display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; box-sizing: border-box; border: 2px solid transparent; transition: border-color 0.2s ease; border-bottom: 3px solid var(--border-red); }

.card:hover { filter: brightness(1.1); z-index: 1; }
.card.active { border-color: rgba(255,255,255,0.5); filter: brightness(1.1); z-index: 2; }

.img-container { display: flex;   justify-content: center;   width: 122px;}
.weapon-img { max-height:180px; }

@media (max-width: 1200px) { .weapon-img { max-height:140px; }
  .img-container { flex: 0 0 60px; }
  .card { gap: 12px; padding-left: 10px; padding-right: 10px; }
}

.info-container { flex: 1; min-width: 200px; width: 100%; color: #fff; word-break: break-word; overflow-wrap: break-word; }

.title-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.weapon-name { font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.95); }
.source { font-size: 12px; color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.15); padding: 4.5px 10px; border-radius: 8px; }


/* Legacy effect-block styles (for old card structure) */
.effect-block { display: grid; 
  gap: 8px; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 10px; }
.effect-label { color: rgba(255,255,255,0.9); font-size: 12px; font-weight: 500; }

/* Accordion */
.accordion { width: 100%; margin-top: 10px; border-radius: 8px; overflow: hidden; background: rgba(0,0,0,0.15); }
.accordion-header { display: flex; align-items: center; justify-content: space-between; background: rgba(0,0,0,0.25); color: rgba(255,255,255,0.9); font-size: 13px; padding: 10px 12px; cursor: pointer; border: none; }
.accordion-header:hover { filter: brightness(1.1); }
.accordion-content { display: none; padding: 10px 12px; color: rgba(255,255,255,0.85); font-size: 13px; }
.accordion-content.open { display: block; }

.user-list { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
}
.user-tag { background: rgba(0,0,0,0.35); color: rgba(255,255,255,0.9); padding: 4px 8px; border-radius: 999px; font-size: 12px; }

/* Character link items inside accordion - Modern style */
.character-link { 
    display: inline-flex; 
    align-items: flex-start; 
    gap: 10px; 
    background: rgba(0, 0, 0, 0.4); 
    color: rgba(255,255,255,0.95); 
    padding: 12px; 
    font-size: 14px; 
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    min-width: 182px;
    box-sizing: border-box;
}
.character-link:hover { 
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
.character-img { 
    width: 40px; 
    height: 40px; 
    object-fit: cover; 
    border-radius: 50%; 
    background: #222;
    border: 0px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.character-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.character-name { 
    line-height: 1.4;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Character icons (position/element) */
.char-icons { 
    display: inline-flex; 
    gap: 4px; 
    align-items: center;
    flex-shrink: 0;
}
.char-icon { 
    width: 18px; 
    height: 18px; 
    object-fit: contain;
}

/* Utilities */
.separator-line {
    height: 3px;
    background: var(--section-divider-paint);
    margin: 20px 0;
}

@media (max-width: 1200px) { .navigation-path, .header-container, .weapon-cards { padding-left: 0; padding-right: 0; }
  .header-container h1 { margin-bottom: 0; }
}

/* Effect levels and highlighting - Modern style */
.levels-controls { 
    display: flex; 
    gap: 6px; 
    margin-bottom: 16px; 
    flex-wrap: wrap;
}
.level-btn { 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05); 
    color: rgba(255, 255, 255, 0.7); 
    border: 0px solid rgba(255, 255, 255, 0.15); 
    border-radius: 4px; 
    padding: 6px 12px; 
    font-size: 13px; 
    font-weight: 500;
    cursor: pointer; 
    transition: all 0.2s ease;
    user-select: none;
    min-width: 60px;
}
.level-btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.level-btn-roman {
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}
.level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}
.level-btn:focus { 
    outline: none;
    box-shadow: 0 0 0 2px rgba(115, 0, 0, 0.3);
}
.level-btn.active { 
    
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

@media (max-width: 768px) { .levels-block { margin-top: 4px }
}


/* Mobile layout: image + title row on first line; effect + accordion below */
@media (max-width: 768px) { .card { display: grid; grid-template-columns: 90px 1fr; grid-auto-rows: auto; grid-template-rows: auto 1fr; align-items: start; }
  .img-container { grid-column: 1;  grid-row: 1 / -1; }
  .source {padding: 6px 12px; width: fit-content; border-radius: 8px;}
  .info-container { display: contents; }
  .title-row { display: grid; grid-column: 2; grid-row: 1; margin-bottom: 0; }
  .levels-block{ grid-column: 2; grid-row: 2; align-self: end; }
  .levels-controls{ flex-wrap: wrap; }
  .level-btn { padding: 4px 12px; }
  .effect-block, .accordion { grid-column: 1 / -1; margin-top: 0; }
  .effect-block { grid-template-columns: 1fr; padding: 10px 12px 12px 12px; margin-top:8px;}
  .effect-label { display: none }
}

/* Detail Header (synergy style) */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
}

:is(.detail-header, .detail-section-title, .lightning-stamp-header, .release-column-title) {
    background: var(--section-divider-paint);
    background-position-y: bottom, bottom, bottom 1px;
}

@media (max-width: 768px) {
    .detail-header {
        gap: 8px;
    }
}

.detail-header-image {
    width: 80px;
    height: 120px;
    border-radius: 0px;
    object-fit: contain;
}

.detail-header-info h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #fff;
}

@media (max-width: 768px) {
    .detail-header-info h2 {
        font-size: 18px;
    }
}

.detail-header-element-icon {
    width: auto;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.detail-source-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-source {
    font-size: 14px;
    color: #999;
}

.detail-source-shop {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-source-icon {
    width: auto;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.detail-source-amount {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

/* Detail Sections (synergy style) */
.detail-section + .detail-section {
    margin-top: 36px;
}

.detail-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
    padding-bottom: 8px;
}

/* Effect text wrapper - 상자 스타일 */
.effect-text-wrapper {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    margin-top: 0;
}

/* Effect text styling for detail sections */
.detail-section .effect-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line;
    word-break: break-word;
    padding: 0;
    margin: 0;
}

.detail-section .effect-text .num {
    font-weight: 600;
}

/* Filter Section */
.filter-section {
    margin: 10px 0 20px;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.source-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.source-filter-btn {
    padding: 8px 16px;
    border: 1px solid #333;
    background: var(--card-background);
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.source-filter-btn:hover {
    filter: brightness(1.1);
    border-color: #555;
}

.source-filter-btn.active {
    background: #730000;
    border-color: #730000;
    color: #fff;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    display: flex;
    align-items: center;
}

/* Main Container */
.weapon-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* Weapon Tabs */
.weapon-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 8px;
    width: 100%;
}

@media (max-width: 768px) {
    .weapon-tabs {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
    }
}

.weapon-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid #333;
    background: var(--card-background);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.weapon-tab-pending {
    opacity: 0;
    pointer-events: none;
}

.weapon-tab-enter {
    animation: weapon-tab-enter 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes weapon-tab-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .weapon-tab-enter {
        animation: none;
    }
}

@media (min-width: 769px) {
    .weapon-tab {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 12px;
        text-align: left;
    }
}

.weapon-tab:hover {
    filter: brightness(1.1);
    border-color: #555;
}

.weapon-tab.active {
    background: #2a1a1a;
    border-color: #730000;
}

.weapon-tab-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.weapon-tab-image-wrapper {
    position: relative;
    display: inline-block;
}

.weapon-tab-shard-icon-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(4px, 0px);
    z-index: 2;
    pointer-events: none;
}

.weapon-tab-shard-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

@media (min-width: 769px) {
    .weapon-tab-image {
        width: 56px;
        height: 56px;
    }
}

.weapon-tab-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

@media (min-width: 769px) {
    .weapon-tab-info {
        width: auto;
    }
}

.weapon-tab-name {
    font-size: 13px;
    font-weight: 500;
    color: #eee;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

@media (min-width: 769px) {
    .weapon-tab-name {
        text-align: left;
        white-space: normal;
        line-height: 1.4;
    }
}

.weapon-tab-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #999;
    text-align: center;
}

.weapon-tab-element-icon {
    width: auto;
    height: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (min-width: 769px) {
    .weapon-tab-source {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .weapon-tab {
        padding: 8px 6px;
        gap: 6px;
    }
    
    .weapon-tab-image {
        width: 48px;
        height: 48px;
    }
    
    .weapon-tab-name {
        font-size: 12px;
    }
    
    .weapon-tab-source {
        
        justify-content: center;
        font-size: 10px;
    }
    
    .weapon-tab-source-text {
        display: none;
    }
    
    .weapon-tab-element-icon {
        width: 14px;
        height: 14px;
    }
}

/* Weapon Detail */
.weapon-detail {
    flex: 1;
    min-width: 0;
    padding: 24px;
    user-select: text;
}

.detail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #730000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Priority character */
.character-link.priority {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.character-name.priority {
    color: #ff6c6c;
}

.effect-text .num { color: #ffda82; font-weight: 400; }

/* Lightning Stamp - Modern style */
.lightning-stamp-block {
    margin-bottom: 24px;
    padding: 16px;
    background: #1a1a1a;
    border: 0px solid rgba(255, 255, 255, 0.08);
}

.lightning-stamp-block:last-child {
    margin-bottom: 0;
}

.lightning-stamp-header { 
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
}

.lightning-stamp-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

.lightning-stamp-name .detail-section-icon {
    width: auto;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.lightning-stamp-icon { 
    width: 20px; 
    height: 20px; 
    object-fit: contain; 
    flex-shrink: 0;
}

.lightning-stamp-block .effect-text {
    margin-top: 12px;
}

@media (max-width: 768px) {
  .weapon-detail {
    padding: 16px;
  }
  
  .user-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .character-link{
    min-width: 0;
  }

  .character-name{
    font-size: 13px;
  }
  
  .detail-section .effect-text {
    font-size: 13px;
  }
  
  .lightning-stamp-header { 
    margin-top: 4px; 
  }
  
  .lightning-stamp-block { 
    padding: 16px;
  }
}

/* 출시 시점 컨테이너 - 두 열 레이아웃 */
.release-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.release-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
    padding: 16px;
    background: #1a1a1a;
}

.release-column-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding-bottom: 8px;
}

.detail-section-title .detail-section-icon {
    width: auto;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
    margin-left: 6px;
}

/* Dialog choices 스타일 (synergy와 동일) */
.dialog-choices {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dialog-choice-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dialog-choice {
    padding: 10px 12px;
    background: #0f0f0f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.release-container a.dialog-choice:is(:hover, :focus-visible) {
    background-color: #292929;
}

.dialog-choice-content {
    flex: 1;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.character-img-small {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    background: #222;
    border: 0px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.stamp-release-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 4px;
}

/* Lightning Stamp 설명 */
.lightning-stamp-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
    border-left: 3px solid rgba(115, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .detail-section + .detail-section {
        margin-top: 28px;
    }

    .release-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stamp-release-grid {
        grid-template-columns: 1fr;
    }
}

/* 수정(Shard) 섹션 스타일 */
.shard-grid {
    width: 100%;
    background: #1a1a1a;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.shard-item {
    display: flex;
    border: none;
}

.shard-item:not(:nth-child(2n)) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.shard-item:not(:nth-child(-n+2)) {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.shard-icon-cell {
    width: 80px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shard-icon-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.shard-icon-wrapper:hover {
    opacity: 0.8;
}

.shard-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.shard-icon.checked {
    opacity: 0.5;
    filter: brightness(0.5);
}

.shard-check-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.shard-desc-cell {
    padding: 12px 12px 12px 4px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

.shard-desc-icon {
    width: auto;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    margin: 0 4px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .shard-grid {
        grid-template-columns: 1fr;
    }
    
    .shard-item {
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .shard-item:nth-child(n) {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .shard-item:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .shard-icon-cell {
        width: 60px;
        padding: 12px;
    }
    
    .shard-icon {
        width: 48px;
        height: 48px;
    }
    
    .shard-desc-cell {
        padding: 12px 12px 12px 0;
        font-size: 13px;
    }
    
    .shard-desc-icon {
        width: 18px;
        height: 18px;
    }
}
