:root {
    --bg-base: #09090b;
    --bg-surface: #18181b;
    --bg-card: #27272a;
    --text-main: #f8fafc;
    --text-muted: #a1a1aa;
    --border-color: #3f3f46;
    --primary: #3b82f6;
    --primary-hover: #2563eb;

    --w1-color: #60a5fa;
    --w2-color: #f472b6;

    --badge-0: #52525b;
    /* Gray */
    --badge-1: #10b981;
    /* Green */
    --badge-2: #0ea5e9;
    /* Blue */
    --badge-3: #f59e0b;
    /* Yellow */
    --badge-4: #ef4444;
    /* Red */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Balanced Ambient Glows */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.03;
    /* Barely there, just for warmth */
    pointer-events: none;
}

body::before {
    top: -200px;
    left: -200px;
    background: var(--primary);
}

body::after {
    bottom: -200px;
    right: -200px;
    background: #a855f7;
}

/* === NAVIGATION === */
.navbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 70px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.1;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.nav-credit {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
}

.credit-name {
    color: var(--primary);
    font-weight: 800;
    opacity: 1;
}

.nav-main {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.nav-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.nav-support-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    opacity: 0.6;
}

@media (max-width: 1150px) {
    .nav-support-text {
        display: none;
    }
}

.nav-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-btn:active {
    transform: scale(0.96);
}

.nav-btn.active {
    color: #fff;
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.nav-btn-home {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-btn-home span {
    margin-right: 6px;
    filter: drop-shadow(0 0 5px var(--primary));
}

.nav-btn-home:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.wip-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--badge-3);
    border: 1px solid var(--badge-3);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    opacity: 0.75;
    margin-left: 0.5rem;
    pointer-events: none;
    user-select: none;
}

