:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-ultralight: #e0e7ff;

    --danger: #ef4444;
    --danger-dark: #dc2626;

    --success: #10b981;
    --success-dark: #059669;

    --dark: #1e293b;
    --darker: #0f172a;
    --dark-medium: #334155;

    --light: #f8fafc;
    --lighter: #ffffff;

    --gray: #94a3b8;
    --gray-light: #e2e8f0;
    --gray-dark: #64748b;
    --gray-ultradark: #475569;

    --accent: #f59e0b;
    --accent-dark: #d97706;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.4);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 100, 0.6);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 100, 100, 0.4) rgba(0, 0, 0, 0.1);
}

html {
    scrollbar-gutter: stable;
}

@media (hover: hover) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-thumb {
        background: #8892b0;
    }

    :hover::-webkit-scrollbar-thumb {
        background: #8892b0;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.1) 0%, transparent 20%);
}

h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Profile Editor Styles */
.profile-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ffffff26;
}

.profile-card {
    background-color: var(--dark);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.profile-id {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.profile-about {
    margin-top: 1rem;
    color: var(--gray);
    line-height: 1.5;
}

.form-section {
    background-color: var(--dark);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.form-label,
.setting-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-weight: 500;
}

.form-control,
.setting-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus,
.setting-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    margin-top: 10px;
    border: 2px solid var(--primary);
}

.image-preview .error {
    color: #ff6b6b;
    font-size: 14px;
}

.loading {
    color: var(--gray);
    font-size: 14px;
    font-style: italic;
}

.error {
    color: #ff6b6b;
    font-size: 14px;
}

.image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid var(--primary);
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--warning);
    color: var(--darker);
}

.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-2px);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    margin-top: 25px;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-dark);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

input[type="checkbox"]:checked+.checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom::after {
    content: "✓";
    color: white;
    font-size: 12px;
    display: none;
}

input[type="checkbox"]:checked+.checkbox-custom::after {
    display: block;
}

input[type="checkbox"] {
    display: none;
}

select.setting-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.setting-control option {
    background-color: var(--dark);
    color: var(--light);
}

select.setting-control option:checked {
    background-color: var(--primary-dark);
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Login Page Styles */
.login-container {
    width: 100%;
    margin-top: 80px;
    max-width: 480px;
    padding: 0 20px;
    overflow: hidden;
}

.login-card {
    background: linear-gradient(145deg, var(--dark), var(--darker));
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--danger), var(--accent));
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: shimmer 6s infinite;
    pointer-events: none;
}


.logo {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.logo h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #a855f7, var(--danger));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    text-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from {
        text-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    }

    to {
        text-shadow: 0 6px 30px rgba(99, 102, 241, 0.5), 0 0 20px rgba(168, 85, 247, 0.3);
    }
}

.logo p {
    color: var(--gray-light);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 28px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.25));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    backdrop-filter: blur(5px);
    animation-duration: 0.8s;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-login:active {
    transform: translateY(-1px);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--gray-light);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.additional-actions {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--gray);
}

.additional-actions a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 0;
}

.additional-actions a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.animate__animated.animate__fadeInUp {
    --animate-duration: 0.5s;
}

.animate__animated.animate__delay-1s {
    --animate-delay: 0.3s;
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}

.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: var(--primary-light);
    transition: color 0.3s ease;
}

.tooltip:hover {
    color: var(--primary);
}

.tooltip i {
    font-size: 18px;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark);
    box-shadow: 0 5px 15px rgba(135, 137, 255, 0.18);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    width: 250px;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    pointer-events: none;
}

.tooltip:hover::after {
    visibility: visible;
    opacity: 1;
}

.fun-fact-container {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 16px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.fun-fact-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fun-fact-header {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fun-fact-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--gray-light);
    font-weight: 300;
    text-align: center;
}

