body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    color: #333;
}
.container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}
#logo{
    display: block;
    position: relative;
    top: 0;
    left: 20%;
    transform: translateX(-50%) scale(0.7); /* Center horizontally and scale */
    margin: 0 auto; /* Additional centering */
}
@media (max-width: 768px) {
    #logo {
        left: 40%;
        transform: translateX(-50%) scale(0.6); /* Slightly smaller on mobile */
    }
}
h1 {
    color: #ff5722;
    text-align: center;
    margin-bottom: 1px;
    padding: 0;
    margin: 0;
}
h2 {
    color: #ff7043;
    margin-top: 1px;
    padding: 0;
    margin: 0;
}
h3 {
    color: #ff7043;
    margin-top: 20px;
    margin-bottom: 15px;
}
h4 {
    color: #ff7043;
    padding: 0;
    margin: 0;
    font-weight: bolder;
}
button {
    background-color: #ff5722;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #e64a19;
}
button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
.user-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}
.counter-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the button */
    gap: 20px;
    margin: 20px 0; /* Add some vertical spacing */
}
.counter {
    font-size: 24px;
    font-weight: bold;
    min-width: 60px;
}
#incrementButton {
    padding: 15px 30px; /* Make button bigger */
    font-size: 18px; /* Larger text */
    min-width: 300px; /* Ensure consistent width */
    text-align: center;
}
.hotdog-icon {
    font-size: 24px;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #f2f2f2;
    font-weight: bold;
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}
tr:hover {
    background-color: #f1f1f1;
}
.auth-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 10px;
    padding: 0;
    margin: 0;
}
input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.hidden {
    display: none;
}
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.user-info {
    background-color: #e8f5e9;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    min-width: fit-content;
    max-width: 600px;
}
@media (max-width: 768px) {
    .user-info {
        max-width: 230px;
        }
}
.error-message {
    color: #d32f2f;
    margin-top: 5px;
}
.rank-1 {
    font-weight: bold;
    color: #ffa000;
}
.rank-2 {
    font-weight: bold;
    color: #9e9e9e;
}
.rank-3 {
    font-weight: bold;
    color: #bf360c;
}
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.stat-box {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
    max-height: 100px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    align-content: center;
}
.stat-box-pic {
    flex: 1;
    min-width: fit-content;
    max-width: 110px;
    padding: 10px;
    padding-left: 30px;
    border-radius: 8px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    align-content: center;
}
.stat-title {
    font-size: auto;
    font-weight: bold;
    color: #757575;
    margin-bottom: 5px;
    padding-top: 5px;
}
.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    padding-top: 5px;
    margin-bottom: 5px;
}
.stat-value-rank {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    padding-top: 5px;
    margin-bottom: 5px;
}
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-right: 5px;
    margin-bottom: 5px;
    color: white;
}
.rank-badge {
    background-color: #4caf50;
}
.achievement-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.achievement {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f1f8e9;
    border-radius: 4px;
    border-left: 4px solid #8bc34a;
    margin-bottom: 10px;
    width: 100%;
    max-width: 700px;
}
.achievement-icon {
    font-size: 24px;
    margin-right: 10px;
}
.achievement-details {
    flex: 1;
}
.achievement-name {
    font-weight: bold;
    margin-bottom: 5px;
}
.achievement-description {
    font-size: 14px;
    color: #555;
}
.achievement-locked {
    opacity: 0.5;
    filter: grayscale(1);
    background-color: #f5f5f5;
    border-left-color: #bdbdbd;
}
.achievement-locked .achievement-icon {
    color: #757575;
}
.achievement-unlocked {
    animation: unlock-animation 1s;
}
@keyframes unlock-animation {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background-color: #dcedc8; }
    100% { transform: scale(1); }
}
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
    animation: slide-in 0.3s ease-out, fade-out 0.5s ease-in 4s forwards;
    max-width: 300px;
}
@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}
.tab-container {
    margin-bottom: 20px;
}
.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
}
.tab-button {
    padding: 10px 20px;
    background-color: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    font-weight: bold;
}
.tab-button.active {
    color: #ff5722;
    border-bottom: 3px solid #ff5722;
}
.tab-content {
    padding: 20px 0;
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.shop-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}
.shop-item-icon {
    font-size: 36px;
    margin-bottom: 10px;
}
.shop-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}
.shop-item-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}
.shop-item-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}
.coin {
    color: #ffc107;
    font-size: 18px;
}
.progress-container {
    width: 100%;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 6px;
    margin-top: 5px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease;
}
/* Avatar Builder Styles */
.avatar-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.avatar-preview-container, .avatar-options-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.preview-area {
    background-color: #fff5e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
}

.avatar-container {
    width: 200px;
    height: 200px;
    position: relative;
    overflow: hidden;
    border: 1px dashed #ddd;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.option-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s;
}

.option-button:hover {
    background-color: #f0f0f0;
}

