#researchSection {
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    background-image: url('../assets/images/background2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 60px;
    background-color: #111; /* Darker background */
    margin-bottom: 20px;
    border: 1px solid #444;
    border-radius: 5px;      /* ADD THIS */
    overflow: hidden;        /* ADD THIS */
}

.progress-bar {
    height: 100%;
    width: 0;
    transition: width 0.5s ease-in-out;
    background-color: #00c853;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0.15) 15px,
        transparent 15px,
        transparent 30px
    );
    animation: animate-stripes 1s linear infinite;
}

.progress-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box; /* This ensures padding is inside the width */
}

.progress-text {
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.cancel-button {
    background-color: #e74c3c;
    color: white;
    border: 1px solid #c0392b;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    margin: 0;
    transition: background-color 0.2s ease;
}

.cancel-button:hover {
    background-color: #c0392b;
}

.tab-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    border: 1px solid #444;
    padding: 10px;
}

.tab {
    /* --- Sizing and Layout --- */
    width: 180px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* --- Background Image (Inactive State) --- */
    background-image: url('../assets/images/PNG/Button03.png');
    background-size: 100% 100%;
    background-color: transparent;
    
    /* --- Text and Font --- */
    color: #EAEAEA;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    
    /* --- General --- */
    border: none;
    cursor: pointer;
    margin: 0 5px;
    transition: transform 0.15s ease;
}

.tab:hover {
    transform: scale(1.05); /* Add a hover effect for all tabs */
}

.tab.active {
    /* --- Background Image (Active State) --- */
    background-image: url('../assets/images/PNG/Button04.png');
    color: #FFF; /* Make text brighter for the active tab */
}

.tech-content-wrapper {
    position: relative; /* This is the anchor for the absolute panels */
    flex-grow: 1;       /* This makes the wrapper fill the available space */
    width: 100%;
}

.tech-container {
    /* These panels now sit on top of each other */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-color: #000;
    border: 1px solid #444;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: scroll;
    scrollbar-gutter: stable;

    /* They are invisible by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

/* The .visible class makes a panel appear */
.tech-container.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- NEW: Custom Scrollbar for Tech Containers --- */
.tech-container::-webkit-scrollbar {
    width: 12px;
}

.tech-container::-webkit-scrollbar-track {
    background: #111;
}

.tech-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 6px;
    border: 3px solid #111;
}

.tech-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.tech-button {
    width: 160px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background-image: url('../assets/images/PNG/Button03.png');
    background-size: 100% 100%;
    background-color: transparent;
    color: #EAEAEA;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.tech-button:hover {
    background-image: url('../assets/images/PNG/Button04.png');
    color: #FFF;
    transform: scale(1.05);
}

.tech-button.unaffordable {
    filter: grayscale(80%);
    opacity: 0.7;
    color: #E74C3C; /* Red text */
    text-shadow: none;
    cursor: not-allowed;
}

.category-heading {
    display: block;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 5px;
}

.category-container {
    display: flex;
    flex-direction: column;
    width: 100%;               /* ADDED BACK: Ensures each category takes a full row */
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.researched-tech-name {
    margin-left: 15px;
    margin-top: 5px;
    margin-bottom: 5px;
    cursor: default;
}

@keyframes animate-stripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 42px 0;
  }
}
