.profile {
    width: 100%;
    padding-bottom: 1rem;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid transparent;
    background: linear-gradient(135deg, var(--bg-color-light) 0%, rgba(34, 211, 238, 0.1) 50%, var(--bg-color-light) 100%);
    border-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color)) 1;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.user-greeting {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 20px;
}

.user-greeting h1 {
    margin: 0;
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.user-greeting .user-name {
    font-weight: bold;
    color: var(--secondary-color);
}

.user-greeting p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color-secondary);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 20px;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

.logout-btn i {
    font-size: 16px;
}

.logout-btn:hover {
    background: linear-gradient(135deg, var(--primary-color-dark), var(--secondary-color));
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.4);
}

.profile-container {
    padding-top: 0;
}

#audits-info {
    min-width: 50%;
    background-color: var(--bg-color-light);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 20px 20px;
}

.audits-title {
    text-align: center;
    margin: 15px 0;
    color: var(--text-color);
}

.audits-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.audits-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
}

.audit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: transform 0.2s;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.audit-card:hover {
    transform: translateY(-5px);
}

.audit-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.audit-label {
    margin-top: 10px;
    color: var(--text-color-secondary);
    font-size: 1.1em;
}

.warning .audit-number {
    color: #ff6b6b;
}

.level {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 20px 20px;
}

#level-info {
    min-height: 210px;
    width: 30%;
    background-color: var(--bg-color-light);
    border-radius: 10px;
    overflow: hidden;
}

.level-title {
    text-align: center;
    margin: 15px 0;
    color: var(--text-color);
}

.level-info-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--primary-color);
    width: 80px;
    height: 80px;
    margin: 1rem auto;
}

.level-info-container {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 2px;
}

#last-transactions-info {
    min-height: 210px;
    width: 68%;
    background-color: var(--bg-color-light);
    border-radius: 10px;
    overflow: hidden;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

.transaction-item .name {
    display: inline-block;
    min-width: 300px;
}

.transaction-item .amount {
    font-weight: 600;
    letter-spacing: 1px;
}

#transactions-chart {
    min-width: 90%;
    background: linear-gradient(135deg, var(--bg-color-light) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-radius: 15px;
    overflow: hidden;
    margin: 0 20px 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.transactions-chart-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;

}

svg {
    width: 100%;
}

#transaction-info {
    position: absolute;

    /* width: 250px; */
    background-color: var(--bg-color-light);
    color: var(--text-color);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
    overflow: hidden;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

#transaction-info .transaction-header {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

#transaction-info .transaction-details {
    padding: 10px;
}

#transaction-info .transaction-details div {
    margin-bottom: 5px;
}

#transaction-info .transaction-details strong {
    color: var(--text-color-secondary);
    margin-right: 5px;
}

/* Activity Heatmap Styles */
.activity-heatmap {
    background: linear-gradient(135deg, var(--bg-color-light) 0%, rgba(34, 211, 238, 0.05) 100%);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
}

.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.heatmap-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2em;
    font-weight: 600;
}

.heatmap-description {
    margin: 10px 0 15px 0;
}

.heatmap-description p {
    color: var(--text-color-secondary);
    font-size: 0.9em;
    margin: 0;
    font-style: italic;
}

.heatmap-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.heatmap-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    min-width: 80px;
}

.stat-icon {
    font-size: 1.2em;
}

