/* Savior DB Styles */

.savior-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
    box-sizing: border-box;
}

/* Search Bar */
.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

#savior-search {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--input-bg);
    color: var(--text-color);
}

/* Filter Section */
.filter-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    padding: 10px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
    min-width: 120px;
}

.filter-select:focus {
    border-color: var(--primary-color);
}

/* Grid */
.savior-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media(min-width: 600px) {
    .savior-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.2rem;
    }
}

@media(min-width: 1200px) {
    .savior-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }
}

.savior-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 12px;
    overflow: visible;
    /* Allow transforms to show fully */
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.savior-item img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
    margin-bottom: 8px;
    border: 3px solid transparent;
    /* Default border */
    transition: box-shadow 0.3s;
}

/* Attribute Border Colors */
/* Attribute Border Colors & Text Colors & Glows */
.savior-item.attr-sun img {
    border-color: #ff6b6b;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}



.savior-item.attr-sun:hover img {
    box-shadow: 0 0 15px #ff6b6b;
    transform: scale(1.1);
}

.savior-item.attr-moon img {
    border-color: #6b8cff;
    box-shadow: 0 0 5px rgba(107, 140, 255, 0.5);
}



.savior-item.attr-moon:hover img {
    box-shadow: 0 0 15px #6b8cff;
    transform: scale(1.1);
}

.savior-item.attr-star img {
    border-color: #6bff8c;
    box-shadow: 0 0 5px rgba(107, 255, 140, 0.5);
}



.savior-item.attr-star:hover img {
    box-shadow: 0 0 15px #6bff8c;
    transform: scale(1.1);
}

.savior-item.attr-order img {
    border-color: #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}



.savior-item.attr-order:hover img {
    box-shadow: 0 0 15px #ffd700;
    transform: scale(1.1);
}

.savior-item.attr-chaos img {
    border-color: #d06bff;
    box-shadow: 0 0 5px rgba(208, 107, 255, 0.5);
}



.savior-item.attr-chaos:hover img {
    box-shadow: 0 0 15px #d06bff;
    transform: scale(1.1);
}

/* Generic Hover fallbacks (should not be needed if all have attrs) */
.savior-item:hover .name {
    filter: brightness(1.2);
}

.savior-item .name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-color);
    text-align: center;
}

/* Modal */
.savior-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s;
    padding: 20px;
    /* Add padding around modal on desktop */
    box-sizing: border-box;
}

.savior-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-color);
    width: 100%;
    max-width: 1100px;
    height: 90vh;
    border-radius: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    z-index: 100;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Nav Buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--text-color);
    border: none;
    font-size: 4rem;
    padding: 0;
    cursor: pointer;
    z-index: 100;
    border-radius: 50%;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: none;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Modal Layout - Desktop (Flex) */
.savior-detail-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* Left Column */
.detail-left {
    width: 40%;
    padding: 30px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.illust-container img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.arcpoint-container h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-highlight);
}

.spoiler-warning {
    font-size: 0.8rem;
    color: #ff6b6b;
    margin-left: 5px;
}

.arcpoint-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.arcpoint-wrapper img {
    width: 100%;
    transition: filter 0.3s;
}

.arcpoint-wrapper.spoiler-active img {
    filter: blur(15px);
}

.spoiler-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}

.arcpoint-wrapper.spoiler-active .spoiler-overlay {
    opacity: 1;
}

/* Right Column */
.detail-right {
    width: 60%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-sizing: border-box;
}

.profile-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.profile-icon {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    transition: box-shadow 0.3s, border-color 0.3s;
}