/* === MAIN LAYOUT === */
.main-container {
    max-width: 98%;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

/* === NOTICE BANNER === */
.notice-banner {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.notice-icon {
    color: var(--badge-3);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.notice-banner p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.notice-banner strong {
    color: var(--badge-3);
}

/* === PRIORITY GUIDE === */
.priority-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.info-header span {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.info-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
}

.stagger-highlight {
    color: var(--badge-3);
    font-weight: 700;
}

.defense-highlight {
    color: var(--badge-2);
    font-weight: 700;
}

.tenacity-highlight {
    color: var(--badge-3);
    font-weight: 700;
}

.info-example {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
}

.info-example strong {
    color: var(--text-main);
}

.tab-pane {
    display: none;
    animation: fade-in 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === CALCULATOR GRID === */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
}

.skill-card {
    background-color: rgba(24, 24, 27, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.skill-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.card-a .skill-header {
    border-bottom: 2px solid var(--w1-color);
}

.card-b .skill-header {
    border-bottom: 2px solid var(--w2-color);
}

.card-a .skill-header h2 {
    color: var(--w1-color);
}

.card-b .skill-header h2 {
    color: var(--w2-color);
}

.skill-header {
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.skill-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.skill-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

select {
    width: 100%;
    appearance: none;
    background-color: var(--bg-base);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select:focus {
    outline: none;
    border-color: var(--primary);
}

.skill-footer {
    padding: 1.25rem;
    background-color: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-base);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.b-0 {
    background-color: var(--badge-0);
}

.b-1 {
    background-color: var(--badge-1);
}

.b-2 {
    background-color: var(--badge-2);
}

.b-3 {
    background-color: var(--badge-3);
}

.b-4 {
    background-color: var(--badge-4);
}

/* === SELECTION TRIGGERS === */
.ref-card-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 5rem;
}

.header-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ref-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.ref-card-action {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.selection-trigger {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.selection-trigger:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.selection-trigger:active {
    transform: scale(0.97);
}

.trigger-icon-wrap {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trigger-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.trigger-text-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.trigger-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.trigger-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.trigger-chevron {
    color: var(--text-muted);
    opacity: 0.5;
}

/* === MODAL OVERLAY === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-content {
    background: var(--bg-surface);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    animation: modal-pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modal-pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-search {
    padding: 1.5rem 2rem;
}

.modal-search input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.modal-search input:focus {
    border-color: var(--primary);
}

.modal-tabs {
    display: flex;
    padding: 0 2rem;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: inherit;
}

.modal-tab:hover {
    color: var(--text-main);
}

.modal-tab.active {
    color: var(--primary);
}

.modal-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.modal-item {
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.modal-item:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -10px rgba(59, 130, 246, 0.5);
}

.modal-item-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.modal-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.modal-item-category {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    opacity: 0.8;
}

/* === ACTION CENTER === */
.action-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    padding: 1.2rem 3.5rem;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(1px);
}

.outcome-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 2rem 4rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.outcome-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.outcome-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.outcome-text {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.outcome-note {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* === DASHBOARD === */
.dashboard-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.dashboard-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* === LEGEND === */
.legend-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.legend-item .badge {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.legend-item .b-3 {
    color: #000;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.weapon-ref-card {
    background: rgba(24, 24, 27, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.weapon-ref-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ref-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2.5rem 1rem 1.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 4.8rem;
}

.header-text-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.2;
}

.weapon-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.ref-card-body {
    padding: 0.5rem 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ref-column-headers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.col-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.col-stats {
    display: flex;
    align-items: center;
    width: 130px;
}

.col-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    margin: 0 4px;
}

.col-label.text-stagger,
.col-label.text-defense {
    flex: 1;
    text-align: center;
}

.ref-attack-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    gap: 0.5rem;
}

.ref-attack-row:last-child {
    border-bottom: none;
}

.ref-attack-name {
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-main);
    font-weight: 600;
    flex: 1;
    word-wrap: break-word;
}

.ref-attack-stats {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 130px;
}

.mini-badge {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mini-badge .b-dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    line-height: 24px;
    text-align: center;
    color: #fff;
    font-size: 0.85rem;
}

.text-stagger {
    color: var(--text-muted);
}

.text-defense {
    color: var(--text-muted);
}

/* === MYSTIC STAT LAYOUT === */
.mystic-stat-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1.1rem 1rem;
    gap: 0.5rem;
    flex-grow: 1;
}

.mystic-stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
}

.mystic-stat-num {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    line-height: normal !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mystic-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.winner-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.winner-icon-wrap {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.winner-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.outcome-info {
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .winner-display {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.mystic-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
    flex-shrink: 0;
}


/* === WIP CARD === */
.wip-card {
    opacity: 0.6;
}

.wip-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 1rem;
}

.wip-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.wip-icon {
    font-size: 1.4rem;
}

.wip-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* === CONTACT FORM === */
.form-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.form-title {
    color: var(--badge-4);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    background-color: #121214;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-group input {
    font-family: 'Inter', sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #71717a;
}

.form-group textarea {
    resize: vertical;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
}

.form-group select {
    appearance: none;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--badge-4);
}

.btn-submit {
    background-color: var(--badge-4);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1.25rem;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    opacity: 0.9;
}

/* === FORM SUCCESS MESSAGE === */
.form-success-msg {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    animation: fade-in 0.4s ease-out;
}

.success-icon {
    font-size: 3rem;
    color: var(--badge-1);
    margin-bottom: 1rem;
}

.form-success-msg p {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* === WIP & ERROR STYLES === */
.text-error {
    color: #ef4444 !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.wip-tag {
    font-size: 0.65rem;
    font-weight: 800;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #ef4444;
    margin-left: 0.75rem;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.wip-card-status,
.wip-card-partial {
    position: relative;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.wip-row {
    background: rgba(239, 68, 68, 0.05);
}

/* === IMPORTANT INFO TAB === */
.info-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-entry-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.info-entry-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.info-body {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.info-stat-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-footer {
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}

.info-footer strong {
    color: #fff;
}

.badge-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    vertical-align: middle;
    margin: 0 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.color-tenacity {
    color: var(--badge-3) !important;
    font-weight: 700;
}

.color-superarmor {
    color: var(--badge-4) !important;
    font-weight: 700;
}

.color-white {
    color: #fff !important;
    font-weight: 700;
}

.info-base-label {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* === SMALL MONITOR OPTIMIZATIONS === */
@media (max-height: 900px) {
    .main-container {
        margin: 1rem auto;
    }

    .notice-banner,
    .priority-info {
        padding: 0.5rem 1rem;
        margin-bottom: 0.75rem;
        font-size: 0.85rem;
    }

    .notice-banner p,
    .info-text {
        font-size: 0.85rem;
    }

    .priority-info {
        padding: 0.75rem 1rem;
    }

    .info-header {
        margin-bottom: 0.4rem;
    }

    .info-example {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .calc-grid {
        margin-bottom: 1rem;
        gap: 1rem;
    }

    .skill-header {
        padding: 0.75rem 1.25rem;
    }

    .skill-body {
        padding: 1rem;
        gap: 1rem;
    }

    .skill-footer {
        padding: 1rem;
        gap: 1rem;
    }

    .stat-pill {
        padding: 0.4rem 0.4rem 0.4rem 0.8rem;
        border-radius: 6px;
    }

    .selection-trigger {
        padding: 0.6rem 0.75rem;
    }

    .trigger-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .trigger-icon {
        width: 28px;
        height: 28px;
    }

    .ref-card-header {
        min-height: 4.2rem;
    }

    .action-center {
        gap: 1rem;
    }

    .btn-primary {
        padding: 1rem 3rem;
        font-size: 1rem;
    }

    .outcome-card {
        padding: 1.5rem 3rem;
    }

    .outcome-text {
        font-size: 2rem;
    }
}

/* === MOBILE OPTIMIZATIONS (768px and below) === */
@media (max-width: 768px) {

    /* Layout */
    .main-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    /* Navbar */
    .nav-container {
        height: auto;
        padding: 0.75rem 1rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 0.75rem;
    }

    .nav-brand {
        justify-content: center;
        width: 100%;
    }

    .nav-main {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0.25rem 0;
        scrollbar-width: none;
        /* Firefox */
    }

    .nav-main::-webkit-scrollbar {
        display: none;
    }

    /* Chrome/Safari */

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-secondary {
        justify-content: center;
        width: 100%;
        border-top: 1px solid var(--border-color);
        padding-top: 0.5rem;
    }

    /* Banners & Guide */
    .notice-banner {
        gap: 0.75rem;
        padding: 0.6rem 0.75rem;
    }

    .notice-banner p {
        font-size: 0.8rem;
    }

    .priority-info {
        padding: 0.75rem;
    }

    .info-header {
        gap: 0.5rem;
    }

    .info-header span {
        font-size: 0.8rem;
    }

    .info-text {
        font-size: 0.85rem;
    }

    /* Calculator */
    .calc-grid {
        gap: 1rem;
    }

    .skill-card {
        border-radius: 12px;
    }

    .skill-header {
        padding: 0.75rem 1rem;
    }

    .skill-header h2 {
        font-size: 0.95rem;
    }

    .selection-trigger {
        padding: 0.75rem;
    }

    .trigger-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .trigger-icon {
        width: 24px;
        height: 24px;
    }

    .trigger-name {
        font-size: 0.9rem;
    }

    .trigger-label {
        font-size: 0.65rem;
    }

    .skill-footer {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .stat-pill {
        padding: 0.4rem 0.6rem;
        gap: 0.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .badge {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }

    /* Action Center */
    .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .outcome-card {
        padding: 1.5rem 1rem;
        width: 100%;
    }

    .outcome-text {
        font-size: 1.75rem;
    }

    .outcome-note {
        font-size: 0.85rem;
        padding: 0 0.5rem;
    }

    .winner-display {
        gap: 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .winner-icon-wrap {
        width: 50px;
        height: 50px;
    }

    .winner-icon {
        width: 36px;
        height: 36px;
    }

    /* Grids */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .info-card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Reference Cards */
    .ref-card-header {
        padding: 0.75rem 1rem;
        min-height: auto;
    }

    .header-text-wrap {
        font-size: 1rem;
    }

    .col-stats {
        width: 100px;
    }

    .ref-attack-stats {
        width: 100px;
    }

    .mini-badge .b-dot {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 0.75rem;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }

    .modal-header {
        padding: 1rem 1.25rem;
    }

    .modal-search {
        padding: 1rem 1.25rem;
    }

    .modal-tabs {
        padding: 0 1.25rem;
        gap: 0.5rem;
    }

    .modal-body {
        padding: 1rem 1.25rem 2rem;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    .modal-item {
        padding: 1rem 0.75rem;
    }

    .modal-item-icon {
        width: 36px;
        height: 36px;
    }

    .modal-item-name {
        font-size: 0.85rem;
    }

    /* Legend */
    .legend-container {
        padding: 0.75rem;
        gap: 1rem;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    .legend-item .badge {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    /* Contact Form */
    .form-card {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.1rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .btn-submit {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* Specific fix for Very Small Devices */
@media (max-width: 380px) {
    .nav-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .stat-pill {
        padding: 0.3rem 0.5rem;
    }

    .badge {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }

    .outcome-text {
        font-size: 1.5rem;
    }
}

/* === MATCHUPS TAB === */
.matchup-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.matchup-selector-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
}

.selector-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.selector-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 450px;
}

.selector-mini-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.matchup-results-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.results-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#matchupCountText {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.matchup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.matchup-action-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

.matchup-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding-bottom: 0.4rem;
}

.matchup-action-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.m-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    padding: 0 4px;
}

.m-action-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

/* === HOME / SYMMETRIC DASHBOARD === */
.dash-hero {
    margin: 4rem 0 3rem;
    text-align: center;
}

.hero-tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 4px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.dash-hero h1 {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 0.9;
    margin-bottom: 2rem;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.dash-hero h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 15px var(--primary);
}

.dash-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.dash-card {
    background: rgba(24, 24, 27, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dash-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(30, 30, 35, 0.7);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dash-card:active {
    transform: scale(0.97);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.dash-card:hover .card-head {
    opacity: 1;
    color: var(--primary);
}

.card-head .tag {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.dash-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.dash-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-foot {
    margin-top: auto;
    padding-top: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.2s;
}

.dash-card:hover .card-foot {
    color: var(--primary);
}

/* Registry Sub-navigation */
.registry-subnav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.sub-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.sub-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.sub-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sub-pane {
    display: none;
}

.sub-pane.active {
    display: block;
    animation: fadeInSub 0.4s ease-out;
}

@keyframes fadeInSub {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .dash-hero h1 {
        font-size: 2.5rem;
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }
}