* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #000;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto; /* allow scrolling if content overflows */
    position: relative;
}

/* Space Background with Stars */
.space {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: drift 60s infinite linear;
}

.nebula-1 {
    width: 400px;
    height: 400px;
    background: rgba(94, 96, 206, 0.3);
    top: 20%;
    left: 10%;
    animation-duration: 80s;
}

.nebula-2 {
    width: 600px;
    height: 600px;
    background: rgba(110, 68, 255, 0.3);
    bottom: 10%;
    right: 10%;
    animation-duration: 100s;
}

.nebula-3 {
    width: 300px;
    height: 300px;
    background: rgba(255, 94, 91, 0.3);
    top: 40%;
    right: 20%;
    animation-duration: 120s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(100px, 50px) rotate(360deg);
    }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
    animation: shoot 3s infinite linear;
    opacity: 0;
}

@keyframes shoot {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0);
    }
    1% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(300px) translateY(150px);
    }
}

.home-container {
    background: rgba(13, 17, 33, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.home-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: rotate(0deg);
    z-index: -1;
}

.logo {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #6e44ff;
    text-shadow: 0 0 15px rgba(110, 68, 255, 0.5);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 15px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6e44ff, #ff5e5b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid #ffd166;
    box-shadow: 0 0 15px rgba(255, 209, 102, 0.3);
}

.user-details {
    text-align: left;
}

.username {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd166;
    margin-bottom: 5px;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    flex: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.stat-card p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #b2a8ff;
}

.stat-card span {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd166;
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.3);
}

.level-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, #6e44ff, #5e60ce);
    border-radius: 5px;
}

.home-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

button {
    background: linear-gradient(45deg, #6e44ff, #ff5e5b);
    border: none;
    border-radius: 50px;
    padding: 18px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(1px);
}

#play-game {
    background: linear-gradient(45deg, #6e44ff, #5e60ce);
}

#view-collectables {
    background: linear-gradient(45deg, #ff5e5b, #ff9e5b);
}

.recent-activity {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
}

.recent-activity h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #b2a8ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(110, 68, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e44ff;
}

.activity-details {
    flex: 1;
}

.activity-name {
    font-weight: bold;
    color: #ffd166;
}

.activity-time {
    font-size: 0.8rem;
    color: #b2a8ff;
}

.notification {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.notification:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification i {
    font-size: 1.5rem;
    color: #ffd166;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff5e5b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation for points */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* ================= Mobile Optimizations ================= */
@media (max-width: 600px) {
    .home-container {
        padding: 15px 10px;
        max-width: 100%;
        width: 95%;
        border-radius: 15px;
        background: rgba(13, 17, 33, 0.3); /* more transparent */
        backdrop-filter: blur(5px);
    }

    h1 { font-size: 1.6rem; margin-bottom: 15px; }
    .logo { font-size: 1.8rem; margin-bottom: 8px; }
    .user-info {
        flex-direction: column;
        text-align: center;
        background: rgba(13, 17, 33, 0.3); /* transparent modal */
        padding: 10px;
        border-radius: 12px;
        backdrop-filter: blur(5px);
        gap: 10px;
   
