/* Styles for the Data Mining Modal */
:root {
    --datamining-primary-font: 'Roboto Mono', monospace;
    --datamining-accent-font: 'Press Start 2P', cursive;
    --datamining-glow-color: #00FFDC;
    --datamining-text-primary: #E0F0FF;
    --datamining-text-secondary: #A0C0E0;
    --datamining-timer-text: #FFA500;
}

.datamining-modal {
    position: fixed;
    z-index: 1002; /* Ensure it's above other modals if necessary */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Slightly darker for more focus */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    backdrop-filter: blur(6px); /* Stronger blur */
}

.datamining-modal.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease;
}

.datamining-modal-content {
    background: linear-gradient(145deg, rgba(10, 25, 40, 0.97), rgba(20, 35, 55, 0.97)); /* Consistent with wallet */
    margin: auto;
    padding: 0;
    border: 1px solid rgba(0, 255, 220, 0.6); /* Consistent with wallet */
    border-radius: 15px;
    width: 90%;
    max-width: 500px; /* Wider for more content */
    box-shadow: 0 10px 50px rgba(0, 255, 220, 0.7), 0 0 20px rgba(0,0,0,0.4); /* Consistent with wallet */
    color: var(--datamining-text-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--datamining-primary-font);
}

.datamining-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(0, 255, 220, 0.4);
}

.datamining-modal-header h3 {
    color: var(--datamining-glow-color);
    margin: 0;
    font-size: 1.7em;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(0, 255, 220, 0.8);
}

.datamining-timer {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--datamining-timer-text);
    background-color: rgba(0,0,0,0.4);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255,165,0,0.5);
}

.datamining-modal-close-button {
    background: none;
    border: none;
    color: var(--datamining-text-secondary);
    font-size: 2.3em;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.datamining-modal-close-button:hover {
    color: var(--datamining-glow-color);
    transform: scale(1.1);
}

.datamining-modal-body {
    padding: 20px 25px 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 70vh; /* Limit height and allow scrolling if content overflows */
    overflow-y: auto; /* Add scroll for body if content is too tall */
}

/* New styles for Dataminer Info Banner */
.datamining-info-banner {
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.25); /* Darker, distinct background */
    border-bottom: 1px solid rgba(0, 255, 220, 0.2);
    text-align: center;
    margin-bottom: 15px; /* Space before the central zone */
    border-radius: 8px;
}

.dataminer-name {
    font-family: var(--datamining-accent-font); /* Use accent font for the name */
    font-size: 1.3em;
    color: var(--datamining-glow-color);
    text-shadow: 0 0 5px rgba(0, 255, 220, 0.7);
    margin-right: 10px;
    display: block; /* Make it block to take full width or for margin bottom */
    margin-bottom: 5px;
}

.dataminer-difficulty {
    font-family: var(--datamining-primary-font);
    font-size: 0.9em;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Difficulty-specific colors - assuming you have these values in your JSON */
.datamining-difficulty-safe {
    color: #50C878; /* Emerald Green */
    background-color: rgba(80, 200, 120, 0.1);
    border: 1px solid rgba(80, 200, 120, 0.4);
}

.datamining-difficulty-moderate {
    color: #FFD700; /* Gold */
    background-color: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.datamining-difficulty-risky {
    color: #FF8C00; /* DarkOrange */
    background-color: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.4);
}

.datamining-difficulty-extreme {
    color: #DC143C; /* Crimson */
    background-color: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.4);
}

.datamining-difficulty-normal { /* Fallback if not specified or unknown */
    color: var(--datamining-text-secondary);
    background-color: rgba(160, 192, 224, 0.1); /* text-secondary with alpha */
    border: 1px solid rgba(160, 192, 224, 0.4);
}

/* Custom scrollbar for modal body (Webkit browsers) */
.datamining-modal-body::-webkit-scrollbar {
    width: 8px;
}
.datamining-modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}
.datamining-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 220, 0.5);
    border-radius: 4px;
}
.datamining-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 220, 0.8);
}


.datamining-central-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 220, 0.2);
}

.datamining-image-container {
    position: relative;
    width: 100%;
    line-height: 0; /* Prevents extra space under the image */
    border-radius: 8px; /* Match the placeholder's original rounding */
    overflow: hidden; /* Crucial for containing the overlay and rounded corners */
}

.animation-placeholder {
    width: 100%;
    height: auto; /* Adjust for image aspect ratio */
    max-height: 180px; /* Control max image height */
    object-fit: cover; /* Ensure image covers the area, may crop */
    background-color: rgba(0,10,20,0.5); /* Kept for fallback or if image fails to load */
    border: none; /* The container handles borders now */
    border-radius: 0; /* Let the container handle rounding */
    display: block; /* Fixes potential inline spacing issues */
}

