html {
    overflow: hidden;
    height: 100vh;
}

.navbar {
    border-bottom: 1px solid rgba(122, 122, 122, 122);
}

.skills-grid {
    gap: 1.25rem 1rem;
    width: 50%;
    margin: 0 5%;
    position: relative; /* Enable absolute positioning for overlay arrows */
    justify-items: center;
    align-items: center;
}

.empty-skill-card {
    padding: 0.5rem;
    width: 210px;
    height: 105px;
}

/* Uniform skill cards */
.skill-card {
    background: #222222;
    border: 1px solid #8a8a8a8a;
    border-radius: 6px;
    padding: 0.25rem;
    text-align: center;
    color: white;
    position: relative; /* Enable absolute positioning for prerequisites */

    /* 2:1 rectangle size */
    width: 210px;
    height: 105px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
}

.skill-card .image {
    height: 48px;
    width: 48px;
    flex-shrink: 0;
}

.skill-card div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    flex-shrink: 1;
}

/* Skill card internal structure */
.skill-card-header {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    gap: 4px;
    align-items: center;
    width: 100%;
    padding: 0 4px;
}

.skill-card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
}

.skill-buttons-container {
    min-width: 32px;
}

.skill-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
}

.skill-buttons .button {
    padding: 0;
    font-size: 1rem;
    width: 26px;
    height: 22px;
    border-width: 1px;
    line-height: 1;
}

.skill-card-name {
    text-align: center;
    font-size: 0.9rem;
    padding: 0 4px;
}

.skill-card-level {
    text-align: center;
}

.has-text-purple {
    color: rgb(190, 0, 210);
}

/* Toast container positioning */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.toast-container .notification {
    padding: 1rem;
    cursor: pointer;
    margin: 0.5rem !important;
}

/* Custom skill tree tab styling / Bulma overrides */
.tabs li.is-active a {
    border-bottom-color: white !important;
    color: white !important;
}

.tabs a:hover {
    border-bottom-color: transparent !important;
    color: white !important;
}

.box {
    --bulma-shadow: 0 0.25em 0.5em -0.0625em hsla(var(--bulma-shadow-h),var(--bulma-shadow-s),var(--bulma-shadow-l),0.1),0 0px 0 0.5px hsla(var(--bulma-shadow-h),var(--bulma-shadow-s),var(--bulma-shadow-l),0.02) !important;
}

.skill-tooltip {
    position: fixed;
    z-index: 10000;
    background: #1a1a1a;
    border: 2px solid #8a8a8a;
    border-radius: 6px;
    padding: 12px;
    max-width: 50vw;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    color: white;
    pointer-events: none;
    font-size: 1rem;
    line-height: 1.4;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #444;
}

.tooltip-name-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex: 1;
    gap: 12px;
}

.tooltip-name-section {
    flex: 1;
}

.tooltip-level-section {
    text-align: right;
    flex-shrink: 0;
}

/* Control field label width to prevent wrapping - each label sizes itself */
.field.is-horizontal .field-label.is-normal {
    flex-basis: auto;
    flex-grow: 0;
    flex-shrink: 0;
    margin-right: 1.5rem;
    text-align: right;
    width: fit-content;
}

.field.is-horizontal .field-label.is-normal .label {
    white-space: nowrap;
}

.tooltip-icon .image {
    width: 64px;
    height: 64px;
}

.tooltip-restriction {
    padding: 6px 8px;
    background: rgba(255, 0, 0, 0.1);
    border-left: 3px solid #ff3860;
    border-radius: 3px;
}

.tooltip-warning {
    padding: 6px 8px;
    background: rgba(255, 193, 0, 0.1);
    border-left: 3px solid #ffdd57;
    border-radius: 3px;
}

.tooltip-max-level {
    padding: 4px 0;
    font-size: 0.9rem;
    color: #ddd;
}

.tooltip-level-indicator {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 4px;
}

.tooltip-description {
    padding: 6px 0;
    color: #eee;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
    /* Fix scrolling on mobile */
    .columns .column {
        overflow-y: auto;
        max-height: 70vh;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Make skills grid full width on mobile */
    .skills-grid {
        width: 95%;
        margin: 0 2.5%;
    }
    
    /* Adjust skill cards for mobile */
    .skill-card {
        width: 100%;
        min-width: 200px;
    }
    
    /* Increase button sizes for touch */
    .skill-buttons .button {
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 1.25rem;
        padding: 0.5rem !important;
    }
    
    .skill-buttons-container {
        min-width: 44px;
    }
    
    /* Adjust tooltip for mobile */
    .skill-tooltip {
        max-width: 90vw;
        min-width: 250px;
    }
}

/* Difficulty checkboxes layout - horizontal on desktop, vertical on smaller screens */
.difficulty-checkboxes {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.difficulty-checkboxes .checkbox {
    display: inline-block;
}

/* Stack difficulty checkboxes vertically on tablet and mobile */
@media screen and (max-width: 1023px) {
    .difficulty-checkboxes {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .difficulty-checkboxes .checkbox {
        display: block;
    }
}