.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background-color: var(--minecraft-dark);
    border: 3px solid var(--minecraft-green);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 2px solid rgba(77, 255, 77, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    color: var(--minecraft-green);
    margin: 0;
    font-size: 1.5em;
    text-shadow: 0 0 5px rgba(77, 255, 77, 0.3);
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--minecraft-green);
}

.modal-body {
    padding: 20px;
}

/* Tab styling */
.tabs-container {
    margin-bottom: 20px;
}

/* Clean tab navigation area - ensure single row */
.tabs-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    background: rgba(30, 30, 30, 0.5);
    padding: 10px;
    border-radius: 5px 5px 0 0;
    margin: -10px -10px 15px -10px;
    border-bottom: 2px solid rgba(77, 255, 77, 0.3);
    overflow-x: auto;
    scrollbar-width: thin;
    -ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    white-space: nowrap;
    max-width: 100%;
    width: 100%;
}

/* Hide scrollbar but keep functionality */
.tabs-nav::-webkit-scrollbar {
    height: 3px;
    background: transparent;
}

.tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(77, 255, 77, 0.3);
    border-radius: 4px;
}

/* Tab button base styling - more responsive */
.tab-button {
    flex: 0 0 auto;
    min-width: 85px;
    max-width: none;
    height: 36px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 6px 10px;
    border-radius: 5px;
    margin-bottom: 0;
    border: 2px solid transparent;
    background: rgba(51, 51, 51, 0.7);
    cursor: pointer;
    font-family: 'Minecraft', sans-serif;
    gap: 5px;
    transition: all 0.2s ease;
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
    white-space: nowrap;
    font-size: 0.85em;
    text-align: center;
}

/* Tab button hover effect */
.tab-button:hover:not(.active) {
    background: rgba(60, 60, 60, 0.9);
    transform: translateY(-2px);
}

/* Base styles for active tab with animation */
.tab-button.active {
    border-bottom-color: var(--minecraft-dark);
    position: relative;
    background: rgba(51, 51, 51, 0.9);
    animation: tabButtonHighlight 1.5s ease infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    z-index: -1;
    animation: tabPulse 1.5s ease infinite;
}

/* All tab active styles */
.tab-button[data-category="all"].active {
    animation: tabButtonHighlightAll 1.5s ease infinite;
    border-color: rgba(200, 200, 200, 0.5);
}

.tab-button[data-category="all"].active::after {
    animation: tabPulseAll 1.5s ease infinite;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 70%);
}

/* Feature tab active styles */
.tab-button[data-category="feature"].active {
    animation: tabButtonHighlightFeature 1.5s ease infinite;
    border-color: #FFD700;
}

.tab-button[data-category="feature"].active::after {
    animation: tabPulseFeature 1.5s ease infinite;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.5) 0%, rgba(255, 215, 0, 0) 70%);
}

/* Improvement tab active styles */
.tab-button[data-category="improvement"].active {
    animation: tabButtonHighlightImprovement 1.5s ease infinite;
    border-color: var(--minecraft-green);
}

.tab-button[data-category="improvement"].active::after {
    animation: tabPulseImprovement 1.5s ease infinite;
    background: radial-gradient(circle, rgba(77, 255, 77, 0.5) 0%, rgba(77, 255, 77, 0) 70%);
}

/* Fix tab active styles */
.tab-button[data-category="fix"].active {
    animation: tabButtonHighlightFix 1.5s ease infinite;
    border-color: #ff4444;
}

.tab-button[data-category="fix"].active::after {
    animation: tabPulseFix 1.5s ease infinite;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.5) 0%, rgba(255, 68, 68, 0) 70%);
}

/* Change tab active styles */
.tab-button[data-category="change"].active {
    animation: tabButtonHighlightChange 1.5s ease infinite;
    border-color: #409cff;
}

.tab-button[data-category="change"].active::after {
    animation: tabPulseChange 1.5s ease infinite;
    background: radial-gradient(circle, rgba(64, 156, 255, 0.5) 0%, rgba(64, 156, 255, 0) 70%);
}

/* Icon styling in tab buttons */
.tab-button i {
    font-size: 0.9em;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

/* Count badge styling - compact for smaller screens */
.tab-button .count {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3) inset;
    display: inline-block;
    min-width: 16px;
    text-align: center;
    vertical-align: middle;
}

/* Improved tab content transition animation */
.tab-content {
    display: none;
    width: 100%;
    overflow-x: hidden;
    position: absolute;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.25s ease-out;
}

