:root { /* Remove if vars only in clay-theme.css */ }

#training-grounds-layout {
    padding: 1.5rem; /* Increased padding */
    height: calc(100vh - 5rem); /* Keep height */
    background-color: var(--clay-darkest); /* Use theme variable */
    color: var(--clay-text-primary); /* Use theme variable */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 1.5rem; /* Increased gap */
}

#training-header {
    display: flex; /* Keep layout */
    justify-content: space-between; /* Keep layout */
    align-items: center; /* Keep layout */
    padding-bottom: 1rem; /* Add padding */
    border-bottom: 1px solid var(--clay-border); /* Use theme variable */
    flex-shrink: 0; /* Keep layout */
}

.training-title {
    font-size: 1.5rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    color: var(--clay-text-primary); /* Use theme variable */
    margin: 0;
}

#training-grounds-layout .back-button {
    /* Styles handled by theme */
}

#universal-training-cap {
    display: flex; /* Keep layout */
    justify-content: center; /* Keep layout */
    align-items: center; /* Keep layout */
    background-color: var(--clay-dark); /* Use theme variable */
    padding: 0.75rem 1rem; /* Keep padding */
    border-radius: 0.5rem; /* Keep rounding */
    font-size: 1rem; /* Adjusted size */
    font-weight: 500; /* Adjusted weight */
    color: var(--clay-text-secondary); /* Use theme variable */
    flex-shrink: 0; /* Keep layout */
    border: 1px solid var(--clay-border); /* Use theme variable */
    /* Removed margin: 0 1rem; handled by layout gap */
    box-shadow: var(--clay-shadow); /* Add shadow */
}

#current-cap-display {
    margin: 0; /* Keep layout */
}
#current-cap-display span { /* Target the numbers */
    color: var(--clay-text-primary); /* Make numbers brighter */
    font-family: monospace;
}

.stat-points-display {
    display: flex; /* Keep layout */
    align-items: center; /* Keep layout */
    gap: 0.5rem; /* Keep spacing */
    padding: 0.3rem 0.75rem; /* Adjusted padding */
    background-color: var(--clay-dark); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.375rem; /* Keep rounding */
    color: var(--clay-text-primary); /* Ensure text is visible */
    font-weight: 600;
    font-family: monospace;
}

.stat-point-icon {
    width: 20px; /* Adjusted size */
    height: 20px; /* Adjusted size */
}

#training-content-scroll-container {
    flex-grow: 1; /* Keep layout */
    overflow-y: auto; /* Keep layout */
    padding-right: 0.5rem; /* Scrollbar padding */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 1.5rem; /* Keep spacing */
}

#training-stats-container {
    display: grid; /* Keep layout */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Adjusted min size */
    gap: 1rem; /* Keep spacing */
    align-content: start; /* Keep layout */
}

.training-stat-card {
    background: var(--gradient-surface); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.5rem; /* Keep rounding */
    padding: 0.75rem; /* Keep padding */
    box-shadow: var(--clay-shadow); /* Use theme variable */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 0.5rem; /* Keep spacing */
    transition: all 0.2s ease-in-out; /* Keep transition */
}

/* REMOVED HOVER EFFECT FOR TRAINING STAT CARD
.training-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--clay-border-light);
    box-shadow: var(--clay-shadow-heavy);
} */

.stat-card-header {
    display: flex; /* Keep layout */
    justify-content: flex-start; /* Keep layout */
    align-items: center; /* Keep layout */
}

.stat-card-header h3 {
    font-size: 0.8rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    text-transform: uppercase; /* Keep layout */
    color: var(--clay-text-tertiary); /* Use theme variable */
    margin: 0;
}

.xp-bar-container { /* Reusing name, adjust if causes conflicts */
    width: 100%; /* Keep layout */
    background-color: var(--clay-darker); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.25rem; /* Adjusted rounding */
    height: 1.5rem; /* Adjusted height */
    position: relative; /* Keep layout */
    overflow: hidden; /* Keep layout */
    margin-bottom: 0.5rem; /* Keep spacing */
}

.xp-bar-fill {
    height: 100%; /* Keep layout */
    /* Background color set inline by JS */
    opacity: 0.3; /* Make fill transparent */
    border-radius: 0.25rem; /* Keep rounding */
}

.xp-bar-text {
    position: absolute; /* Keep layout */
    top: 50%; /* Keep layout */
    left: 50%; /* Keep layout */
    transform: translate(-50%, -50%); /* Keep layout */
    font-size: 0.8rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    color: var(--clay-text-primary); /* Use theme variable */
    white-space: nowrap; /* Keep layout */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Add shadow for readability */
}

.stat-card-body {
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 0.5rem; /* Keep spacing */
    margin-top: auto; /* Keep layout */
}

.stat-card-body p {
    font-size: 0.8rem; /* Adjusted size */
    margin: 0; /* Keep layout */
    color: var(--clay-text-muted); /* Use theme variable */
    text-align: center; /* Center invested text */
    font-family: monospace;
}

.train-btn {
    /* Styles handled by theme */
    padding: 0.3rem 0.6rem; /* Adjusted padding */
    font-size: 0.75rem; /* Adjusted size */
}

.train-btn:disabled {
    /* Styles handled by theme */
}

/* Utilities (remove if already in main.css) */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.justify-center { justify-content: center; }

/* Upgrades Section */
#training-upgrades-section {
    display: grid; /* Keep layout */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted min size */
    gap: 1.5rem; /* Keep spacing */
}

.upgrade-card {
    background: var(--gradient-surface); /* Use theme variable */
    border: 1px solid var(--clay-border); /* Use theme variable */
    border-radius: 0.75rem; /* Keep rounding */
    padding: 1.25rem; /* Adjusted padding */
    display: flex; /* Keep layout */
    flex-direction: column; /* Keep layout */
    gap: 0.75rem; /* Adjusted gap */
    box-shadow: var(--clay-shadow); /* Use theme variable */
}

.upgrade-card h3 {
    font-size: 1.1rem; /* Adjusted size */
    font-weight: 600; /* Adjusted weight */
    color: var(--clay-secondary); /* Use theme variable */
    margin: 0;
}

.upgrade-card p {
    color: var(--clay-text-secondary); /* Use theme variable */
    font-size: 0.85rem; /* Adjusted size */
    line-height: 1.5; /* Keep layout */
    flex-grow: 1; /* Keep layout */
    margin: 0;
}

.upgrade-info {
    display: flex; /* Keep layout */
    justify-content: space-between; /* Keep layout */
    font-weight: 500; /* Adjusted weight */
    font-size: 0.85rem; /* Adjusted size */
    color: var(--clay-text-tertiary); /* Use theme variable */
}
.upgrade-info span:last-child {
    font-weight: 600;
    color: var(--clay-text-primary); /* Use theme variable */
}

.upgrade-btn {
    /* Styles handled by theme */
    padding: 0.6rem; /* Adjusted padding */
    font-size: 0.9rem; /* Adjusted size */
}

.upgrade-btn:disabled {
    /* Styles handled by theme */
}
