#in-house-download-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: radial-gradient(circle at top, rgba(40, 40, 40, 0.35) 0%, rgba(8, 8, 8, 0.95) 55%, #050505 100%);
    padding: 200px 20px 110px;
    box-sizing: border-box;
    margin-top: var(--navbar-offset, 96px);
    padding-top: 200px !important;
}

.download-data-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.download-data-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.download-data-overlay.hidden {
    display: none;
}

.download-data-overlay-content {
    background: rgba(20, 20, 20, 0.96);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.6);
}

.download-data-overlay-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(212, 175, 55, 0.25);
    border-top-color: rgba(212, 175, 55, 0.85);
    border-radius: 50%;
    animation: download-spin 0.9s linear infinite;
}

.download-data-overlay-text {
    color: #f4f4f4;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.download-data-questions {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-card {
    background: rgba(20, 20, 20, 0.94);
    overflow: visible;
    border-radius: 16px;
    padding: 28px 32px;
    color: #f1f1f1;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid rgba(180, 180, 180, 0.18);
    position: relative;
}

.question-card.hidden {
    display: none;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d4af37, #e2c463);
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    align-self: flex-start;
}

.question-label-with-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-label {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.info-icon {
    font-size: 1.1rem;
    color: rgba(212, 175, 55, 0.85);
    cursor: help;
    transition: color 0.2s ease, transform 0.2s ease;
}

.info-icon:hover {
    color: rgba(212, 175, 55, 1);
    transform: scale(1.1);
}

.info-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(12, 12, 12, 0.98);
    color: #f4f4f4;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    white-space: normal;
    width: 320px;
    max-width: 90vw;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(12, 12, 12, 0.98);
}

.info-icon-wrapper:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

.question-select,
.date-input,
.pitcher-search-input {
    width: 100%;
    background: rgba(14, 14, 14, 0.9);
    color: #f6f6f6;
    border: 1px solid rgba(160, 160, 160, 0.35);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.98rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.question-select:focus,
.date-input:focus,
.pitcher-search-input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.85);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.question-select:hover,
.date-input:hover,
.pitcher-search-input:hover {
    border-color: rgba(212, 175, 55, 0.55);
}

.date-range-container {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.date-input-group {
    flex: 1;
    min-width: 210px;
}

.date-input-group label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: rgba(232, 232, 232, 0.8);
}

.selected-pitcher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-pitcher-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #0d0d0d;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.selected-pitcher-badge i {
    font-size: 1.1rem;
}

.pitcher-search-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    margin-bottom: 40px;
    z-index: 2;
}

.pitcher-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pitcher-loading {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-top-color: rgba(212, 175, 55, 0.8);
    border-radius: 50%;
    animation: download-spin 0.75s linear infinite;
}

.pitcher-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: rgba(12, 12, 12, 0.96);
    border: 1px solid rgba(160, 160, 160, 0.4);
    border-radius: 12px;
    box-shadow: 0 26px 46px rgba(0, 0, 0, 0.6);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 3000;
    pointer-events: auto;
}

.pitcher-result-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    color: #f0f0f0;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pitcher-result-item:hover,
.pitcher-result-item:focus {
    outline: none;
    background: rgba(212, 175, 55, 0.18);
    border-color: rgba(212, 175, 55, 0.35);
}

.pitcher-result-item mark {
    background: rgba(212, 175, 55, 0.35);
    color: inherit;
    padding: 0 2px;
    border-radius: 4px;
}

.pitcher-result-item.is-selected {
    background: rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.45);
    color: #fff;
}

.pitcher-results.is-open {
    display: flex;
}

.pitcher-empty-message {
    font-size: 0.95rem;
    color: rgba(210, 210, 210, 0.75);
    text-align: left;
    margin-top: 12px;
}

.pitcher-empty-message.hidden {
    display: none;
}

.data-viewer-container {
    width: 100%;
    max-width: 1040px;
    background: rgba(20, 20, 20, 0.96);
    border-radius: 18px;
    padding: 32px 36px 40px;
    color: #f4f4f4;
    border: 1px solid rgba(180, 180, 180, 0.18);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.55);
}

.data-viewer-container.hidden {
    display: none;
}

.data-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(180, 180, 180, 0.15);
    padding-bottom: 18px;
}

.data-viewer-header h3 {
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    margin: 0;
}

.data-viewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(220, 220, 220, 0.78);
}

.data-viewer-info .separator {
    color: rgba(180, 180, 180, 0.45);
}

.data-table-wrapper {
    border-radius: 12px;
    border: 1px solid rgba(140, 140, 140, 0.22);
    max-height: 520px;
    overflow: auto;
    background: rgba(12, 12, 12, 0.92);
}

.data-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    color: #f4f4f4;
}

.data-table th {
    background: rgba(27, 27, 27, 0.98);
    position: sticky;
    top: 0;
    padding: 12px 16px;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(180, 180, 180, 0.2);
    z-index: 10;
}

.data-table td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(120, 120, 120, 0.15);
    font-size: 0.9rem;
}

.data-table tbody tr:nth-child(odd) {
    background: rgba(18, 18, 18, 0.82);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(10, 10, 10, 0.82);
}

.data-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.16);
}

.download-csv-btn {
    margin-top: 26px;
    align-self: flex-end;
    background: linear-gradient(135deg, #d4af37, #e2c463);
    color: #1a1a1a;
    border: none;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 18px 42px rgba(212, 175, 55, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.download-csv-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #e0c15d, #f0d986);
    box-shadow: 0 22px 50px rgba(212, 175, 55, 0.45);
}

.download-csv-btn:active {
    transform: translateY(0);
}

.download-csv-btn i {
    font-size: 1.05rem;
}

.data-table-wrapper::-webkit-scrollbar {
    width: 10px;
}

.data-table-wrapper::-webkit-scrollbar-track {
    background: rgba(18, 18, 18, 0.7);
}

.data-table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(140, 140, 140, 0.4);
    border-radius: 6px;
}

.data-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.35);
}

.pitcher-results::-webkit-scrollbar {
    width: 8px;
}

.pitcher-results::-webkit-scrollbar-track {
    background: rgba(18, 18, 18, 0.9);
}

.pitcher-results::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.4);
    border-radius: 6px;
}

.pitcher-results::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.35);
}

.hidden {
    display: none !important;
}

@keyframes download-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    #in-house-download-container {
        padding: 48px 16px 80px;
    }

    .download-data-header {
        padding: 24px;
    }

    .download-data-header .clean-title {
        font-size: 1.65rem;
    }

    .question-card {
        padding: 24px;
    }

    .date-range-container {
        flex-direction: column;
    }

    .data-viewer-container {
        padding: 24px;
    }

    .download-csv-btn {
        width: 100%;
        justify-content: center;
    }
}