.tab-content.active {
    display: block;
    position: relative;
    opacity: 1;
    transform: translateX(0);
    animation: none; /* Remove previous animations that might conflict */
}

/* Tab content container to handle positioning */
.tabs-content {
    position: relative;
    min-height: 200px; /* Ensure content area doesn't collapse between transitions */
}

/* Improvement specific styling enhancement */
.tab-button[data-category="improvement"] {
    background: linear-gradient(to right, rgba(0, 120, 0, 0.5), rgba(77, 255, 77, 0.3));
    border-color: rgba(77, 255, 77, 0.6);
    color: var(--minecraft-green);
}

.tab-button[data-category="improvement"].active {
    animation: tabButtonHighlightImprovement 1.5s ease infinite;
    border-color: #4dff4d;
    box-shadow: 0 0 12px rgba(77, 255, 77, 0.7);
}

/* Common styling for all category items in category-specific tabs */
[id^="tab-"]:not(#tab-all) .change-item {
    padding-left: 15px;
    margin-bottom: 15px;
    position: relative;
    opacity: 0;
    transform: translateX(15px);
}

[id^="tab-"].active:not(#tab-all) .change-item {
    animation: slideInRight 0.3s ease-out forwards;
}

/* Feature tab items */
#tab-feature .change-item, 
#tab-features .change-item {
    border-left: 3px solid #FFD700;
}

/* Fix tab items */
#tab-fix .change-item, 
#tab-fixes .change-item {
    border-left: 3px solid #ff4444;
}

/* Change tab items */
#tab-change .change-item, 
#tab-changes .change-item {
    border-left: 3px solid #409cff;
}

