* {
    box-sizing: border-box;
}

/* Remove number input spinner arrows */
input[type="number"].pagination-page-input::-webkit-inner-spin-button,
input[type="number"].pagination-page-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

body {
    background: linear-gradient(135deg, #2a1f3d 0%, #1a1428 50%, #2d2140 100%);
    background-attachment: fixed;
    color: #f5f0e8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, rgba(58, 47, 77, 0.6) 0%, rgba(42, 31, 61, 0.6) 100%);
    border-bottom: 3px solid #7d6ba8;
    margin-bottom: 30px;
    padding: 20px 60px;
}

/* Top Bar: Branding + Share/Load */
.header-top-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    margin-bottom: 20px;
}

.branding-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.plushie-container {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.plushie-container:hover {
    transform: scale(1.05);
}

.plushie-img {
    width: 100px;
    height: auto;
    display: block;
}

@keyframes plushie-bounce {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.15) rotate(-3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.plushie-counter {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(135deg, #9d8bc8 0%, #7d6ba8 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.title-credits h1 {
    color: #e8d5ff;
    font-size: 32px;
    margin: 0 0 8px 0;
    text-shadow: 0 4px 16px rgba(139, 111, 168, 0.5);
    font-weight: 700;
    letter-spacing: 2px;
}

.title-credits p {
    color: #c8b8d8;
    margin: 4px 0;
    font-size: 13px;
}

.title-credits .disclaimer {
    font-size: 11px;
    color: #9d8bc8;
    font-style: italic;
}

.title-credits a {
    color: #9d8bc8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.title-credits a:hover {
    color: #c8b8d8;
}

.share-load-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Control Strip: Build Name, Author, Save/Publish */
.control-strip {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: end;
    margin-bottom: 15px;
}

.build-metadata-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.metadata-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metadata-field label {
    color: #c8b8d8;
    font-size: 13px;
    font-weight: 600;
}

.metadata-field input {
    background: rgba(42, 31, 61, 0.6);
    border: 2px solid #7d6ba8;
    color: #f5f0e8;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.metadata-field input:focus {
    outline: none;
    border-color: #9d8bc8;
    background: rgba(58, 47, 77, 0.6);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Description Row */
.description-strip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.description-strip label {
    color: #c8b8d8;
    font-size: 13px;
    font-weight: 600;
}

.description-strip textarea {
    background: rgba(42, 31, 61, 0.6);
    border: 2px solid #7d6ba8;
    color: #f5f0e8;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    min-height: 50px;
    transition: all 0.3s ease;
}

.description-strip textarea:focus {
    outline: none;
    border-color: #9d8bc8;
    background: rgba(58, 47, 77, 0.6);
}

/* Utility Bar: Save Slots + Randomize/Reset */
.utility-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 15px 20px;
    background: rgba(42, 31, 61, 0.4);
    border-radius: 8px;
    border: 2px solid #7d6ba8;
}

.save-slots-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.utility-label {
    color: #c8b8d8;
    font-size: 14px;
    font-weight: 600;
}

.save-slots-buttons {
    display: flex;
    gap: 8px;
}

.save-slots-buttons .letter {
    background: rgba(58, 47, 77, 0.6);
    color: #c8b8d8;
    border: 2px solid #7d6ba8;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    min-width: 36px;
    text-align: center;
}

.save-slots-buttons .letter:hover {
    background: rgba(58, 47, 77, 0.8);
    border-color: #9d8bc8;
    transform: translateY(-2px);
}

.save-slots-buttons .letter.active {
    background: linear-gradient(135deg, #9d8bc8 0%, #7d6ba8 100%);
    color: #fff;
    border-color: #9d8bc8;
    box-shadow: 0 4px 12px rgba(157, 139, 200, 0.4);
}

.utility-buttons {
    display: flex;
    gap: 10px;
}

.utility-btn {
    background: rgba(58, 47, 77, 0.6);
    color: #c8b8d8;
    border: 2px solid #7d6ba8;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.utility-btn:hover {
    background: rgba(58, 47, 77, 0.8);
    border-color: #9d8bc8;
    transform: translateY(-2px);
}

.utility-btn:active {
    transform: translateY(0);
}

/* Main Content Area */
.content-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #7d6ba8;
    padding-bottom: 0;
}

.tab-btn {
    background: rgba(58, 47, 77, 0.4);
    color: #c8b8d8;
    border: 2px solid #7d6ba8;
    border-bottom: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    background: rgba(58, 47, 77, 0.6);
    color: #e8d5ff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    color: #e8d5ff;
    border-bottom: 2px solid #2a1f3d;
    box-shadow: 0 -2px 10px rgba(157, 139, 200, 0.3);
}

/* Tab Content */
.tab-content-wrapper {
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection Row - Top section for Deck and Class selection */
.selection-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 10px;
    align-items: start;
}

.deck-selection-container,
.class-selection-container {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.class-selection-container .loadout-class-select {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

.class-selection-container .class-description {
    margin-top: 15px;
    color: #c8b8d8;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    background: rgba(58, 47, 77, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(125, 107, 168, 0.3);
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    align-items: start;
}

.left-column,
.right-column {
    min-width: 0;
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 1200px) {
    .selection-row,
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

/* Specialization Section */
.specialization-section {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 2px solid #7d6ba8;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.specialization-section h2 {
    margin: 0 0 15px 0;
    color: #e8d5ff;
    font-size: 24px;
    font-weight: 600;
}

.specialization-section label {
    color: #c8b8d8;
    font-weight: 500;
    margin-right: 10px;
}

.specialization-section select {
    background: rgba(26, 20, 40, 0.8);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.specialization-section select:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 10px rgba(157, 139, 200, 0.3);
}

/* Share Section */
.share-section {
    display: flex;
    gap: 10px;
    align-items: center;
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 2px solid #7d6ba8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.share-btn, .load-code-btn {
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    color: #f5f0e8;
    border: 2px solid #9d8bc8;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-btn:hover, .load-code-btn:hover {
    background: linear-gradient(135deg, #9b7fb8 0%, #7d6598 100%);
    box-shadow: 0 4px 16px rgba(157, 139, 200, 0.6);
    transform: translateY(-2px);
}

.share-btn:active, .load-code-btn:active {
    transform: translateY(0);
}

.build-code-input {
    flex: 1;
    background: rgba(26, 20, 40, 0.8);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.build-code-input:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 12px rgba(157, 139, 200, 0.4);
}

.build-code-input::placeholder {
    color: #9d8bc8;
}

/* Build Manager Tabs */
.build-manager-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    border-bottom: 2px solid #7d6ba8;
}

.build-tab-btn {
    background: rgba(58, 47, 77, 0.4);
    color: #c8b8d8;
    border: 2px solid #7d6ba8;
    border-bottom: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px 8px 0 0;
    position: relative;
    bottom: -2px;
}

.build-tab-btn:hover {
    background: rgba(58, 47, 77, 0.6);
    color: #e8d5ff;
}

.build-tab-btn.active {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    color: #e8d5ff;
    border-bottom: 2px solid #2a1f3d;
    box-shadow: 0 -2px 10px rgba(157, 139, 200, 0.3);
}

/* Build Panels Container */
.build-panels-container {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 2px solid #7d6ba8;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-height: 200px;
}

.build-panel-content {
    display: none;
}

.build-panel-content.active {
    display: block;
}

/* Build Details Container - Inner version for Creator tab */
.build-details-container-inner {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.build-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.build-info-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.build-info-row label {
    font-size: 14px;
    font-weight: 600;
    color: #e8d5ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 100px;
    padding-top: 12px;
}

.build-name-input,
.build-author-input,
.build-tags-input {
    flex: 1;
    background: rgba(26, 20, 40, 0.8);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.build-desc-input {
    flex: 1;
    background: rgba(26, 20, 40, 0.8);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    resize: vertical;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 60px;
}

.build-name-input:focus,
.build-author-input:focus,
.build-tags-input:focus,
.build-desc-input:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 12px rgba(157, 139, 200, 0.4);
}

.build-name-input::placeholder,
.build-author-input::placeholder,
.build-tags-input::placeholder,
.build-desc-input::placeholder {
    color: #9d8bc8;
}

.build-actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
}

.build-action-btn {
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    color: #f5f0e8;
    border: 2px solid #9d8bc8;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-action-btn:hover {
    background: linear-gradient(135deg, #9b7fb8 0%, #7d6598 100%);
    box-shadow: 0 4px 16px rgba(157, 139, 200, 0.6);
    transform: translateY(-2px);
}

.build-action-btn:active {
    transform: translateY(0);
}

.build-action-btn.publish-btn {
    background: linear-gradient(135deg, #6fa88b 0%, #558876 100%);
    border-color: #8bc8a8;
}

.build-action-btn.publish-btn:hover {
    background: linear-gradient(135deg, #7fb89b 0%, #659886 100%);
    box-shadow: 0 4px 16px rgba(111, 168, 139, 0.6);
}

/* Deck Buttons */
.deck-section h2 {
    color: #e8d5ff;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.deck-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 0;
}

.deck-btn {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 18px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deck-btn:hover {
    background: linear-gradient(135deg, #5a4f7b 0%, #45395f 100%);
    border-color: #9d8bc8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(125, 107, 168, 0.5);
}

.deck-btn.active {
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    border-color: #e8d5ff;
    box-shadow: 0 0 24px rgba(139, 111, 168, 0.6);
}

/* Skill Deck Container */
.skill-deck-container {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 16px;
    padding: 35px;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Save Slots */
.alphabet-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #7d6ba8;
}

.letter {
    font-size: 18px;
    font-weight: 700;
    color: #9d8bc8;
    cursor: pointer;
    padding: 10px 16px;
    transition: all 0.3s ease;
    border-radius: 8px;
    background: rgba(74, 63, 107, 0.3);
    border: 2px solid transparent;
    min-width: 44px;
    text-align: center;
}

.letter:hover {
    color: #e8d5ff;
    border-color: #7d6ba8;
    background: rgba(125, 107, 168, 0.4);
    transform: translateY(-2px);
}

.letter.active {
    color: #f5f0e8;
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    border-color: #e8d5ff;
    box-shadow: 0 0 16px rgba(139, 111, 168, 0.5);
}

.randomize-build-btn {
    font-size: 14px;
    font-weight: 600;
    color: #f5f0e8;
    background: linear-gradient(135deg, #4a9ec7 0%, #3888a8 100%);
    border: 2px solid #7dc8e8;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(74, 158, 199, 0.3);
}

.randomize-build-btn:hover {
    background: linear-gradient(135deg, #55b5d6 0%, #4a9ec7 100%);
    border-color: #aae0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 199, 0.5);
}

.randomize-build-btn:active {
    transform: translateY(0);
}

.reset-slot-btn {
    font-size: 14px;
    font-weight: 600;
    color: #f5f0e8;
    background: linear-gradient(135deg, #c74a4a 0%, #a83838 100%);
    border: 2px solid #e87d7d;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(199, 74, 74, 0.3);
}

.reset-slot-btn:hover {
    background: linear-gradient(135deg, #d65555 0%, #c74a4a 100%);
    border-color: #ffaaaa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 74, 74, 0.5);
}

.reset-slot-btn:active {
    transform: translateY(0);
}

/* Carousel */
.carousel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 35px 0;
    min-height: 450px;
}

.carousel-btn {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    border: 3px solid #7d6ba8;
    color: #e8d5ff;
    font-size: 42px;
    cursor: pointer;
    padding: 20px 30px;
    transition: all 0.3s ease;
    border-radius: 12px;
    font-weight: bold;
    min-width: 80px;
}

.carousel-btn:hover {
    background: linear-gradient(135deg, #5a4f7b 0%, #45395f 100%);
    border-color: #9d8bc8;
    color: #f5f0e8;
    transform: scale(1.1);
    box-shadow: 0 0 24px rgba(157, 139, 200, 0.6);
}

.carousel-btn:active {
    transform: scale(1.05);
}

.carousel-content {
    flex: 1;
    text-align: center;
    padding: 0 50px;
}

.deck-title {
    font-size: 42px;
    letter-spacing: 8px;
    margin: 0 0 20px 0;
    color: #e8d5ff;
    text-shadow: 0 2px 12px rgba(139, 111, 168, 0.4);
    font-weight: 700;
}

.deck-name {
    font-size: 56px;
    letter-spacing: 6px;
    margin: 20px 0;
    color: #f5f0e8;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(139, 111, 168, 0.6);
    font-weight: 800;
}

.deck-tagline {
    font-size: 13px;
    letter-spacing: 1.2px;
    color: #c8b8d8;
    text-transform: uppercase;
    margin: 20px auto;
    max-width: 700px;
    line-height: 1.5;
}

/* Skill Icons */
.skill-icons {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 50px;
    width: 100%;
}

.skill-icon {
    /* NEW FLEX PROPERTIES TO ENSURE 8 EQUAL COLUMNS */
    flex: 0 0 calc(12.5% - 11px); 
    width: calc(12.5% - 11px);
    
    /* Keep existing properties: */
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden; /* This is crucial for clipping the sprite sheet */
}

.skill-icon img {
    display: block;
}

.skill-icon:hover {
    background: linear-gradient(135deg, #4a3f5d 0%, #3a2f4d 100%);
    border-color: #9d8bc8;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(125, 107, 168, 0.6);
}

.skill-icon.selected {
    background: linear-gradient(135deg, #6d5588 0%, #5a4573 100%);
    border-color: #e8d5ff;
    box-shadow: 0 0 28px rgba(139, 111, 168, 0.9);
    transform: scale(1.05);
}

.skill-icon.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    color: #f5f0e8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #e8d5ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Skill Details */
.skill-details {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 16px;
    padding: 35px;
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: start;
}

.skill-info-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.skill-name {
    font-size: 32px;
    margin: 0;
    font-style: italic;
    color: #e8d5ff;
    font-weight: 700;
}

.skill-status {
    background: rgba(74, 63, 107, 0.5);
    border: 2px solid #7d6ba8;
    border-radius: 10px;
    padding: 12px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-status p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #c8b8d8;
}

.skill-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.skill-status-indicator.enabled {
    background: #44ff88;
    box-shadow: 0 0 12px rgba(68, 255, 136, 0.6);
}

.skill-status-indicator.disabled {
    background: #7d6ba8;
    box-shadow: 0 0 8px rgba(125, 107, 168, 0.4);
}

.allocation-box {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    border: 3px solid #7d6ba8;
    padding: 25px;
    text-align: center;
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.allocation-box h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    letter-spacing: 2px;
    color: #c8b8d8;
    font-weight: 700;
}

.allocation-count {
    font-size: 52px;
    font-weight: 800;
    margin: 12px 0;
    color: #f5f0e8;
    text-shadow: 0 2px 8px rgba(139, 111, 168, 0.4);
}

.allocation-info {
    font-size: 10px;
    margin: 12px 0;
    color: #c8b8d8;
    line-height: 1.4;
}

.requisition {
    font-size: 13px;
    margin-top: 12px;
    color: #e8d5ff;
    font-weight: 600;
}

.skill-description {
    font-size: 16px;
    line-height: 1.8;
    margin: 25px 0 0 0;
    color: #e8d5ff;
}

.highlight-green {
    color: #277418;
    font-weight: 700;
}

.highlight-purple {
    color: #be00c2;
    font-weight: 700;
}

.highlight-blue {
    color: #0076b7;
    font-weight: 700;
}

.highlight-orange {
    color: #ffb870;
    font-weight: 700;
}

.highlight-pink {
    color: #ff9bb4;
    font-weight: 700;
}

/* Loadout Section */
.loadout-section {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 16px;
    padding: 35px;
    margin: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.loadout-section h2 {
    margin: 0 0 25px 0;
    color: #e8d5ff;
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.loadout-section h3 {
    margin: 25px 0 15px 0;
    color: #e8d5ff;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid #7d6ba8;
    padding-bottom: 10px;
}

.loadout-section h4 {
    margin: 0 0 10px 0;
    color: #c8b8d8;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loadout-class-select {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.loadout-class-select label {
    color: #c8b8d8;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loadout-class-select select {
    background: rgba(26, 20, 40, 0.8);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.loadout-class-select select:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 12px rgba(157, 139, 200, 0.4);
}

.class-description {
    color: #c8b8d8;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 30px 0;
    padding: 15px;
    background: rgba(74, 63, 107, 0.3);
    border-left: 3px solid #7d6ba8;
    border-radius: 6px;
}

.loadout-subsection {
    margin: 30px 0;
    padding: 25px;
    background: rgba(26, 20, 40, 0.4);
    border: 2px solid #7d6ba8;
    border-radius: 12px;
}

.specialization-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.spec-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.spec-item,
.equip-item {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    border: 2px solid #7d6ba8;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spec-item:hover,
.equip-item:hover {
    background: linear-gradient(135deg, #5a4f7b 0%, #45395f 100%);
    border-color: #9d8bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(125, 107, 168, 0.6);
}

.spec-item.selected,
.equip-item.selected {
    background: linear-gradient(135deg, #6d5588 0%, #5a4573 100%);
    border-color: #e8d5ff;
    box-shadow: 0 0 20px rgba(139, 111, 168, 0.8);
}

.spec-item h5,
.equip-item h5 {
    margin: 0 0 5px 0;
    color: #e8d5ff;
    font-size: 14px;
    font-weight: 600;
}

.spec-item .category,
.equip-item .category {
    font-size: 11px;
    color: #9d8bc8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.firearm-dropdowns,
.equipment-dropdowns {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.firearm-dropdown-group,
.equipment-dropdown-group,
.auxiliary-dropdown-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.firearm-dropdown-group label,
.equipment-dropdown-group label,
.auxiliary-dropdown-group label {
    color: #c8b8d8;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 150px;
}

.firearm-select,
.equipment-select,
.auxiliary-select {
    flex: 1;
    background: rgba(26, 20, 40, 0.8);
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.firearm-select optgroup {
    background: rgba(42, 31, 61, 0.95);
    color: #e8d5ff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px;
}

.firearm-select option {
    background: rgba(26, 20, 40, 0.95);
    color: #f5f0e8;
    padding: 8px;
    font-weight: 500;
}

.firearm-select:focus,
.equipment-select:focus,
.auxiliary-select:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 12px rgba(157, 139, 200, 0.4);
}

.firearm-select:hover,
.equipment-select:hover,
.auxiliary-select:hover {
    border-color: #9d8bc8;
}

.auxiliary-dropdown-group {
    margin-bottom: 20px;
}

.duplicate-toggle-group {
    margin-top: 8px;
    margin-left: 165px;
}

.duplicate-toggle-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c8b8d8;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    min-width: auto;
}

.duplicate-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #7ec7a8;
}

.item-details {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    border: 2px solid #7d6ba8;
    border-radius: 8px;
    padding: 20px;
    min-height: 120px;
    margin-bottom: 20px;
}

/* Sticky item details in right column */
.right-column .loadout-section {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.item-details h4 {
    margin: 0 0 12px 0;
    color: #e8d5ff;
    font-size: 18px;
}

.item-details p {
    margin: 0;
    color: #c8b8d8;
    font-size: 14px;
    line-height: 1.6;
}

.item-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.stat-item {
    background: rgba(26, 20, 40, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #7d6ba8;
}

.stat-label {
    font-size: 11px;
    color: #9d8bc8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    color: #e8d5ff;
    font-weight: 700;
}

.equipment-note {
    font-size: 12px;
    color: #9d8bc8;
    margin: 0 0 15px 0;
    padding: 10px;
    background: rgba(74, 63, 107, 0.3);
    border-radius: 6px;
    line-height: 1.5;
}

/* Disable selection tooltips/popup */
::selection {
    background: rgba(157, 139, 200, 0.3);
}

::-moz-selection {
    background: rgba(157, 139, 200, 0.3);
}

/* Hide any browser translation or selection popups */
[data-translate-tooltip],
[data-mce-bogus],
.translate-tooltip {
    display: none !important;
    visibility: hidden !important;
}

/* Calculations Section */
.calculations-section {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 2px solid #7d6ba8;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.calculations-section h2 {
    margin: 0 0 15px 0;
    color: #e8d5ff;
    font-size: 24px;
    font-weight: 600;
}

.calculations-section h3 {
    margin: 15px 0 10px 0;
    color: #c8b8d8;
    font-size: 18px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .deck-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    h1 {
        font-size: 36px;
    }

    .skill-header {
        grid-template-columns: 1fr;
    }

    .allocation-box {
        min-width: 100%;
    }
}

@media (max-width: 1024px) {
    .carousel {
        flex-direction: column;
        gap: 30px;
    }

    .carousel-btn {
        font-size: 36px;
        padding: 15px 20px;
        width: 100%;
    }

    .deck-name {
        font-size: 42px;
    }

    .deck-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .share-section {
        flex-direction: column;
    }

    .share-btn, .load-code-btn {
        width: 100%;
    }

    .build-details-container-inner {
        flex-direction: column;
    }

    .build-actions-section {
        flex-direction: row;
        width: 100%;
        min-width: auto;
    }

    .build-action-btn {
        flex: 1;
    }

    .content-wrapper {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .deck-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .skill-icons {
        flex-wrap: wrap;
    }

    .skill-icon {
        flex: 0 0 calc(25% - 10px);
    }

    h1 {
        font-size: 28px;
    }

    .alphabet-nav {
        gap: 8px;
    }

    .letter {
        padding: 8px 12px;
        font-size: 16px;
    }

    .build-info-row {
        flex-direction: column;
        gap: 8px;
    }

    .build-info-row label {
        padding-top: 0;
        min-width: auto;
    }

    .build-manager-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .build-tab-btn {
        width: 100%;
    }

    .content-wrapper {
        padding: 0 20px;
    }

    .spec-row {
        grid-template-columns: 1fr;
    }

    .firearm-dropdown-group,
    .equipment-dropdown-group,
    .auxiliary-dropdown-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .firearm-dropdown-group label,
    .equipment-dropdown-group label,
    .auxiliary-dropdown-group label {
        min-width: 100%;
    }

    .firearm-select,
    .equipment-select,
    .auxiliary-select {
        width: 100%;
    }

    .skill-details {
        grid-template-columns: 1fr;
    }

    .allocation-box {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .deck-buttons {
        grid-template-columns: 1fr;
    }

    .skill-icon {
        flex: 0 0 calc(50% - 6px);
    }
}

/* Buff Breakdown Collapse */
.buff-breakdown.collapsed .breakdown-content {
    max-height: 0 !important;
    overflow: hidden;
    margin-bottom: 0;
}

.buff-breakdown.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.buff-breakdown .breakdown-content {
    transition: max-height 0.3s ease, margin-bottom 0.3s ease;
}

.buff-breakdown .toggle-icon {
    transition: transform 0.3s ease;
}

/* Buff Totals Grid */
.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.total-buff-item {
    padding: 12px;
    background: linear-gradient(135deg, rgba(125, 107, 168, 0.3) 0%, rgba(157, 126, 199, 0.2) 100%);
    border-left: 4px solid #9d7ec7;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.total-buff-item:hover {
    background: linear-gradient(135deg, rgba(125, 107, 168, 0.4) 0%, rgba(157, 126, 199, 0.3) 100%);
    transform: translateX(3px);
}

/* Breakdown Header */
.breakdown-header {
    cursor: pointer;
    padding: 12px;
    background: rgba(125, 107, 168, 0.2);
    border-radius: 6px;
    margin-bottom: 10px;
    user-select: none;
    transition: background 0.3s ease;
}

.breakdown-header:hover {
    background: rgba(125, 107, 168, 0.3);
}

/* Damage Resistance Calculator */
.dr-calculator {
    background: linear-gradient(135deg, rgba(58, 47, 77, 0.4) 0%, rgba(42, 31, 61, 0.4) 100%);
    border: 2px solid #7d6ba8;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.dr-calculator h3 {
    color: #e8d5ff;
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
    border-bottom: 2px solid #7d6ba8;
    padding-bottom: 10px;
}

.dr-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.dr-section h4 {
    color: #c8b8d8;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.dr-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(125, 107, 168, 0.15);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dr-stat:hover {
    background: rgba(125, 107, 168, 0.25);
    transform: translateX(3px);
}

.dr-stat.highlight {
    background: linear-gradient(135deg, rgba(125, 107, 168, 0.3) 0%, rgba(157, 126, 199, 0.2) 100%);
    border-left: 4px solid #9d7ec7;
}

.dr-stat.highlight:hover {
    background: linear-gradient(135deg, rgba(125, 107, 168, 0.4) 0%, rgba(157, 126, 199, 0.3) 100%);
}

.dr-label {
    color: #c8b8d8;
    font-weight: 500;
    font-size: 14px;
}

.dr-value {
    color: #e8d5ff;
    font-weight: bold;
    font-size: 16px;
}

/* Build Manager Side Panel */
.build-manager-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    color: #f5f0e8;
    border: 2px solid #e8d5ff;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(139, 111, 168, 0.4);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.build-manager-toggle:hover {
    background: linear-gradient(135deg, #9b7fb8 0%, #7d6598 100%);
    box-shadow: 0 6px 20px rgba(139, 111, 168, 0.6);
    transform: translateY(-2px);
}

/* App Mode Navigation */
.app-mode-nav {
    background: rgba(42, 31, 61, 0.5);
    border-bottom: 2px solid #7d6ba8;
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 60px;
}

.app-mode-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #c8b8d8;
    padding: 18px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.app-mode-btn:hover {
    background: rgba(58, 47, 77, 0.4);
    color: #e8d5ff;
}

.app-mode-btn.active {
    background: rgba(58, 47, 77, 0.6);
    color: #e8d5ff;
    border-bottom-color: #9d8bc8;
    box-shadow: inset 0 -3px 0 0 #9d8bc8;
}

.app-mode-btn span {
    font-size: 20px;
}

/* Mode Content Panels */
.mode-content-container {
    width: 100%;
    margin-bottom: 30px;
}

.mode-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.mode-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mode-panel-header {
    background: linear-gradient(135deg, rgba(58, 47, 77, 0.6) 0%, rgba(42, 31, 61, 0.6) 100%);
    border: 2px solid #7d6ba8;
    border-radius: 8px;
    padding: 20px 30px;
    margin-bottom: 20px;
}

.mode-panel-header h2 {
    color: #e8d5ff;
    font-size: 28px;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.mode-panel-header p {
    color: #c8b8d8;
    margin: 0;
    font-size: 14px;
}

.build-manager-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(42, 31, 61, 0.98) 0%, rgba(26, 20, 40, 0.98) 100%);
    border-left: 3px solid #7d6ba8;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.build-manager-panel.open {
    right: 0;
}

.build-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #7d6ba8;
    background: rgba(58, 47, 77, 0.6);
    position: sticky;
    top: 0;
    z-index: 10;
}

.build-manager-header h2 {
    margin: 0;
    color: #e8d5ff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.close-panel-btn {
    background: transparent;
    border: none;
    color: #e8d5ff;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-panel-btn:hover {
    background: rgba(157, 139, 200, 0.2);
    transform: rotate(90deg);
}

.build-manager-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Build List */
.builds-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.build-item {
    background: rgba(58, 47, 77, 0.4);
    border: 2px solid #7d6ba8;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.build-item:hover {
    background: rgba(58, 47, 77, 0.6);
    border-color: #9d8bc8;
    transform: translateX(-4px);
    box-shadow: 0 4px 16px rgba(139, 111, 168, 0.3);
}

.build-item.active {
    background: rgba(139, 111, 168, 0.3);
    border-color: #e8d5ff;
    box-shadow: 0 0 16px rgba(139, 111, 168, 0.4);
}

.build-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.build-item-title {
    color: #e8d5ff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.build-item-actions {
    display: flex;
    gap: 8px;
}

.build-action-btn {
    background: rgba(125, 107, 168, 0.3);
    border: 1px solid #7d6ba8;
    color: #e8d5ff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.build-action-btn:hover {
    background: rgba(157, 139, 200, 0.5);
    border-color: #9d8bc8;
}

.build-action-btn.delete:hover {
    background: rgba(200, 80, 80, 0.5);
    border-color: #c85050;
}

.build-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.build-tag {
    background: rgba(139, 111, 168, 0.3);
    color: #c8b8d8;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-item-description {
    color: #c8b8d8;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.build-item-overview {
    color: #9d8bc8;
    font-size: 12px;
    line-height: 1.5;
    padding-top: 8px;
    border-top: 1px solid rgba(125, 107, 168, 0.3);
}

.build-item-overview strong {
    color: #c8b8d8;
}

/* Add New Build Button */
.add-build-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    border: 2px dashed #e8d5ff;
    color: #f5f0e8;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-build-btn:hover {
    background: linear-gradient(135deg, #9b7fb8 0%, #7d6598 100%);
    box-shadow: 0 4px 16px rgba(139, 111, 168, 0.4);
    transform: translateY(-2px);
}

/* Build Editor Modal */
.build-editor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.build-editor-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.build-editor-content {
    background: linear-gradient(135deg, #2a1f3d 0%, #1a1428 100%);
    border: 3px solid #7d6ba8;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.build-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #7d6ba8;
    background: rgba(58, 47, 77, 0.6);
}

.build-editor-header h3 {
    margin: 0;
    color: #e8d5ff;
    font-size: 22px;
    font-weight: 700;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: #e8d5ff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(157, 139, 200, 0.2);
    transform: rotate(90deg);
}

.build-editor-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e8d5ff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(26, 20, 40, 0.8);
    border: 2px solid #7d6ba8;
    color: #f5f0e8;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 12px rgba(139, 111, 168, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.build-overview-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #7d6ba8;
}

.build-overview-section h4 {
    color: #e8d5ff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-overview {
    background: rgba(58, 47, 77, 0.4);
    border: 2px solid #7d6ba8;
    border-radius: 6px;
    padding: 15px;
    color: #c8b8d8;
    font-size: 13px;
    line-height: 1.6;
}

.build-overview p {
    margin: 8px 0;
}

.build-overview strong {
    color: #e8d5ff;
}

.build-editor-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #7d6ba8;
}

.save-build-btn,
.cancel-build-btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.save-build-btn {
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    border: 2px solid #e8d5ff;
    color: #f5f0e8;
}

.save-build-btn:hover {
    background: linear-gradient(135deg, #9b7fb8 0%, #7d6598 100%);
    box-shadow: 0 4px 16px rgba(139, 111, 168, 0.5);
    transform: translateY(-2px);
}

.cancel-build-btn {
    background: rgba(58, 47, 77, 0.6);
    border: 2px solid #7d6ba8;
    color: #c8b8d8;
}

.cancel-build-btn:hover {
    background: rgba(58, 47, 77, 0.8);
    border-color: #9d8bc8;
}

/* Responsive adjustments for build manager */
@media (max-width: 768px) {
    .build-manager-panel {
        width: 100%;
        right: -100%;
    }

    .build-manager-toggle {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .build-editor-content {
        width: 95%;
    }
}

/* Community Builds Specific Styles */
.community-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #7d6ba8;
}

.community-search {
    width: 100%;
    background: rgba(26, 20, 40, 0.8);
    border: 2px solid #7d6ba8;
    color: #f5f0e8;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.community-search:focus {
    outline: none;
    border-color: #9d8bc8;
    box-shadow: 0 0 12px rgba(139, 111, 168, 0.3);
}

.filter-select {
    background: rgba(26, 20, 40, 0.8);
    border: 2px solid #7d6ba8;
    color: #f5f0e8;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #9d8bc8;
}

.refresh-btn {
    background: linear-gradient(135deg, #8b6fa8 0%, #6d5588 100%);
    border: 2px solid #9d8bc8;
    color: #f5f0e8;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #9b7fb8 0%, #7d6598 100%);
    box-shadow: 0 4px 12px rgba(139, 111, 168, 0.4);
    transform: translateY(-1px);
}

.share-community-btn {
    background: linear-gradient(135deg, #6e8bff 0%, #5570d8 100%);
    border: 2px solid #8ea8ff;
    color: #f5f0e8;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-community-btn:hover {
    background: linear-gradient(135deg, #7e9bff 0%, #6580e8 100%);
    box-shadow: 0 4px 16px rgba(110, 139, 255, 0.5);
    transform: translateY(-2px);
}

.community-build-item {
    position: relative;
}

.community-build-item .build-item-actions {
    display: flex;
    gap: 6px;
}

.reaction-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(139, 111, 168, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #e8d5ff;
}

.build-author {
    color: #9d8bc8;
    font-size: 11px;
    font-style: italic;
    margin-top: 6px;
}

/* Community build item meta */
.build-item-meta {
    margin: 8px 0;
    font-size: 13px;
    color: #c8b8d8;
}

.build-class {
    text-transform: capitalize;
}

/* Build details toggle */
.build-details-toggle {
    margin: 12px 0 8px 0;
}

.toggle-details-btn {
    background: linear-gradient(135deg, #6e5d8b 0%, #5d4d7a 100%);
    border: 1px solid #8b7ba8;
    color: #e0d4f7;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    width: 100%;
}

.toggle-details-btn:hover {
    background: linear-gradient(135deg, #7d6c9a 0%, #6c5c89 100%);
    border-color: #9d8bc8;
}

/* Build details content */
.build-details-content {
    background: rgba(93, 77, 122, 0.2);
    border: 1px solid #6e5d8b;
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
}

.community-build-preview {
    font-size: 13px;
    line-height: 1.6;
}

.community-build-preview p {
    margin: 6px 0;
    padding: 4px 0;
    border-bottom: 1px solid rgba(157, 139, 200, 0.1);
}

.community-build-preview p:last-child {
    border-bottom: none;
}

.community-build-preview strong {
    color: #e0d4f7;
}

/* Responsive community builds */
@media (max-width: 768px) {
    .community-filters {
        gap: 8px;
    }

    .filter-select {
        font-size: 12px;
    }

    .build-item-meta {
        font-size: 12px;
    }

    .community-build-preview {
        font-size: 12px;
    }
}

/* Class Selection Section (Above Tabs) */
.class-selection-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.class-selection-section label {
    font-size: 16px;
    font-weight: 600;
    color: #e8d5ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.class-selection-section select {
    background: #4a3f6b;
    color: #f5f0e8;
    border: 2px solid #7d6ba8;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.class-selection-section select option {
    background: #2a1f3d;
    color: #f5f0e8;
    padding: 10px;
}

.class-selection-section select:hover {
    border-color: #9d8bc8;
    background: #5a4f7b;
}

.class-selection-section select:focus {
    outline: none;
    border-color: #e8d5ff;
    box-shadow: 0 0 16px rgba(232, 213, 255, 0.4);
}

.class-selection-section .class-description {
    flex: 1;
    margin: 0;
    padding: 12px 20px;
    background: rgba(58, 47, 77, 0.4);
    border-radius: 8px;
    border-left: 3px solid #7d6ba8;
    color: #c8b8d8;
    font-size: 14px;
    line-height: 1.6;
}

/* Calculations Section */
.calculations-section {
    padding: 30px;
}

.calculations-section h2 {
    color: #e8d5ff;
    font-size: 32px;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.calc-credits {
    color: #c8b8d8;
    font-size: 13px;
    margin: 5px 0;
    line-height: 1.6;
}

/* Weapon Tabs */
.weapon-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #7d6ba8;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.weapon-tab-btn {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    color: #c8b8d8;
    border: 2px solid #7d6ba8;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weapon-tab-btn:hover {
    background: linear-gradient(135deg, #5a4f7b 0%, #45395f 100%);
    color: #e8d5ff;
    border-color: #9d8bc8;
}

.weapon-tab-btn.active {
    background: linear-gradient(135deg, #7d6ba8 0%, #6d5a98 100%);
    color: #f5f0e8;
    border-color: #e8d5ff;
    box-shadow: 0 -2px 12px rgba(125, 107, 168, 0.4);
}

/* Body Damage Layout */
.body-damage-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 15px;
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Body Diagram SVG */
.body-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
}

.body-diagram svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.body-part {
    transition: all 0.3s ease;
    cursor: pointer;
}

.body-part:hover {
    filter: brightness(1.3);
    stroke-width: 5;
}

/* Calculators Grid Layout */
.calculators-grid {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 25px;
    margin-top: 20px;
}

.damage-calculator-column {
    min-width: 0; /* Prevents grid overflow */
}

.dr-calculator-column {
    min-width: 0; /* Prevents grid overflow */
    max-height: 100vh;
    overflow-y: auto;
}

/* Weapon Base Stats Container */
.weapon-base-stats {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.weapon-base-stats h3 {
    color: #e8d5ff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 12px 0;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #7d6ba8;
}

.base-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.base-stat-item {
    text-align: center;
}

.base-stat-item .stat-label {
    color: #c8b8d8;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 5px;
}

.base-stat-item .stat-value {
    color: #e8d5ff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Body Damage Stats Container */
.body-damage-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.damage-stat-box {
    background: linear-gradient(135deg, #4a3f6b 0%, #35294f 100%);
    border: 3px solid #7d6ba8;
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.damage-stat-box:hover {
    border-color: #9d8bc8;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(125, 107, 168, 0.5);
}

.damage-stat-box h3 {
    color: #e8d5ff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 8px 0;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #7d6ba8;
}

.damage-stat-box .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(125, 107, 168, 0.3);
}

.damage-stat-box .stat-row:last-child {
    border-bottom: none;
}

.damage-stat-box .stat-label {
    color: #c8b8d8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.damage-stat-box .stat-value {
    color: #f5f0e8;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.damage-stat-box .stat-section {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(125, 107, 168, 0.2);
}

.damage-stat-box .stat-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.damage-stat-box .stat-section h4 {
    color: #9d8bc8;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 5px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(125, 107, 168, 0.4);
}

.damage-stat-box .stat-row.highlight {
    background: rgba(125, 107, 168, 0.15);
    padding: 10px 8px;
    margin: 0 -8px;
    border-radius: 6px;
    border-bottom: 1px solid rgba(125, 107, 168, 0.4);
}

.damage-stat-box .stat-row.highlight .stat-label {
    color: #e8d5ff;
}

.damage-stat-box .stat-row.highlight .stat-value {
    color: #e8d5ff;
    font-size: 15px;
}

/* Headshot Box - Red accent */
.headshot-box {
    border-color: #d97d7d;
}

.headshot-box:hover {
    border-color: #ff9999;
    box-shadow: 0 8px 24px rgba(217, 125, 125, 0.5);
}

.headshot-box h3 {
    color: #ff9999;
    border-bottom-color: #d97d7d;
}

/* Body Shot Box - Purple accent (default) */
.bodyshot-box {
    border-color: #7d6ba8;
}

.bodyshot-box h3 {
    color: #e8d5ff;
}

/* Leg Shot Box - Blue accent */
.legshot-box {
    border-color: #7d9ec7;
}

.legshot-box:hover {
    border-color: #99bfff;
    box-shadow: 0 8px 24px rgba(125, 158, 199, 0.5);
}

.legshot-box h3 {
    color: #99bfff;
    border-bottom-color: #7d9ec7;
}

/* Detailed Stats */
.detailed-stats {
    background: linear-gradient(135deg, #3a2f4d 0%, #2a1f3d 100%);
    border: 3px solid #7d6ba8;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.detailed-stats h3 {
    color: #e8d5ff;
    font-size: 24px;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.detailed-stats p {
    color: #c8b8d8;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1200px) {
    .damage-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