/* Explore */
/* Header styles */
.top-header {
    background: linear-gradient(135deg,
            var(--darker) 0%,
            #1a1f35 50%,
            var(--darker) 100%);
    background-size: 200% 200%;
    color: var(--light);
    padding: 1rem 2rem;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.header-content {
    z-index: 2;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(145deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.12));
    padding: 0.40rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-balance i {
    color: var(--accent);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.user-balance:hover i {
    transform: rotate(360deg);
    color: #ffd700;
}

.balance-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-container {
    position: relative;
    cursor: pointer;
}

.avatar {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.avatar img {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    width: 60px;
    height: 60px;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.avatar:active {
    transform: scale(0.95);
}

/* Context menu of profile in profile picture */
.profile-context-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: linear-gradient(145deg,
            rgba(30, 41, 59, 0.95),
            rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.75rem;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    min-width: 220px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-context-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    background: linear-gradient(145deg,
            rgba(99, 102, 241, 0.15),
            rgba(245, 158, 11, 0.1));
}

.menu-item i {
    font-size: 1.2rem;
    color: var(--primary-light);
    transition: all 0.3s ease;
    min-width: 20px;
}

.menu-item:hover i {
    color: var(--accent);
    transform: scale(1.2);
}

.menu-item span {
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-details h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.username {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Modals, Settings, Awards */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: linear-gradient(145deg, var(--darker), var(--dark));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    transform: translateY(50px) scale(0.9);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.modal-header h2 {
    margin: 0;
    color: var(--light);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    display: flex;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.03);
}

.achievements-grid {
    display: grid;
    gap: 1rem;
}

.achievement-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.5s ease;
}

.achievement-card:hover::before {
    left: 100%;
}

.achievement-card.unlocked {
    border-left: 4px solid var(--success);
}

.achievement-card.locked {
    border-left: 4px solid var(--gray-dark);
    opacity: 0.7;
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.achievement-card.unlocked .achievement-icon {
    background: linear-gradient(145deg, var(--success), var(--success-dark));
    color: white;
}

.achievement-card.locked .achievement-icon {
    background: linear-gradient(145deg, var(--gray-dark), var(--gray-ultradark));
    color: var(--gray-light);
}

.achievement-info {
    flex: 1;
}

.achievement-info h3 {
    margin: 0 0 0.25rem 0;
    color: var(--light);
    font-size: 1rem;
    font-weight: 600;
}

.achievement-info p {
    margin: 0 0 0.5rem 0;
    color: var(--gray);
    font-size: 0.875rem;
}

.achievement-date {
    font-size: 0.75rem;
    color: var(--gray-light);
}

.achievement-badge {
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}

.achievement-blocked {
    background: linear-gradient(145deg, var(--dark-medium), var(--darker));
}

/* Settings Styles */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    color: var(--light);
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
}

.setting-info {
    flex: 1;
    padding-right: 1.5rem;
}

.setting-info h4 {
    margin: 0 0 0.4rem 0;
    color: var(--light);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.setting-info p {
    margin: 0;
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, var(--gray-ultradark), var(--gray-dark));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 34px;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(255, 255, 255, 0.1);
}

.slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 50%;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(255, 255, 255, 0.1);
    z-index: 2;
}

input:checked+.slider {
    background: linear-gradient(145deg, var(--success), var(--success-dark));
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(16, 185, 129, 0.4);
}

input:checked+.slider::before {
    transform: translateX(26px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Token Field */
.token-reveal-container {
    position: relative;
    width: 250px;
    flex-shrink: 0;
}

.setting-item input[type="text"].token-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    font-family: monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
}

.token-blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(30, 41, 59);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.token-reveal-container:hover .token-input {
    color: var(--light);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.token-reveal-container:hover .token-blur-overlay {
    opacity: 0;
    pointer-events: none;
}

.token-input:focus {
    color: var(--light) !important;
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.1) !important;
}

.token-input:focus~.token-blur-overlay {
    opacity: 0 !important;
}

/* Danger zone specific styles */
.settings-section:last-child .setting-item {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
    border-color: rgba(239, 68, 68, 0.1);
}

.settings-section:last-child .setting-item:hover {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
    border-color: rgba(239, 68, 68, 0.2);
}

.settings-section:last-child h3 {
    color: var(--danger);
}

.settings-section:last-child h3::after {
    background: linear-gradient(90deg, var(--danger), var(--danger-dark));
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.achievements-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Achievement Progress Bars */
.multi-progress-container {
    margin-top: 10px;
}

.multi-progress-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.metric-label {
    min-width: 80px;
    font-weight: 500;
    color: #ccc;
}

.achievement-progress-bar.small {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-numbers {
    min-width: 40px;
    text-align: right;
    font-size: 11px;
    color: #aaa;
}

.overall-progress {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #4fc3f7;
    font-size: 12px;
}

.achievement-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4fc3f7, #2196f3);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.achievement-progress {
    font-size: 12px;
    color: #aaa;
    display: block;
    margin-top: 4px;
}

.achievement-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.achievements-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.stat-item i {
    font-size: 1.25rem;
    color: var(--primary-light);
}

.stat-item:nth-child(1) i {
    color: var(--accent);
}

.stat-item:nth-child(2) i {
    color: var(--accent);
}

.achievements-loading {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.achievements-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* MAIN CONTENT ON EXPLORE + BALANCE */
.header-nav-buttons {
    text-align: center;
    margin: auto;
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.action-buttons-container {
    width: 100%;
    text-align: center;
    perspective: 1000px;
}

.section-title {
    color: var(--light);
    margin-bottom: 2.5rem;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(145deg, var(--dark), var(--darker));
    color: white;
    border-radius: 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: none;
    min-height: 220px;
}

.action-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.action-btn:hover::after {
    opacity: 1;
}

.action-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(99, 102, 241, 0.2);
    cursor: pointer;
}

.action-btn:hover::before {
    transform: scaleX(1);
}

.action-btn i {
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 3rem;
    position: relative;
    z-index: 2;
}

.action-btn:hover i {
    transform: scale(1.4);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.action-btn-title {
    transition: all 0.4s ease;
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.action-btn:hover .action-btn-title {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.action-btn span:last-child {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--gray-light);
    opacity: 0.9;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.action-btn:hover span:last-child {
    opacity: 1;
    transform: translateY(2px);
}

.market-btn {
    background: linear-gradient(145deg, var(--primary-dark), var(--primary));
    border: none;
}

.market-btn::before {
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
}

.profile-btn {
    background: linear-gradient(145deg, var(--success-dark), var(--success));
    border: none;
}

.profile-btn::before {
    background: linear-gradient(90deg, var(--accent), var(--success));
}

.report-btn {
    background: linear-gradient(145deg, var(--danger-dark), var(--danger));
    border: none;
    min-height: auto;
    padding: 2rem;
}

.report-btn::before {
    background: linear-gradient(90deg, var(--accent), var(--danger));
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.action-btn {
    animation: slideUpFade 0.6s ease forwards;
    opacity: 0;
}

.action-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.action-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.action-btn:nth-child(3) {
    animation-delay: 0.3s;
}

.action-btn:nth-child(4) {
    animation-delay: 0.4s;
}

/* Balance animations */
.balance-value {
    transition: all 0.5s ease;
}

.balance-increase {
    animation: balanceIncrease 1s ease;
}

.balance-decrease {
    animation: balanceDecrease 1s ease;
}

@keyframes balanceIncrease {
    0% {
        color: inherit;
        transform: scale(1);
    }

    50% {
        color: #fff345;
        transform: scale(1.2);
    }

    100% {
        color: inherit;
        transform: scale(1);
    }
}

@keyframes balanceDecrease {
    0% {
        color: inherit;
        transform: scale(1);
    }

    50% {
        color: #f44336;
        transform: scale(1.1);
    }

    100% {
        color: inherit;
        transform: scale(1);
    }
}

.coin-spin {
    animation: coinSpin 1s ease;
}

@keyframes coinSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.report-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.report-form.active {
    opacity: 1;
    visibility: visible;
}

.report-form-content {
    background-color: var(--dark);
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.report-form.active .report-form-content {
    transform: translateY(0);
}

.report-form h3 {
    margin-bottom: 20px;
    color: var(--light);
    font-size: 20px;
    text-align: center;
}

.recent-transactions-container {
    margin-top: 1rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.recent-transactions-carousel {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: scroll 100s linear infinite;
}

.recent-transaction-item {
    flex: 0 0 auto;
    background-color: var(--dark);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.transaction-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.transaction-buyer {
    color: var(--primary-light);
    font-weight: 600;
}

.transaction-item {
    color: var(--primary);
}

.transaction-price {
    color: var(--accent);
    font-weight: 600;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Market Styles */
main {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark);
    margin-top: 50px;
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--danger);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--darker);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tab {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background-color: var(--lighter);
    color: var(--gray-ultradark);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid var(--gray);
}

.category-tab:hover {
    background-color: var(--primary-ultralight);
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

.category-tab.active {
    background-color: var(--primary);
    color: var(--lighter);
    border-color: var(--primary);
    font-weight: 600;
}

/* Market Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: linear-gradient(145deg, var(--darker), var(--dark));
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid var(--gray-ultradark);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(10px);
    transform-style: preserve-3d;
}

.item-card:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.25),
        0 0 0 1px var(--primary-light),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    border-color: var(--primary-light);
}

.item-header {
    padding: 1.5rem;
    background: linear-gradient(90deg, var(--dark), var(--dark-medium));
    border-bottom: 1px solid var(--gray-ultradark);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.item-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
}

.item-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.item-card:hover .item-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

.item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--lighter);
}

.item-category {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    position: relative;
    z-index: 2;
}

.item-body {
    padding: 1.5rem;
    background: linear-gradient(180deg, var(--darker), var(--dark));
}

.price-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
}

.base-price {
    text-decoration: line-through;
    color: var(--gray-dark);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.2rem;
    text-align: center;
}

.dynamic-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    display: block;
}

.stock-info {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stock-label {
    color: var(--gray);
    font-weight: 500;
}

.stock-value {
    font-weight: 700;
    color: var(--success);
    transition: color 0.3s ease;
}

.stock-value.out-of-stock {
    color: var(--danger);
    animation: pulseDanger 2s infinite;
}

@keyframes pulseDanger {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.price-section {
    text-align: right;
}

.buy-btn {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(99, 102, 241, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.buy-btn:hover::before {
    left: 100%;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(99, 102, 241, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, var(--primary-dark), var(--primary));
}

.buy-btn:active {
    transform: translateY(0);
}

.bundle-items {
    margin-top: 1rem;
    padding-top: 1rem;
}

.bundle-composition {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.bundle-composition-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-light);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.bundle-composition-item {
    color: var(--light);
    display: flex;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.bundle-composition-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    padding-left: 0.5rem;
}

.bundle-composition-item:last-child {
    border-bottom: none;
}

.bundle-composition-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.8rem;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    border-radius: 4px;
}

.bundle-title {
    font-size: 0.9rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.bundle-item {
    font-size: 0.85rem;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light);
}

.bundle-item::before {
    content: "•";
    color: var(--primary);
}

/* Inventory Styles */
.no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--light);
}

.compact-inventory {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.inventory-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.inventory-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stats-numbers {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.stat-item {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stat-divider {
    color: var(--gray);
}

.shimmer-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.shimmer-btn:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-light);
}

.empty-state p {
    font-size: 1rem;
    color: var(--gray);
}

.quests-label {
    margin-right: 5px;
}

.tab-button {
    background: var(--gray-dark);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.tab-button.active {
    background: var(--primary);
    color: white;
}

.tab-button:hover {
    background: var(--gray);
    color: white;
}

.tab-button.active:hover {
    background: var(--primary-dark);
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.items-container {
    min-height: 200px;
}

.items-grid-inventory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.compact-item {
    position: relative;

}

.item-icon-inventory {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #2f3f76 0%, #1e293b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.item-icon-inventory:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.item-glow {
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.compact-item[data-rarity="common"] .item-icon-inventory {
    border-color: #a0aec0;
}

.compact-item[data-rarity="rare"] .item-icon-inventory {
    border-color: #4299e1;
}

.compact-item[data-rarity="epic"] .item-icon-inventory {
    border-color: #9f7aea;
}

.compact-item[data-rarity="legendary"] .item-icon-inventory {
    border-color: #ed8936;
}

.item-icon-inventory img {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.item-icon-inventory:hover img {
    transform: scale(1.1);
}



.item-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    z-index: 2;
}

.item-tooltip {
    position: absolute;
    z-index: 100;
    width: 320px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s;
    border: 1px solid #2f3f7647;
    transform: translateY(10px);
    pointer-events: auto;
}

.item-icon-inventory:hover~.item-tooltip,
.item-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tooltip-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
    margin: 0;
}

.item-rarity {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.item-rarity.common {
    background: #a0aec0;
    color: #1a202c;
}

.item-rarity.rare {
    background: #4299e1;
    color: white;
}

.item-rarity.epic {
    background: #9f7aea;
    color: white;
}

.item-rarity.legendary {
    background: #ed8936;
    color: white;
}

.tooltip-content {
    margin-bottom: 1rem;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.tooltip-row .price {
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
}

.tooltip-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-withdraw,
.btn-sell,
.btn-opencase {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
    min-width: 120px;
}

.btn-withdraw {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-sell {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: white;
}

.btn-opencase {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.btn-withdraw:hover {
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-sell:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-opencase:hover {
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* Case Opening CSS */
.case-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px) contrast(1.2);
    perspective: 1000px;
}

.case-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            rgba(99, 102, 241, 0.1) 0%,
            rgba(79, 70, 229, 0.05) 25%,
            rgba(165, 180, 252, 0.1) 50%,
            rgba(79, 70, 229, 0.05) 75%,
            rgba(99, 102, 241, 0.1) 100%);
    animation: backgroundShift 8s ease infinite;
    pointer-events: none;
}

@keyframes backgroundShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.case-modal.active {
    display: flex;
    opacity: 1;
    justify-content: center;
    align-items: center;
    animation: modalAppear 0.6s ease;
}

.case-container {
    background: linear-gradient(145deg,
            rgba(26, 26, 46, 0.95) 0%,
            rgba(22, 33, 62, 0.98) 100%);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow:
        0 0 50px rgba(99, 102, 241, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.8) rotateX(5deg);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow-y: auto;
}

.case-modal.active .case-container {
    transform: scale(1) rotateX(0deg);
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    position: relative;
}

.case-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--primary),
            transparent);
}

.case-header h2 {
    background: linear-gradient(135deg, var(--primary), #a855f7, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.case-items-display {
    position: relative;
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg,
            rgba(27, 38, 49, 0.8) 0%,
            rgba(26, 26, 46, 0.9) 100%);
    border: 3px solid rgba(52, 152, 219, 0.5);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(52, 152, 219, 0.3);
}

.case-opening-animation {
    background: linear-gradient(135deg,
            rgba(52, 73, 94, 0.9) 0%,
            rgba(44, 62, 80, 0.95) 100%);
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(52, 152, 219, 0.5);
    animation: casePulse 1s ease-in-out infinite;
}

.item-flicker-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.flickering-item {
    position: absolute;
    width: 160px;
    height: 160px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #f39c12;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: all 0.1s ease-in-out;
    opacity: 0;
    transform: translateY(100px) rotateX(45deg);
}

.flickering-item.active {
    opacity: 1;
    transform: translateZ(0) rotateY(0deg) scale(1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flickering-item img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    transition: transform 0.3s ease;
}

.flickering-item .item-name {
    font-size: 12px;
    color: white;
    margin-top: 8px;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5), transparent);
    padding: 2px 10px;
    border-radius: 10px;
}

.case-items-can-drop {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin: 20px 0;
    backdrop-filter: blur(5px);
}

.case-item {
    position: relative;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    transform-style: preserve-3d;
    cursor: pointer;
}

.case-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.case-item img {
    height: 40px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    transition: transform 0.2s ease;
}

.case-item:hover img {
    transform: scale(1.04) rotate(2deg);
}

.case-item p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-light);
    font-weight: 600;
    word-break: break-word;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Case open */
@keyframes caseOpen {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.case-opening-animation {
    animation: caseOpen 0.5s ease-out;
}

/* Open case button */
.open-case-btn {
    background: linear-gradient(135deg,
            var(--primary) 0%,
            var(--primary-dark) 50%,
            var(--primary) 100%);
    border: none;
    padding: 18px 40px;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 25px auto;
    display: block;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 5px 15px rgba(99, 102, 241, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.open-case-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transform: rotate(45deg);
    animation: btnShine 3s ease infinite;
}

@keyframes btnShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.open-case-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 10px 25px rgba(99, 102, 241, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.open-case-btn:active {
    transform: translateY(0) scale(1);
}

.open-case-btn:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

@keyframes dropReveal {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes flicker {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
}

.dropped-item {
    animation: dropReveal 1s ease-in-out;
}

.dropped-item img {
    height: 100px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.6));
    animation: itemGlow 2s ease-in-out infinite;
}

.item-rarity {
    position: absolute;
    top: -10px;
    right: -10px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.common {
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #555, #777, #555);
    border: 1px solid #aaa;
}

.rare {
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #007bff, #0056b3, #007bff);
    border: 1px solid #007bff;
    animation: rarityGlow 2s ease-in-out infinite;
}

.epic {
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6f42c1, #4a2d82, #6f42c1);
    border: 1px solid #6f42c1;
}

.legendary {
    padding: 4px 10px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffc107, #fd7e14, #ffc107);
    border: 1px solid #ffc107;
}

.dropped-item.common {
    border-color: #aaa;
    box-shadow: 0 0 20px #aaa;
}

.dropped-item.rare {
    border-color: #007bff;
    box-shadow: 0 0 20px #007bff;
}

.dropped-item.epic {
    border-color: #6f42c1;
    box-shadow: 0 0 20px #6f42c1;
}

.dropped-item.legendary {
    border-color: #ffc107;
    box-shadow: 0 0 30px #ffc107;
}

.case-item.common {
    border-color: #aaa;
}

.case-item.rare {
    border-color: #007bff;
}

.case-item.epic {
    border-color: #6f42c1;
}

.case-item.legendary {
    border-color: #ffc107;
}

@media (max-width: 768px) {
    .inventory-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .item-tooltip {
        width: 200px;
    }
}

/* Chat settings */
.floating-chat {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    color: var(--lighter);
    font-size: 24px;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--lighter);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.chat-container {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 350px;
    height: 500px;
    background: var(--darker);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-ultradark);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--lighter);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.chat-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--lighter);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}


.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary);
    font-size: 14px;
    border: 2px solid var(--primary-light);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: var(--dark);
    scrollbar-width: thin;
}

.chat-input {
    padding: 15px;
    background: var(--dark-medium);
    border-top: 1px solid var(--gray-ultradark);
    border-radius: 9px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--dark);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.message {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--dark-medium);
    border-left: 3px solid var(--gray-dark);
    animation: messageSlideIn 0.3s ease;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message[data-animated="true"] {
    animation: none;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.timestamp {
    font-size: 0.8rem;
    color: var(--gray);
}

.message-content {
    color: var(--primary);
    line-height: 1.5;
    font-size: 0.95rem;
}

.my-message {
    background: linear-gradient(135deg, var(--primary-ultralight) 0%, var(--primary-light) 100%);
    border-left: 3px solid var(--primary);
    margin-left: 20px;
}

.my-message .username {
    color: var(--primary-dark);
}

.my-message .timestamp {
    color: var(--primary);
}

.my-message .message-content {
    color: var(--darker);
}

.message-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

#messageInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-ultradark);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    background: var(--dark);
    color: var(--gray-light);
    transition: all 0.3s ease;
}

#messageInput::placeholder {
    color: var(--gray);
}

#messageInput:focus {
    border-color: var(--primary);
    background: var(--darker);
}

.global-chat-send-message-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--lighter);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.global-chat-send-message-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-out {
    animation: fadeOut 0.4s ease-in-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Notifications */
.notifications-wrapper {
    position: relative;
    display: inline-block;
}

.notifications-bell {
    position: relative;
    cursor: pointer;
    font-size: 24px;
    background: var(--dark);
    border-radius: 12px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-ultradark);
    color: var(--gray);
}

.notifications-bell:hover {
    background: var(--dark-medium);
    color: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.notifications-bell:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.1);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger);
    color: var(--lighter);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--darker);
    animation: pulse-not 2s infinite;
}

@keyframes pulse-not {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.notifications-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: var(--darker);
    border: 2px solid var(--gray-ultradark);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 1000;
    margin-top: 12px;
    opacity: 0;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

.notifications-popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideInUpNotificationContainer 0.3s ease;
}

@keyframes slideInUpNotificationContainer {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-header {
    padding: 20px;
    border-bottom: 2px solid var(--gray-ultradark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--dark), var(--darker));
    border-radius: 14px 14px 0 0;
}

.notifications-header h3 {
    margin: 0;
    color: var(--light);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifications-header h3 i {
    color: var(--primary);
    font-size: 20px;
}

.mark-all-read {
    background: var(--primary);
    color: var(--lighter);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.mark-all-read:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mark-all-read:active {
    transform: translateY(0);
}

.mark-all-read i {
    font-size: 13px;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark);
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: var(--dark);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-ultradark);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
    border-radius: 0 0 14px 14px;
}

.notification-item:hover {
    background: var(--dark-medium);
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, transparent 100%);
    border-left: 4px solid var(--primary);
}

.notification-item.unread:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.15) 0%, transparent 100%);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: blink-notify 2s infinite ease-in-out;
}

@keyframes blink-notify {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

.notification-content {
    color: var(--gray-light);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 6px;
    font-weight: 400;
}

.notification-item.unread .notification-content {
    color: var(--light);
    font-weight: 500;
}

.notification-timestamp {
    color: var(--gray-dark);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-timestamp i {
    font-size: 14px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray);
    font-style: italic;
}

.notification-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    color: var(--gray-dark);
}

.notification-item[data-type="purchase"] .notification-content::before {
    content: '🛒 ';
    margin-right: 4px;
}

.notification-item[data-type="sale"] .notification-content::before {
    content: '💰 ';
    margin-right: 4px;
}

.notification-item[data-type="reward"] .notification-content::before {
    content: '🎁 ';
    margin-right: 4px;
}

.notification-item[data-type="system"] .notification-content::before {
    content: '⚙️ ';
    margin-right: 4px;
}

.notification-item[data-type="warning"] .notification-content::before {
    content: '⚠️ ';
    margin-right: 4px;
}

@keyframes newNotification {
    0% {
        background: var(--primary-ultralight);
        transform: scale(0.95);
    }

    100% {
        background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, transparent 100%);
        transform: scale(1);
    }
}

.notification-item.new {
    animation: newNotification 0.6s ease;
}