.stat-value {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 0.8em;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.heatmap-container {
    margin-bottom: 20px;
}

.heatmap-scroll-indicator {
    display: none; /* Hidden on desktop */
    text-align: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.scroll-hint {
    color: var(--primary-color);
    font-size: 0.8em;
    font-weight: 500;
    animation: pulse 2s infinite;
}

.chart-scroll-indicator {
    display: none; /* Hidden on desktop */
    text-align: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

/* Line chart styles moved to progress-chart.css to avoid conflicts */

.heatmap-container {
    width: 100%;
    max-width: 100%;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.heatmap-grid {
    display: grid;
    grid-template-columns: 50px repeat(24, 1fr);
    grid-template-rows: 30px repeat(7, 1fr);
    gap: 2px;
    max-width: 100%;
    overflow: visible;
}

.heatmap-labels {
    display: contents;
}

.day-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.hour-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.heatmap-row {
    display: contents;
}

.heatmap-cell {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.heatmap-cell:hover {
    border-color: var(--primary-color);
    z-index: 100;
}

.heatmap-legend {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.legend-section {
    flex: 1;
    max-width: 400px;
}

.legend-section h4 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
}

.legend-items {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-item span {
    font-size: 0.8em;
    color: var(--text-color-secondary);
    text-align: center;
    min-width: 60px;
}

.heatmap-tooltip {
    position: fixed;
    background: var(--bg-color-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -10px;
}

.tooltip-header {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

/* Activity Heatmap Layout - Centered */
#activity-heatmap {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Mobile Responsive Design for Heatmap */
@media screen and (max-width: 768px) {
    .activity-heatmap {
        padding: 15px;
        margin: 10px 0;
    }
    
    .heatmap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .heatmap-header h3 {
        font-size: 1.1em;
    }
    
    .heatmap-description p {
        font-size: 0.8em;
    }
    
    .heatmap-stats {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .heatmap-stats .stat-item {
        min-width: 80px;
    }
    
    .heatmap-stats .stat-icon {
        font-size: 1.2em;
    }
    
    .heatmap-stats .stat-value {
        font-size: 0.9em;
    }
    
    .heatmap-stats .stat-label {
        font-size: 0.7em;
    }
    
    .heatmap-container {
        overflow-x: auto;
        overflow-y: visible;
        margin-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }
    
    .heatmap-scroll-indicator,
    .chart-scroll-indicator {
        display: block; /* Display controlled by JavaScript based on content overflow */
    }
    
    .heatmap-container {
        overflow-x: auto;
        overflow-y: visible;
        margin-bottom: 15px;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
        width: 100%;
    }
    
    /* Line chart container styles moved to progress-chart.css */
    
    .heatmap-grid {
        min-width: 600px; /* Ensure all 24 hours are visible */
        grid-template-columns: 40px repeat(24, 1fr);
        grid-template-rows: 25px repeat(7, 1fr);
        gap: 2px;
    }
    
    .heatmap-cell {
        width: 18px;
        height: 18px;
        border-radius: 2px;
    }
    
    .hour-label {
        font-size: 0.7em;
        font-weight: 500;
    }
    
    .day-label {
        font-size: 0.8em;
        font-weight: 500;
    }
    
    .heatmap-legend {
        margin-top: 10px;
    }
    
    .heatmap-legend h4 {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
    
    .legend-items {
        gap: 8px;
    }
    
    .legend-item {
        font-size: 0.7em;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
}

/* Hide scroll hint on larger screens */
@media screen and (min-width: 1024px) {
    .heatmap-scroll-indicator {
        display: none;
    }
    
    .chart-scroll-indicator {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .activity-heatmap {
        padding: 10px;
        margin: 5px 0;
    }
    
    .heatmap-header h3 {
        font-size: 1em;
    }
    
    .heatmap-description p {
        font-size: 0.75em;
    }
    
    .heatmap-stats {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .heatmap-stats .stat-item {
        min-width: 70px;
    }
    
    .heatmap-stats .stat-icon {
        font-size: 1.1em;
    }
    
    .heatmap-stats .stat-value {
        font-size: 0.8em;
    }
    
    .heatmap-stats .stat-label {
        font-size: 0.65em;
    }
    
    .heatmap-grid {
        min-width: 500px; /* Slightly smaller for very small screens */
        grid-template-columns: 35px repeat(24, 1fr);
        grid-template-rows: 20px repeat(7, 1fr);
        gap: 1px;
    }
    
    .heatmap-cell {
        width: 16px;
        height: 16px;
        border-radius: 1px;
    }
    
    .hour-label {
        font-size: 0.6em;
    }
    
    .day-label {
        font-size: 0.7em;
    }
    
    .heatmap-legend h4 {
        font-size: 0.8em;
        margin-bottom: 6px;
    }
    
    .legend-items {
        gap: 6px;
    }
    
    .legend-item {
        font-size: 0.65em;
    }
    
    .legend-color {
        width: 10px;
        height: 10px;
    }
}

.skills-chart-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.chart-border {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color));
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(34, 211, 238, 0.3);
}

@media screen and (max-width: 820px) {
    .level {
        flex-direction: column;
        gap: 20px;
    }

    #level-info {
        width: 50%;
    }

    #last-transactions-info {
        width: 100%;

    }
}


@media screen and (max-width: 564px) {
    .profile-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }
    
    .user-greeting {
        margin-left: 0;
        text-align: center;
    }
    
    .user-greeting h1 {
        font-size: 24px;
    }
    
    .logout-btn {
        margin-right: 0;
        align-self: center;
    }
    
    #level-info {
        width: 70%;
    }

    .audits-grid {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .audit-card{
        min-width: 80%;
    }
    .transaction-item .name{
        min-width: 185px;
        font-size: 13px;
    }

    .transaction-item .amount{
        font-size: 13px;
    }
    .transaction-item .date{
        font-size: 13px;
    }
    .profile-container {
        padding-top: 0;
    }
}


@media screen and (max-width: 382px) {
    #level-info {
        width: 100%;
    }
    svg{
        height: 300px;
    }
    .transaction-item{
        padding: 10px 5px;
    }
    .transaction-item .name{
        min-width: 175px;
        font-size: 12px;
    }

    .transaction-item .amount{
        font-size: 12px;
    }
    .transaction-item .date{
        font-size: 12px;
    }
}

/* Scrollable transactions styles */
.last-transactions-info-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: stretch;
    border-radius: 0;
    background-color: transparent;
    width: 100%;
    height: auto;
    margin: 0;
}

.scrollable-transactions {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.scrollable-transactions::-webkit-scrollbar {
    width: 8px;
}

.scrollable-transactions::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.scrollable-transactions::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

.scrollable-transactions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Profile Information styles */
#profile-info {
    min-width: 50%;
    background: linear-gradient(135deg, var(--bg-color-light) 0%, rgba(34, 211, 238, 0.05) 100%);
    border-radius: 15px;
    overflow: hidden;
    margin: 0 20px 20px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.profile-title {
    text-align: center;
    margin: 20px 0;
    color: var(--text-color);
    font-size: 1.5em;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-info-container {
    padding: 20px;
}

.profile-main-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.profile-more-section {
    text-align: center;
}

.more-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

.more-info-btn:hover {
    background: linear-gradient(135deg, var(--primary-color-dark), var(--secondary-color));
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.4);
}

.more-info-btn i {
    transition: transform 0.3s ease;
}

.additional-info {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.additional-info:not(.hidden) {
    max-height: 1000px;
    transition: max-height 0.3s ease-in;
}

.additional-info.hidden {
    max-height: 0;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(34, 211, 238, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(34, 211, 238, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.profile-info-item:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(34, 211, 238, 0.1));
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.2);
}

.profile-label {
    font-size: 14px;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.profile-value {
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
    word-break: break-word;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media screen and (max-width: 564px) {
    .profile-main-info {
        grid-template-columns: 1fr;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-info-item {
        padding: 10px;
    }
    
    .profile-label {
        font-size: 13px;
    }
    
    .profile-value {
        font-size: 14px;
    }
    
    .more-info-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* XP Details Popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.xp-popup {
    background: var(--bg-color-light);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.popup-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.popup-content {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.xp-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.summary-label {
    font-size: 14px;
    color: var(--text-color-secondary);
    font-weight: 500;
}

.summary-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.xp-transactions h4 {
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-size: 1.2em;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
}

.transaction-info {
    flex: 1;
}

.transaction-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.transaction-path {
    font-size: 12px;
    color: var(--text-color-secondary);
    margin-bottom: 3px;
    font-family: 'Courier New', monospace;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-color-secondary);
}

.transaction-xp {
    text-align: right;
}

.xp-amount {
    font-size: 18px;
    font-weight: bold;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.no-data {
    text-align: center;
    color: var(--text-color-secondary);
    padding: 40px;
    font-style: italic;
}

.loading {
    text-align: center;
    color: var(--text-color-secondary);
    padding: 40px;
}

@media screen and (max-width: 768px) {
    .popup-overlay {
        padding: 10px;
    }
    
    .xp-popup {
        max-height: 90vh;
    }
    
    .popup-header {
        padding: 15px 20px;
    }
    
    .popup-header h3 {
        font-size: 1.2em;
    }
    
    .popup-content {
        padding: 20px;
    }
    
    .xp-summary {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .transaction-xp {
        text-align: left;
        width: 100%;
    }
}

/* Progress Line Chart Styles - Compact & Fully Responsive */
/* Progress Line Chart Styles - Compact & Fully Responsive */
.progress-chart {
    background: var(--bg-color-light);
    border-radius: 12px;
    padding: 12px;
    margin: 12px auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    max-height: 400px;
    overflow: hidden;
}

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

.chart-header h3 {
    color: var(--text-color);
    margin: 0 0 6px 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.chart-description p {
    color: var(--text-color-secondary);
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

.chart-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.chart-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: fit-content;
    flex: 1;
    min-width: 110px;
}

.chart-stats .stat-icon {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.chart-stats .stat-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.chart-stats .stat-label {
    color: var(--text-color-secondary);
    font-size: 0.75rem;
}

/* Chart Container */
.chart-container {
    width: 100%;
    max-width: 100%;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 6px;
    border: 1px solid var(--border-color);
    overflow: visible;
    height: auto;
    max-height: 250px;
    overflow-y: hidden; /* Убираем vertical scroll глобально */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.chart-container::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.chart-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.chart-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* SVG Container */
.line-chart-svg-container {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.line-chart-svg {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 1;
    max-height: 300px;
}

/* Scroll Indicator */
.chart-scroll-indicator {
    display: none;
    text-align: center;
    margin-bottom: 6px;
    padding: 4px;
    background: rgba(34, 211, 238, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    font-size: 0.75rem;
}

.scroll-hint {
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

/* SVG Elements */
.axis-label {
    fill: var(--text-color-secondary);
    font-size: 10px;
    font-family: inherit;
}


.progress-line {
    stroke: var(--primary-color);
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.data-point {
    cursor: pointer;
    r: 3;
    fill: var(--primary-color);
    transition: r 0.2s ease;
}

.data-point:hover {
    r: 4;
}

.area-fill {
    fill: var(--primary-color);
    opacity: 0.1;
}

/* Tooltip - Compact */
.chart-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    z-index: 10000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-color);
    max-width: 200px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    backdrop-filter: blur(8px);
}

.tooltip-header {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--primary-color);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tooltip-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    align-items: center;
}

.tooltip-label {
    color: rgba(255, 255, 255, 0.8);
}

.tooltip-value {
    color: white;
    font-weight: 500;
}

/* Responsive - Mobile First Approach */
@media screen and (max-width: 768px) {
    .progress-chart {
        padding: 8px;
        margin: 8px auto;
        max-height: 350px;
    }
    
    .chart-tooltip {
        max-width: 160px;
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .chart-header h3 {
        font-size: 1rem;
    }

    .chart-description p {
        font-size: 0.75rem;
    }

    .chart-stats {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 8px;
    }

    .chart-stats .stat-item {
        min-width: auto;
        width: 100%;
        justify-content: center;
        padding: 4px 8px;
    }

    .chart-container {
        max-height: 200px;
        padding: 4px;
        margin: 6px 0;
        overflow-y: auto; /* Vertical только на мобиле */
    }

    .line-chart-svg {
        aspect-ratio: 5 / 1;
        min-width: 600px;
    }

    .chart-scroll-indicator {
        display: block;
        font-size: 0.7rem;
        padding: 3px;
    }

    .chart-container {
        overflow-x: auto;
    }

    .axis-label {
        font-size: 8px;
    }
}

@media screen and (max-width: 480px) {
    .progress-chart {
        padding: 6px;
        margin: 6px auto;
    }
    
    .chart-tooltip {
        max-width: 140px;
        font-size: 0.7rem;
        padding: 5px 8px;
    }

    .chart-header h3 {
        font-size: 0.9rem;
    }

    .chart-description p {
        display: none;
    }

    .chart-stats .stat-item {
        padding: 3px 6px;
        gap: 2px;
    }

    .chart-stats .stat-icon,
    .chart-stats .stat-value,
    .chart-stats .stat-label {
        font-size: 0.7rem;
    }

    .chart-container {
        max-height: 150px;
        padding: 2px;
    }

    .line-chart-svg {
        aspect-ratio: 6 / 1;
        min-width: 500px;
    }

    .data-point {
        r: 2.5;
    }

    .data-point:hover {
        r: 3.5;
    }
}

/* Hide scroll hint on desktop */
@media screen and (min-width: 1024px) {
    .chart-scroll-indicator {
        display: none !important;
    }

    .chart-container {
        overflow-y: hidden; /* Явно на десктопе */
        overflow-x: visible;
    }
    
    .line-chart-svg {
        max-height: 250px !important;
    }
}

/* Progress Detail Popup - Compact Responsive */
.progress-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.progress-detail-popup {
    background: var(--bg-color-light);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.progress-detail-popup::-webkit-scrollbar {
    width: 6px;
}

.progress-detail-popup::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.progress-detail-popup::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.progress-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.progress-detail-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-detail-close-btn {
    background: none;
    border: none;
    color: var(--text-color-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.progress-detail-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.progress-detail-content {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.progress-detail-content::-webkit-scrollbar {
    width: 6px;
}

.progress-detail-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.progress-detail-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.progress-detail-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-detail-transactions h4 {
    margin: 0 0 15px 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.progress-transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.progress-transaction-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-1px);
}

.progress-transaction-info {
    flex: 1;
}

.progress-transaction-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

.progress-transaction-time {
    font-size: 11px;
    color: var(--text-color-secondary);
    font-family: 'Courier New', monospace;
}

.progress-transaction-xp {
    text-align: right;
}

.progress-xp-amount {
    font-size: 16px;
    font-weight: bold;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Popup Responsive */
@media screen and (max-width: 768px) {
    .progress-detail-overlay {
        padding: 5px;
    }

    .progress-detail-popup {
        max-height: 85vh;
        max-width: 95vw;
    }

    .progress-detail-header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .progress-detail-header h3 {
        font-size: 1.1rem;
    }

    .progress-detail-content {
        padding: 12px 16px;
        max-height: 60vh;
    }

    .progress-detail-content::-webkit-scrollbar {
        width: 8px; /* Толще для touch */
    }
    
    .progress-detail-popup::-webkit-scrollbar {
        width: 8px;
    }

    .progress-detail-summary {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px;
    }

    .progress-transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px;
    }

    .progress-transaction-xp {
        text-align: left;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .progress-detail-popup {
        max-height: 90vh;
        border-radius: 12px;
    }

    .progress-detail-header {
        padding: 10px 12px;
    }

    .progress-detail-header h3 {
        font-size: 1rem;
        gap: 6px;
    }

    .progress-detail-content {
        padding: 10px 12px;
    }

    .progress-transaction-name {
        font-size: 13px;
    }

    .progress-xp-amount {
        font-size: 14px;
        padding: 3px 8px;
    }
}