.datamining-description-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 15px 15px; /* More padding at the top for gradient effect */
    color: var(--datamining-text-primary);
    font-size: 0.9em;
    font-style: italic;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.75) 40%, rgba(0, 0, 0, 0) 100%);
    box-sizing: border-box;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,1);
    border-radius: 0 0 8px 8px; /* Match container rounding at the bottom */
}

.progress-bar-container {
    width: 100%;
    height: 18px; 
    background-color: rgba(0,0,0,0.5);
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 220, 0.4);
}

.progress-bar-fill {
    height: 100%;
    width: 0%; /* Initial width */
    background: linear-gradient(90deg, var(--datamining-glow-color), #00A2FF); /* Use variable, kept blue part of gradient */
    border-radius: 8px;
    transition: width 0.3s ease-out;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
}

.estimated-gains {
    font-size: 1em;
    color: var(--datamining-text-secondary);
    font-weight: 500;
    text-align: center;
    padding: 15px; /* Increased padding */
    background-color: rgba(10, 30, 50, 0.6); /* Darker, glowing box */
    border-radius: 10px; /* Slightly larger radius */
    border: 1px solid var(--datamining-glow-color); /* Glow border */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(0, 255, 220, 0.15); /* Glow shadow */
    transition: all 0.3s ease;
}

.main-gain-label {
    font-size: 1em;
    color: var(--datamining-text-secondary);
    margin-bottom: 20px; /* More space */
    font-weight: 500;
}

.main-gain-values-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the items horizontally */
    gap: 15px; /* Space between rows */
    width: 100%;
}

.gain-item {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Left-align content within the item */
    width: 100%;
    max-width: 260px; /* Control max width for alignment */
    padding: 0 15px; /* Padding for spacing */
    box-sizing: border-box;
}

.gain-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-right: 20px; /* Space between icon and details */
}

.gain-details {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.gain-value-highlight {
    font-family: var(--datamining-accent-font);
    font-size: 2.2em;
    color: var(--datamining-glow-color);
    text-shadow: 0 0 8px rgba(0, 255, 220, 0.7);
    font-weight: normal;
    line-height: 1;
}

.gain-unit {
    font-family: var(--datamining-primary-font);
    font-size: 1.1em;
    color: var(--datamining-text-primary);
    font-weight: 600;
}

.session-duration-display {
    font-size: 0.85em;
    color: var(--datamining-text-secondary);
    margin-bottom: 12px;
    font-style: italic;
}

.outcome-chances-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column; /* Changed from row to column */
    gap: 8px; /* Space between outcome items */
}

.outcome-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    background-color: rgba(10, 30, 50, 0.5);
    border-left: 4px solid transparent; /* For the color accent */
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.outcome-row:hover {
    background-color: rgba(20, 40, 60, 0.7);
    transform: scale(1.02);
}

.outcome-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.outcome-name {
    font-weight: 600;
    font-size: 1em;
    color: var(--datamining-text-primary);
}

.outcome-lore {
    font-size: 0.85em;
    color: var(--datamining-text-secondary);
    font-style: italic;
    font-weight: 400;
}

.outcome-chance {
    font-family: var(--datamining-accent-font);
    font-size: 1.1em;
    font-weight: bold;
    padding-left: 15px; /* space between info and chance */
}

/* Specific styles for outcomes - using border and chance color */
.outcome-quantum {
    border-left-color: #C500C5; /* Magenta */
}
.outcome-quantum .outcome-chance {
    color: #E066E0;
    text-shadow: 0 0 4px #C500C5;
}

.outcome-hyper {
    border-left-color: #00A800; /* Green */
}
.outcome-hyper .outcome-chance {
    color: #50C878;
    text-shadow: 0 0 4px #00A800;
}

.outcome-fumbled {
    border-left-color: #D94800; /* OrangeRed */
}
.outcome-fumbled .outcome-chance {
    color: #FF8C00;
    text-shadow: 0 0 4px #D94800;
}

.outcome-normal {
    border-left-color: var(--datamining-text-secondary); 
}
.outcome-normal .outcome-chance {
    color: var(--datamining-text-primary);
}

.datamining-stats-panel {
    padding: 15px;
    background-color: rgba(0,0,0,0.15);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 220, 0.2);
}

