/* assets/css/skins.css */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.skin-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    border-color: var(--accent-1);
}

.skin-image-wrapper {
    background: rgba(0, 0, 0, 0.2);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
    position: relative;
}

.skin-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.skin-info {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.skin-info h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.rod-name {
    color: var(--accent-1);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skin-stats {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.8rem;
    margin-top: auto;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    color: var(--text-main);
    font-weight: 600;
}

/* Trend and Demand Tags */
.trend-tags {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    z-index: 10;
}

.trend-tag {
    padding: 0.2rem 0.65rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 800;
    font-style: italic;
    font-family: 'Inter', sans-serif;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

/* Specific Trends Colors */
.trend-stable { background-color: #1E8449; }
.trend-unstable { background-color: #E67E22; }
.trend-doing-well { background-color: #2874A6; }
.trend-rising { background-color: #2E86C1; }
.trend-dropping { background-color: #C0392B; }
.trend-skyrocketing { background-color: #00FFFF; color: #000; text-shadow: none; }
.trend-imploding { background-color: #FF0000; }
.trend-hoarded { background-color: #4D5656; }
.trend-hyped { background-color: #FF00FF; color: #000; text-shadow: none; }
.trend-new { background-color: #8E44AD; }
.trend-manipulated { background-color: #F1C40F; color: #000; text-shadow: none; }
.trend-recovering { background-color: #873600; }

/* --- History Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--accent-1);
    text-transform: capitalize;
}

.modal-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-body {
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.chart-container {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    flex-shrink: 0;
}

.history-list-header {
    flex-shrink: 0;
}

.history-list-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.history-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
}

.history-stats span {
    display: flex;
    gap: 5px;
}

.history-stats strong {
    color: var(--accent-2);
}

.load-more-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    flex-shrink: 0;
}

.load-more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.load-more-btn.hidden {
    display: none;
}

#history-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.skin-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.skin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