.option-button.selected {
    background-color: #e0f0ff;
    border: 2px solid #ff5722;
}

.option-button img {
    width: 60px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
}

.accessories-button img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
/* AVATAR ELEMENTS */
/* Avatar element styles */
.avatar-element {
    position: absolute;
    z-index: 10;
}

.hat {
    top: 42px;
    right: 60px;
    transform: scale(20%);
    z-index: 20;
}

.glasses {
    top: 23px;
    right: 64px;
    transform: scale(70%);
    z-index: 15;
}

.hotdog {
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.necklace {
    top: 110px;
    right: 70px;
    transform: scale(75%);
    z-index: 12;
}

.gloves-container {
    width: 100%;
    top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    z-index: 11;
}

.shoes-container {
    width: 70%;
    top: 130px;
    right: 33px;
    transform: scale(80%);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    z-index: 7;
}

.legs-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 5px;
}

.leg {
    width: 2px;
    height: 30px;
    background-color: #ffc8dd;
    display: none;
}
.avatar-element img {
    max-width: 100%;
    height: auto;
}

.avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.saved-avatar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.saved-avatar img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.saved-avatar-buttons {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.saved-avatar-buttons button {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    background-color: #ff5722;
    color: white;
}

.saved-avatar-buttons button:hover {
    background-color: #e64a19;
}
.avatar-card-preview {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 10px auto;
    background-color: #fff5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background-color: #fff5e0;
    border-radius: 8px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.profile-avatar-cta {
    position: absolute;
    font-size: 12px;
    text-align: center;
    font-weight: bolder;
    color: #ff5722;
    z-index: 20;
    word-wrap: normal;
    max-width:175px;
    background-color: white;

}
.profile-info {
    flex: 1;
}
/* Improvements. Added on 20-May. */
/* Updated Avatar Preview Container Styles */
.avatar-preview-container {
    position: sticky;
    top: 20px;
    height: fit-content;
    padding: 20px;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 50; /* Ensure it stays above other content when sticky */
}

.preview-area {
    background-color: #fff5e0;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px; /* Increased height */
    position: relative;
}

.avatar-container {
    width: 250px; /* Increased width */
    height: 250px; /* Increased height */
    position: relative;
    overflow: visible; /* Allow accessories to overflow container */
    border: 1px dashed #ddd;
}

/* Increased size for all avatar elements */
.avatar-element {
    position: absolute;
    z-index: 10;
    transform: scale(1.5); /* Scale up all elements */
}

.hotdog {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.5); /* Center and scale */
    z-index: 5;
}

.hat {
    top: -47px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    z-index: 20;
}

.glasses {
    top: -6px;
    left: 51%;
    transform: translateX(-50%) scale(1.5);
    z-index: 15;
}

.necklace {
    top: 100px;
    left: 50%;
    transform: translateX(-50%) scale(1.1);
    z-index: 12;
}

.gloves-container {
    width: 100%;
    top: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    z-index: 11;
    transform: scale(1.4);
}

.shoes-container {
    width: 70%;
    top: 170px;
    left: 47%;
    transform: translateX(-50%) scale(1.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    z-index: 7;
}

/* Increase avatar size in cards and profile too */
.avatar-card-preview {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 10px auto;
    background-color: #fff5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    background-color: #fff5e0;
    border-radius: 8px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Make sure avatar images fill their containers better */
.avatar-image, .profile-avatar-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
/* Avatar Builder Tab System Styles */
.avatar-tabs {
    margin-bottom: 20px;
}

.avatar-tabs .tab-buttons {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    gap: 5px;
}

.avatar-tabs .tab-button {
    padding: 10px 15px;
    background-color: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

.avatar-tabs .tab-button.active {
    color: #ff5722;
    border-bottom: 3px solid #ff5722;
}

.avatar-tab-pane {
    display: none;
    padding: 15px 0;
}

.avatar-tab-pane.active {
    display: block;
}

/* Make the option buttons larger and more user-friendly */
.option-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s;
}

.option-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option-button.selected {
    background-color: #fff5e0;
    border: 2px solid #ff5722;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.2);
}

.option-button img {
    width: 70px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
}

.accessories-button img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}



/* Responsive improvements for mobile */
@media (max-width: 768px) {
    .avatar-grid {
        grid-template-columns: 1fr;
    }
    
    .avatar-tabs .tab-button {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .avatar-preview-container {
        position: static; /* Don't keep sticky on mobile */
        margin-bottom: 20px;
    }
}
/* Auth Tabs Styling */
.auth-tabs .tab-buttons {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.auth-tabs .tab-button {
    padding: 12px 25px;
    background-color: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.auth-tabs .tab-button.active {
    color: #ff5722;
    border-bottom: 3px solid #ff5722;
}

.auth-tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.auth-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.auth-section input {
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border 0.3s;
}

.auth-section input:focus {
    border-color: #ff5722;
    outline: none;
}

.auth-section button {
    background-color: #ff5722;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-section button:hover {
    background-color: #e64a19;
}

.auth-switch {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

.auth-switch a {
    color: #ff5722;
    text-decoration: none;
    font-weight: bold;
}

.auth-switch a:hover {
    text-decoration: underline;
}
/* Activity Board Styles */
.activity-board {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

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

.activity-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: transform 0.2s;
    animation: fade-in 0.3s ease-out;
}

.activity-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.activity-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 24px;
    text-align: center;
}

.activity-content {
    flex: 1;
}

.activity-message {
    font-weight: 500;
    margin-bottom: 3px;
}

.activity-time {
    font-size: 12px;
    color: #777;
}

.loading-message {
    text-align: center;
    padding: 20px;
    color: #666;
}

.no-activities {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Avatar Category Tabs Styling */
.avatar-tabs {
    margin-bottom: 20px;
    position: relative;
}

.avatar-tabs .tab-buttons {
    display: flex;
    overflow-x: auto;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.avatar-tab-button {
    padding: 12px 20px;
    background-color: transparent;
    color: #555;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
    white-space: nowrap;
    flex-grow: 1;
    text-align: center;
}

.avatar-tab-button:hover {
    color: #ff5722;
    background-color: rgba(255, 87, 34, 0.05);
}

.avatar-tab-button.active {
    color: #ff5722;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.avatar-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #ff5722;
}

.avatar-tab-button i {
    margin-right: 5px;
    font-size: 16px;
}

.avatar-tab-pane {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    display: none;
    animation: fadeIn 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

.avatar-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Make tabs responsive on mobile */
@media (max-width: 768px) {
    .avatar-tabs .tab-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .avatar-tab-button {
        flex-basis: calc(33.33% - 10px);
    }
}
/* Shop Item Purchase States */
.buy-button.purchased {
    background-color: #9e9e9e !important;
    cursor: default;
    opacity: 0.8;
    box-shadow: none;
}

.purchased-item {
    position: relative;
    border-color: #4caf50;
}

.purchased-item::after {
    content: "✓";
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background-color: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Enhance the locked accessory styling */
.option-button.locked {
    position: relative;
    opacity: 0.7;
    overflow: hidden;
}

.option-button.locked::before {
    content: "🔒";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    z-index: 5;
    text-shadow: 0 0 5px white;
}

.option-button.locked::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.2);
    z-index: 4;
}

.option-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ff5722;
    font-weight: bold;
    margin-top: 5px;
}
.analytics-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
}

.chart-select:focus {
    border-color: #ff5722;
    outline: none;
}

.chart-title {
    text-align: center;
    margin-bottom: 20px;
    color: #ff5722;
    font-size: 18px;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.chart-summary {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.summary-stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: normal;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #ff5722;
}

#consumptionChartContainer {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .analytics-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
    }
    
    .chart-summary {
        flex-direction: column;
        gap: 15px;
    }
}
/* 3. Profile Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.profile-modal-content {
    padding: 0;
}

.profile-modal-header {
    background: linear-gradient(135deg, #ff5722, #ff7043);
    color: white;
    padding: 30px 20px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.profile-modal-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-modal-info h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: white;
}

.profile-modal-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.profile-stat-value {
    font-size: 16px;
    font-weight: bold;
}

.profile-modal-body {
    padding: 25px;
}

.profile-section {
    margin-bottom: 25px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h3 {
    color: #ff5722;
    margin: 0 0 15px 0;
    font-size: 18px;
    border-bottom: 2px solid #ff5722;
    padding-bottom: 5px;
}

.profile-info-grid {
    display: grid;
    gap: 12px;
}

.profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-label {
    font-weight: 500;
    color: #666;
}

.info-value {
    font-weight: bold;
    color: #333;
}

.profile-achievements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-achievement-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #8bc34a;
}

.profile-achievement-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.profile-achievement-details {
    flex: 1;
}

.profile-achievement-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.profile-achievement-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.profile-achievement-date {
    font-size: 12px;
    color: #999;
}

.profile-more-achievements {
    text-align: center;
    padding: 10px;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.no-achievements {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* 4. Clickable usernames in leaderboard */
.clickable-username {
    cursor: pointer;
    font: oblique;
    font-weight: bold;
    transition: all 0.2s;
}

.clickable-username:hover {
    color: #e64a19;
    text-decoration: underline;
    transform: translateX(2px);
}

/* 5. Responsive improvements for mobile */
@media (max-width: 768px) {
    .profile-modal-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px 20px;
    }
    
    .profile-modal-stats {
        justify-content: center;
        gap: 15px;
    }
    
    .profile-modal-body {
        padding: 20px 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .profile-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    #incrementButton {
        min-width: 250px; /* Smaller on mobile */
        padding: 12px 25px;
        font-size: 16px;
    }
}

/* 6. Loading states */
.loading-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #d32f2f;
    font-style: italic;
}