/* Modal Icon Attribute Styling */
.profile-icon.attr-sun {
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

.profile-icon.attr-moon {
    border-color: #6b8cff;
    box-shadow: 0 0 10px rgba(107, 140, 255, 0.4);
}

.profile-icon.attr-star {
    border-color: #6bff8c;
    box-shadow: 0 0 10px rgba(107, 255, 140, 0.4);
}

.profile-icon.attr-order {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.profile-icon.attr-chaos {
    border-color: #d06bff;
    box-shadow: 0 0 10px rgba(208, 107, 255, 0.4);
}

.profile-info h2 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.profile-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

/* Base Tag Style */
.tag {
    background: rgba(var(--primary-color-rgb), 0.15);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid transparent;
    /* Added default border */
}

/* Tag Specific Colors */
.tag.attr-sun {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.tag.attr-moon {
    color: #6b8cff;
    border-color: #6b8cff;
    background: rgba(107, 140, 255, 0.15);
}

.tag.attr-star {
    color: #6bff8c;
    border-color: #6bff8c;
    background: rgba(107, 255, 140, 0.15);
}

.tag.attr-order {
    color: #ffd700;
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

.tag.attr-chaos {
    color: #ca8eff;
    border-color: #ca8eff;
    background: rgba(202, 142, 255, 0.15);
}


.profile-desc {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.5;
}

/* Tabs */
.detail-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Base Border */
    padding: 8px 16px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    transition: all 0.2s;
    border-radius: 6px;
}

.tab-btn.active {
    opacity: 1 !important;
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: bold;
    border: 1px solid var(--primary-color) !important;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Stats */
.stat-group {
    margin-bottom: 25px;
}

.stat-group h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-highlight);
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.stat-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.stat-name {
    width: 80px;
    font-size: 0.9rem;
    color: #888;
}

.stat-bar-container {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin: 0 15px;
    position: relative;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #a04ce0);
    border-radius: 6px;
    width: 0;
    transition: width 1s ease-out;
}

.stat-val {
    width: 60px;
    text-align: right;
    font-weight: bold;
    color: var(--text-color);
}

.stat-rank {
    font-size: 0.75rem;
    color: #aaa;
    margin-left: 10px;
    width: 50px;
    text-align: right;
}

.stat-grid-text {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.text-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

/* Journey Stats */
.journey-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.journey-stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.journey-stat-label {
    font-size: 0.8rem;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.journey-stat-value {
    font-weight: bold;
    color: var(--primary-color);
}

/* Potentials */
.potential-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.potential-list li {
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.potential-level {
    background: #444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Skills */
.skill-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    object-fit: contain;
}

.skill-info {
    flex: 1;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    align-items: center;
}

.skill-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.skill-type {
    font-size: 0.8rem;
    background: #333;
    padding: 2px 6px;
    border-radius: 4px;
    color: #ccc;
    border: 1px solid #777;
    /* Base Border */
}

.skill-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 8px;
}

.skill-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.skill-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.skill-badge.cooldown {
    background: rgba(100, 200, 255, 0.2);
    color: #8ecfff;
    border: 1px solid rgba(100, 200, 255, 0.4);
}

.skill-badge.target {
    background: rgba(255, 100, 100, 0.2);
    color: #ff8e8e;
    border: 1px solid rgba(255, 100, 100, 0.4);
}

.skill-badge.target-ally {
    background: rgba(100, 255, 120, 0.2);
    color: #8eff9e;
    border: 1px solid rgba(100, 255, 120, 0.4);
}

.skill-badge.break {
    background: rgba(150, 150, 150, 0.2);
    color: #e0e0e0;
    border: 1px solid rgba(200, 200, 200, 0.4);
}

.skill-badge.nova-gain {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.skill-badge.nova {
    color: #ff9f43 !important;
    border-color: #ff9f43 !important;
    background: rgba(255, 159, 67, 0.1) !important;
    align-self: flex-start;
}

.skill-nova {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-nova-desc {
    font-size: 0.85rem;
    color: #ddd;
    font-style: italic;
}

/* Flavor Tooltip */
.flavor-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    max-width: 300px;
    color: white;
    z-index: 3000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    line-height: 1.4;
}

.flavor-tooltip.hidden {
    display: none;
}

.flavor-keyword {
    color: #ffd700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.flavor-keyword:hover {
    color: #fff;
}

/* Profile Details Box (Base) */
.profile-details-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-details-box p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.profile-details-box p:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-details-box strong {
    color: var(--primary-color);
}

/* Skill Level Info (Base) */
.skill-level-btn {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-highlight);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.skill-level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.skill-level-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.skill-level-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.skill-level-data {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    opacity: 0;
    margin-top: 0;
}

.skill-level-data.active {
    max-height: 500px;
    /* Arbitrary large height */
    opacity: 1;
    margin-top: 10px;
    overflow-y: auto;
}

.skill-level-data table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    /* Gap between rows */
}

.skill-level-data tr {
    background: rgba(30, 100, 200, 0.3);
    /* Blueish tint */
    border-radius: 4px;
    overflow: hidden;
}

.skill-level-data td {
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #eee;
}

.skill-level-data .sl-num {
    width: 40px;
    text-align: center;
    background: rgba(0, 80, 200, 0.6);
    /* Darker blue for number */
    font-weight: bold;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    color: #fff;
}

.skill-level-data .sl-desc {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(0, 80, 200, 0.3);
    border-left: none;
}

/* Wrapper for Side-by-Side Layout */
.journey-potential-wrapper {
    display: flex;
    gap: 15px;
    /* Adjust gap as needed */
    margin-bottom: 25px;
}

.journey-potential-wrapper .stat-group {
    margin-bottom: 0;
    /* Remove bottom margin from inner groups */
    flex: 1;
    /* Distribute space equally */
}

/* Image Popup */
.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s;
    cursor: pointer;
}

.image-popup.hidden {
    opacity: 0;
    pointer-events: none;
}

.image-popup img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.popup-close-hint {
    color: #aaa;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    /* Filter Section - Single Line */
    .filter-section {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 20px;
    }

    .filter-group {
        flex: 1;
        min-width: 0;
    }

    .filter-group label {
        display: none;
        /* Hide labels to save space */
    }

    .sort-group {
        flex: 1;
        min-width: 0;
    }

    .filter-select {
        width: 100%;
        min-width: 0;
        padding: 8px 5px;
        font-size: 0.85rem;
        height: 40px;
    }

    /* Modal Layout */
    .savior-modal {
        padding: 0;
        /* Full screen on mobile */
    }

    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        overflow-y: auto;
        /* Scroll on the modal container */
    }

    .savior-detail-layout {
        flex-direction: column;
        height: auto;
        overflow: visible;
        /* Content flows naturally */
    }

    .detail-right {
        width: 100%;
        padding: 20px;
        order: 1;
        /* Profile/Stats First */
        overflow: visible;
        height: auto;
    }

    .detail-left {
        width: 100%;
        padding: 20px;
        order: 2;
        /* Illust Last */
        background: none;
        border-top: 1px solid var(--border-color);
        overflow: visible;
        height: auto;
    }

    .nav-btn {
        position: fixed;
        width: 80px;
        height: 80px;
        font-size: 3rem;
        background: transparent;
        color: transparent;
        border: none;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

.profile-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid transparent;
}

.badge-common {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
    border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================
   LIGHT MODE OVERRIDES (Unified Block)
   ========================================= */

[data-theme="light"] {

    /* Modal Components */
    .savior-modal {
        background: rgba(255, 255, 255, 0.95);
    }

    .modal-content {
        background: #f8f9fa;
        color: #333;
        border: 1px solid #ddd;
    }

    .close-button {
        color: #333;
    }

    /* Layout Containers */
    .detail-left {
        background: #f1f3f5;
        border-right: 1px solid #ddd;
    }

    .detail-right {
        background: #fff;
    }

    /* Profile Details Box: White Bg + Dark Border */
    .profile-details-box {
        background-color: #ffffff;
        border: 1px solid #bbbbbb;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .profile-details-box p {
        border-bottom: 1px solid #eeeeee;
        color: #333;
    }

    .profile-details-box strong {
        /* color: #333333; Removed as per user request */
    }

    .profile-details-box span {
        color: #555555;
    }

    /* Profile Badges */
    .profile-badge {
        border: 1px solid #ddd;
    }

    .badge-common {
        background: #f1f3f5;
        color: #495057;
        border-color: #ced4da;
    }

    /* Status & Stats */
    .stat-bar-container {
        background: #e0e0e0;
        border: 1px solid #cccccc;
    }

    .text-stat-item,
    .journey-stat-item,
    .potential-list li {
        background-color: #f8f9fa;
        border: 1px solid #cccccc;
        color: #333333;
    }

    .stat-val,
    .journey-stat-label,
    .journey-stat-value,
    .stat-name,
    .stat-rank {
        /* color: #222222; Removed as per user request */
    }

    /* Skills Area */
    .skill-item {
        background-color: #ffffff;
        border: 1px solid #bbbbbb;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
        color: #333;
    }

    .skill-name {
        text-shadow: none;
    }

    .skill-desc,
    .skill-nova-desc {
        color: #444444;
    }

    .skill-type {
        background: #eeeeee;
        border: 1px solid #999999;
        color: #333333;
    }

    .skill-nova {
        border-top-color: #ddd;
    }

    /* Skill Level Info */
    .skill-level-btn {
        background-color: #f1f3f5;
        border: 1px solid #999999;
        color: #222222;
        font-weight: bold;
    }

    .skill-level-btn:hover {
        background-color: #e9ecef;
        border-color: #777777;
    }

    .skill-level-data {
        background-color: #ffffff;
    }

    .skill-level-data tr {
        background: #e7f5ff;
        border: 1px solid #a5d8ff;
    }

    .skill-level-data td {
        color: #333333;
        border-bottom: 1px solid #e0e0e0;
    }

    .skill-level-data .sl-num {
        background: #d0ebff;
        color: #1864ab;
        border-right: 1px solid #a5d8ff;
    }

    .skill-level-data .sl-desc {
        border-color: #a5d8ff;
    }

    /* Skill Badges & Tags */
    .skill-badge.cooldown {
        color: #1864ab;
        border: 1px solid #a5d8ff;
        background: #e7f5ff;
    }

    .skill-badge.target {
        color: #e03131;
        border: 1px solid #ffc9c9;
        background: #ffe3e3;
    }

    .skill-badge.target-ally {
        color: #2b8a3e;
        border: 1px solid #b2f2bb;
        background: #d3f9d8;
    }

    .skill-badge.nova-gain {
        color: #e67700;
        border: 1px solid #ffec99;
        background: #fff3bf;
    }

    .skill-badge.nova {
        color: #d9480f !important;
        border-color: #ffc078 !important;
        background: #ffe8cc !important;
    }

    .skill-badge.break {
        background: rgba(100, 100, 100, 0.1);
        color: #333333;
        border: 1px solid #cccccc;
    }

    .flavor-keyword {
        color: #e67700;
        text-decoration-color: #e67700;
    }

    .flavor-keyword:hover {
        color: #d9480f;
    }

    /* Tab Buttons - Border visible in Light Mode */
    .tab-btn {
        border: 1px solid #cccccc;
        color: #555555;
    }

    .tab-btn.active {
        border-color: var(--primary-color);
    }

    /* Navigation Buttons */
    .nav-btn {
        border-color: transparent;
        /* Clean look on light mode or keep border? User asked for borders on tabs, likely clean for nav */
        color: transparent;
    }

    .nav-btn:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    /* Attribute Colors (Darker for Visibility) */
    .tag.attr-sun,
    .attr-sun {
        color: #d63333;
        border-color: #d63333;
        background-color: #ffe6e6;
    }

    .tag.attr-moon,
    .attr-moon {
        color: #335ccb;
        border-color: #335ccb;
        background-color: #e6eaff;
    }

    .tag.attr-star,
    .attr-star {
        color: #009944;
        border-color: #009944;
        background-color: #e6ffec;
    }

    .tag.attr-order,
    .attr-order {
        color: #b8860b;
        border-color: #b8860b;
        background-color: #fff9e6;
    }

    .tag.attr-chaos,
    .attr-chaos {
        color: #8a2be2;
        border-color: #8a2be2;
        background-color: #f3e6ff;
    }

    /* Flavor Tooltip Override for Light Mode */
    .flavor-tooltip {
        background: #ffffff;
        color: #333333;
        border: 1px solid #4a90e2;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
}