.datamining-stats-panel h4 {
    margin: 0 0 15px 0;
    color: var(--datamining-glow-color);
    text-align: center;
    font-size: 1.2em;
    text-shadow: 0 0 4px rgba(0, 255, 220, 0.6);
}

.datamining-stats-panel > div {
    padding: 12px 15px; /* Adjusted padding for a slightly better look with single line text */
    border-radius: 8px; 
    margin-bottom: 10px; 
    font-size: 0.9em; 
    color: var(--datamining-text-primary); 
    box-sizing: border-box; /* Good practice */
    /* background, box-shadow, border, backdrop-filter will be applied by ID specific rules */
    /* text-align: left; by default, which matches the screenshot */
}

#datamining-stat-neural {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.35), rgba(0, 180, 255, 0.2));
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

#datamining-stat-cyber {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.35), rgba(255, 0, 255, 0.2));
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
    border: 1px solid rgba(255, 0, 128, 0.6);
    backdrop-filter: blur(5px);
}

#datamining-stat-bio {
    background: linear-gradient(135deg, rgba(0, 255, 128, 0.35), rgba(0, 200, 100, 0.2));
    box-shadow: 0 0 15px rgba(0, 255, 128, 0.3);
    border: 1px solid rgba(0, 255, 128, 0.6);
    backdrop-filter: blur(5px);
}

#datamining-stat-quantum {
    background: linear-gradient(135deg, rgba(128, 0, 255, 0.35), rgba(200, 0, 255, 0.2));
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.3);
    border: 1px solid rgba(128, 0, 255, 0.6);
    backdrop-filter: blur(5px);
}

.datamining-stats-panel > div:last-child {
    margin-bottom: 0;
}

.datamining-action-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* Adjusted spacing */
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
}

.action-button {
    font-family: var(--datamining-accent-font); /* Changed font */
    background-color: transparent; /* Changed background */
    border: 2px solid var(--datamining-glow-color); /* Added border */
    color: var(--datamining-glow-color); /* Changed text color */
    padding: 12px 20px; /* Adjusted padding */
    font-size: 1em; /* Adjusted font size */
    font-weight: normal; /* Changed font weight */
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s; /* Adjusted transition */
    border-radius: 99px; /* Pill shape like wallet buttons */
    letter-spacing: 0.5px; /* Adjusted letter spacing */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.2;
    min-height: 52px; /* Set a min-height to prevent resizing */
    box-sizing: border-box;
    width: 100%; /* Make button full width */
}

.action-button-main-text {
    display: block;
}

.action-button-subtext {
    font-size: 0.65em;
    font-weight: 400;
    text-transform: none;
    opacity: 0.8;
    margin-top: 3px;
    font-family: var(--datamining-primary-font);
}

.action-button:hover:not(:disabled) {
    background-color: var(--datamining-glow-color); /* Match wallet button hover */
    color: #0A1E32; /* Dark text on hover, consistent */
    border-color: #A0A0A0; /* Added border color for disabled */
    cursor: not-allowed;
    box-shadow: none; /* Ensured no shadow when disabled */
}

.action-button:disabled {
    background-color: transparent; /* Changed background for disabled */
    color: #A0A0A0; /* Kept text color for disabled */
    border-color: #A0A0A0; /* Added border color for disabled */
    cursor: not-allowed;
    box-shadow: none; /* Ensured no shadow when disabled */
}

.session-history {
    font-size: 0.9em;
    color: var(--datamining-text-secondary);
    background-color: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 6px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid rgba(0, 255, 220, 0.1);
}

/* Styles for the energy cost display */
.start-cost-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
    padding: 5px 10px;
    /* margin-bottom: 12px; Removed in favor of parent gap */
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.25); /* Subtle background */
    border: 1px solid rgba(255, 215, 0, 0.3); /* Gold-ish border, subtle */
}

.start-cost-display img {
    width: 22px; /* Slightly larger icon */
    height: 22px;
}

.start-cost-display span {
    font-family: var(--datamining-primary-font);
    font-size: 0.95em;
    color: #FFD700; /* Gold color for the text - kept as is, distinct */
    font-weight: 500;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 520px) {
    .datamining-modal-content {
        max-width: 95%;
        margin: 15px auto;
    }
    .datamining-modal-header h3 {
        font-size: 1.4em;
    }
    .datamining-timer {
        font-size: 0.8em;
        padding: 4px 8px;
    }
    .datamining-modal-body {
        padding: 15px;
        gap: 15px;
    }
    .animation-placeholder {
        height: 100px;
    }
    .action-button {
        padding: 10px 20px;
        font-size: 1em;
    }
}

.datamining-bottom-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
} 