/* New slide animations - smoother and shorter distance */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(15px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Better staggered animation timing - faster overall */
[id^="tab-"].active .change-item:nth-child(1) { animation-delay: 0.03s; }
[id^="tab-"].active .change-item:nth-child(2) { animation-delay: 0.06s; }
[id^="tab-"].active .change-item:nth-child(3) { animation-delay: 0.09s; }
[id^="tab-"].active .change-item:nth-child(4) { animation-delay: 0.12s; }
[id^="tab-"].active .change-item:nth-child(5) { animation-delay: 0.15s; }
[id^="tab-"].active .change-item:nth-child(6) { animation-delay: 0.18s; }
[id^="tab-"].active .change-item:nth-child(7) { animation-delay: 0.21s; }
[id^="tab-"].active .change-item:nth-child(8) { animation-delay: 0.24s; }
[id^="tab-"].active .change-item:nth-child(9) { animation-delay: 0.27s; }
[id^="tab-"].active .change-item:nth-child(10) { animation-delay: 0.3s; }

/* Improvements for tab navigation */
.tab-button[data-category="improvement"] i,
.change-category i.fa-arrow-up {
    color: #4dff4d;
    text-shadow: 0 0 5px rgba(77, 255, 77, 0.5);
}

/* Override previous animations that might conflict */
.tab-content.active .change-item {
    animation: none;
}

/* Tab-specific coloring */
.tab-button[data-category="all"] {
    background: linear-gradient(to right, rgba(40, 40, 40, 0.8), rgba(60, 60, 60, 0.8));
    border-color: rgba(100, 100, 100, 0.5);
}

.tab-button[data-category="feature"] {
    background: linear-gradient(to right, rgba(180, 142, 0, 0.4), rgba(255, 215, 0, 0.2));
    border-color: rgba(255, 215, 0, 0.5);
    color: #FFD700;
}

.tab-button[data-category="improvement"] {
    background: linear-gradient(to right, rgba(0, 100, 0, 0.4), rgba(77, 255, 77, 0.2));
    border-color: rgba(77, 255, 77, 0.5);
    color: var(--minecraft-green);
}

.tab-button[data-category="fix"] {
    background: linear-gradient(to right, rgba(100, 0, 0, 0.4), rgba(255, 68, 68, 0.2));
    border-color: rgba(255, 68, 68, 0.5);
    color: #ff4444;
}

.tab-button[data-category="change"] {
    background: linear-gradient(to right, rgba(0, 70, 100, 0.4), rgba(64, 156, 255, 0.2));
    border-color: rgba(64, 156, 255, 0.5);
    color: #409cff;
}

.all-tab {
    color: #fff !important;
}

/* Custom scrollbar for modal */
.modal-container::-webkit-scrollbar {
    width: 10px;
}

.modal-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.modal-container::-webkit-scrollbar-thumb {
    background: var(--minecraft-gray);
    border-radius: 5px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
    background: var(--minecraft-green);
}

/* Empty tab message */
.empty-tab-message {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Loading indicator */
.modal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(77, 255, 77, 0.2);
    border-top: 4px solid var(--minecraft-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom animations for each category */
@keyframes tabButtonHighlightAll {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
}

@keyframes tabButtonHighlightFeature {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
    }
}

@keyframes tabButtonHighlightImprovement {
    0%, 100% {
        box-shadow: 0 0 5px rgba(77, 255, 77, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(77, 255, 77, 0.8);
    }
}

@keyframes tabButtonHighlightFix {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 68, 68, 0.8);
    }
}

@keyframes tabButtonHighlightChange {
    0%, 100% {
        box-shadow: 0 0 5px rgba(64, 156, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(64, 156, 255, 0.8);
    }
}

@keyframes tabPulseAll {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

@keyframes tabPulseFeature {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

@keyframes tabPulseImprovement {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

@keyframes tabPulseFix {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

@keyframes tabPulseChange {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

/* Specific style for the "All" tab to ensure it's aligned properly */
.tab-button.all-tab {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Tab navigation container - clean box for the tabs */
#categoryTabs {
    background: rgba(30, 30, 30, 0.5);
    padding: 10px;
    border-radius: 5px 5px 0 0;
    margin: -10px -10px 15px -10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 2px solid rgba(77, 255, 77, 0.3);
}

/* All tab and other tabs alignment improvements */
.tab-button {
    flex: 0 0 auto;
    min-width: 100px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 8px 15px;
    border-radius: 5px;
    margin-bottom: 0;
    border: 2px solid transparent;
    background: rgba(51, 51, 51, 0.7);
}

@keyframes tabButtonHighlight {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
}

@keyframes tabPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 85vh;
    }

    .tabs-nav {
        padding: 8px;
        gap: 4px;
        margin: -8px -8px 12px -8px;
    }
    
    .tab-button {
        min-width: 80px;
        height: 34px;
        padding: 4px 8px;
        font-size: 0.8em;
        gap: 3px;
    }
    
    .tab-button i {
        font-size: 0.85em;
    }
    
    .tab-button .count {
        padding: 1px 4px;
        min-width: 14px;
        font-size: 0.75em;
    }

    .modal-body {
        padding: 12px;
    }

    .change-item {
        flex-direction: row !important;
    }
    
    .change-category {
        margin-bottom: 0 !important;
    }
    
    .tab-button {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 98%;
    }
    
    .modal-body {
        padding: 10px;
    }
    
    .tabs-nav {
        padding: 6px;
        gap: 3px;
        margin: -6px -6px 10px -6px;
    }
    
    .tab-button {
        min-width: 72px;
        height: 32px;
        padding: 3px 6px;
        font-size: 0.75em;
        border-width: 1px;
    }
    
    .tab-button i {
        font-size: 0.8em;
        margin-right: 2px;
    }
    
    .tab-button .count {
        padding: 1px 3px;
        min-width: 12px;
        font-size: 0.7em;
    }
    
    .modal-header {
        padding: 10px 12px;
    }
    
    .modal-title {
        font-size: 1.2em;
    }
}

/* Tab-specific styling */
#tab-all .change-item {
    display: flex;
}

/* Category tabs need specific styling */
[id^="tab-"] .change-item:not(#tab-all .change-item) {
    padding-left: 15px;
}

/* Icon styling */
.change-category i {
    width: 16px;
    text-align: center;
    margin-right: 5px;
}

/* Add back deleted styling */
.change-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.change-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    margin-bottom: 12px;
}

.change-category {
    display: inline-block;
    width: 130px;
    min-width: 130px;
    text-align: left;
    margin-right: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.change-content {
    flex: 1;
    padding-left: 5px;
}

/* Icon styling - make sure icons have consistent width */
.change-category i {
    width: 20px;
    text-align: center;
    margin-right: 5px;
    display: inline-block;
}

/* Enhanced change item styling for improvement tab */
#tab-improvement .change-item, 
#tab-improvements .change-item {
    border-left: 3px solid var(--minecraft-green);
    padding-left: 12px;
    margin-left: 3px;
    position: relative;
}

/* Special styling for improvement items */
.improvement-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.improvement-category {
    color: #4dff4d !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 600 !important;
}

/* Ensure improvement icon is properly aligned */
.improvement-category i {
    color: #4dff4d;
    margin-right: 6px;
    text-shadow: 0 0 4px rgba(77, 255, 77, 0.4);
} 