/* Enhanced SHARD Panel - MorrHollow Style (Clean & Fluid) */

.panel-shard {
    /* Inherits from panel-economy in hub-panels.css */
}

.shard-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'RemiliaMincho', serif;
}

.shard-panel .panel-header {
    background: linear-gradient(0deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.98));
    height: 2.25rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    margin: 0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    position: relative;
    z-index: 20;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.shard-panel .panel-header h2 {
    font-family: 'RemiliaMincho', serif;
    font-size: 0.9rem;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
    color: rgba(186, 166, 116, 0.7);
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-panel {
    width: 20px;
    height: 20px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.9) 0%,
        rgba(51, 65, 85, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
}

.close-panel:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.9) 0%,
        rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    color: rgba(239, 68, 68, 0.9);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}

/* Navigation */
.shard-nav {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.15) 0%,
        rgba(51, 65, 85, 0.2) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.shard-nav-btn {
    flex: 1;
    padding: 10px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: rgba(186, 166, 116, 0.8);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.shard-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.3s ease;
}

.shard-nav-btn:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(212, 175, 55, 0.2);
}

.shard-nav-btn:hover::before {
    left: 100%;
}

.shard-nav-btn.active {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.9) 0%,
        rgba(30, 41, 59, 0.95) 100%);
    color: rgba(212, 175, 55, 1);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Content Area */
.shard-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.shard-content::-webkit-scrollbar {
    width: 8px;
}

.shard-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.shard-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(186, 166, 116, 0.6) 100%);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.shard-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.6) 0%,
        rgba(186, 166, 116, 0.8) 100%);
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.5) 0%,
        rgba(30, 41, 59, 0.7) 100%);
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(212, 175, 55, 0.2);
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card .stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(186, 166, 116, 0.6);
    margin-bottom: 8px;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #E5E7EB;
    margin-bottom: 4px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.stat-card .stat-value.large {
    font-size: 28px;
}

.stat-card .stat-sublabel {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.5);
}

.stat-card .stat-rank {
    font-size: 11px;
    color: rgba(212, 175, 55, 0.9);
    margin-top: 4px;
}

/* User Balance Card */
.user-balance-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(51, 65, 85, 0.3) 100%);
    border-color: rgba(212, 175, 55, 0.6);
}

/* Activity Stats */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 12px 0;
}

.activity-stat {
    text-align: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.activity-stat .activity-icon {
    font-size: 20px;
    display: block;
    margin-bottom: 6px;
}

.activity-stat .activity-value {
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.activity-stat.earned .activity-value {
    color: #4caf50;
}

.activity-stat.spent .activity-value {
    color: #ff9800;
}

.activity-stat.burned .activity-value {
    color: #f44336;
}

.activity-stat .activity-label {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-txcount {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.6);
    text-align: center;
    margin-top: 8px;
}

/* Action Cards */
.actions-card, .lifetime-card {
    grid-column: span 2;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.3s ease;
}

.action-btn:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(212, 175, 55, 0.2);
}

.action-btn:hover::before {
    left: 100%;
}

/* Lifetime Stats */
.lifetime-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lifetime-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.lifetime-stat:last-child {
    border-bottom: none;
}

.lifetime-label {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lifetime-value {
    font-size: 13px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
}

/* Market View */
.market-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.predictions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.prediction-card {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.prediction-label {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(186, 166, 116, 0.6);
    margin-bottom: 8px;
    letter-spacing: 0.8px;
}

.prediction-value {
    font-size: 20px;
    font-weight: 700;
    color: #E5E7EB;
    margin-bottom: 6px;
}

.prediction-change {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.prediction-change.positive {
    color: #4caf50;
}

.prediction-change.negative {
    color: #f44336;
}

.prediction-forecast,
.prediction-sublabel {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.5);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.chart-card {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    margin-bottom: 12px;
}

.chart-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.chart-container {
    position: relative;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 8px;
}

/* Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.leaderboard-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.leaderboard-item:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.5) 0%,
        rgba(30, 41, 59, 0.7) 100%);
    transform: translateX(2px);
}

.leaderboard-item:hover::before {
    left: 100%;
}

.leaderboard-item.top-three {
    border-color: rgba(212, 175, 55, 0.6);
}

.leaderboard-item .rank {
    font-size: 18px;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.9);
    min-width: 40px;
    text-align: center;
}

.leaderboard-item .user-info {
    flex: 1;
}

.leaderboard-item .username {
    font-size: 13px;
    font-weight: 600;
    color: #E5E7EB;
    margin-bottom: 2px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.leaderboard-item .user-stats {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.6);
}

.leaderboard-item .medal {
    font-size: 24px;
}

/* Profile View */
.profile-view {
    max-width: 700px;
    margin: 0 auto;
}

.profile-balance {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(51, 65, 85, 0.3) 100%);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(212, 175, 55, 0.6);
}

.balance-big {
    font-size: 48px;
    font-weight: 700;
    color: rgba(212, 175, 55, 1);
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
}

.balance-label {
    font-size: 13px;
    color: rgba(186, 166, 116, 0.6);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-rank {
    font-size: 12px;
    color: rgba(186, 166, 116, 0.7);
    margin-top: 8px;
}

/* Breakdown Sections */
.breakdown-section {
    margin-bottom: 16px;
}

.breakdown-section h3 {
    font-size: 12px;
    margin-bottom: 12px;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.breakdown-label {
    font-size: 11px;
    color: rgba(186, 166, 116, 0.7);
}

.breakdown-value {
    font-size: 11px;
    font-weight: 600;
    color: #E5E7EB;
}

.breakdown-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 12px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    text-align: right;
}

.breakdown-empty {
    text-align: center;
    padding: 24px;
    color: rgba(186, 166, 116, 0.4);
    font-style: italic;
    font-size: 11px;
}

/* Recent Transactions */
.recent-transactions h3 {
    font-size: 12px;
    margin-bottom: 12px;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.15s ease;
}

.transaction-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(51, 65, 85, 0.4);
}

.transaction-item .tx-icon {
    font-size: 16px;
}

.transaction-item .tx-info {
    flex: 1;
}

.transaction-item .tx-action {
    font-size: 11px;
    color: #E5E7EB;
    font-weight: 500;
}

.transaction-item .tx-time {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.5);
    margin-top: 2px;
}

.transaction-item .tx-amount {
    font-size: 12px;
    font-weight: 700;
}

.transaction-item .tx-amount.earned {
    color: #4caf50;
}

.transaction-item .tx-amount.spent,
.transaction-item .tx-amount.burned {
    color: #ff9800;
}

.transaction-empty {
    text-align: center;
    padding: 24px;
    color: rgba(186, 166, 116, 0.4);
    font-style: italic;
    font-size: 11px;
}

/* Loading & Error States */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: rgba(186, 166, 116, 0.6);
    font-family: 'RemiliaMincho', serif;
    font-size: 13px;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #f44336;
    font-family: 'RemiliaMincho', serif;
    font-size: 13px;
}

/* Activity Stats */
.activity-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.activity-stat-item {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.activity-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.9);
    margin-bottom: 4px;
}

.activity-stat-label {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .predictions-grid {
        grid-template-columns: 1fr;
    }
}
