header {
    position: sticky;
    top: -2px;
    left: 0;
    right: 0;
    z-index: 1049;
    background: var(--system-color, #1F3E74);
    padding: 1rem;
}

header .header-top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .header-top-logo {
    width: auto;
    height: 25px;
    object-fit: cover;
}

header .header-top-buttons {
    display: flex;
    justify-content: end;
    gap: 1.25rem;
}

header .header-top-buttons-link,
header .header-top-buttons a {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: .5rem;
    text-align: center;
}

.header-section-content {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    text-align: start;
}

.header-section-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.header-section-content p {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

.header-section-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-section-buttons a {
    background: #F2BB2B;
    border: 1px solid #F2BB2B;
    padding: .75rem;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: .5rem;
    text-align: center;
}

.top-bar-section {
    position: fixed;
    top: -150%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--system-color, #1F3E74);
    padding: 1rem;
    height: calc(100vh - 5rem);
    transition: all .5s ease-in-out;
    overflow: hidden;
}

.top-bar-section.open {
    top: 0;
}

.top-bar-section .top-bar-top-section {
    height: calc(78vh - 6rem);
}

.top-bar-section .top-bar-top-section .top-bar-top-section-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.top-bar-section .top-bar-top-section .top-bar-user-avatar-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    overflow: hidden;
    width: 100%;
}

.top-bar-section .top-bar-top-section .top-bar-user-information {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    overflow: hidden;
}

.top-bar-section .top-bar-top-section .top-bar-user-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.top-bar-section .top-bar-top-section .top-bar-user-email {
    font-size: .95rem;
    font-weight: 500;
    margin: 0;
    padding: 0;
}

.top-bar-section .top-bar-top-section .top-bar-user-avatar {
    height: 5rem;
    width: 5rem;
    min-width: 5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #FFF;
    background-color: #F2BB2B;
    border: 3px solid #FFF;
    overflow: hidden;
}

.top-bar-section .top-bar-top-section .top-bar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-bar-section .top-bar-user-info {
    border-bottom: 1px solid rgba(255, 255, 255, .25);
    padding-bottom: 1.5rem;
}

.top-bar-section .top-bar-user-info .top-bar-user-balance {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    padding: .5rem 0 0 0;
}

.top-bar-section .top-bar-user-info .top-bar-small-text {
    font-size: .95rem;
    font-weight: 500;
    padding: 0;
}

.top-bar-section .top-bar-user-info .top-bar-clipboard-icon {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0;
}

.top-bar-section .top-bar-user-menu ul {
    list-style: none;
    padding: 1.5rem 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 45vh;
    overflow-y: auto;
    scrollbar-width: none;
}

.top-bar-section .top-bar-user-menu ul li a {
    text-decoration: none;
    color: #FFF;
    font-size: 1rem;
    font-weight: 500;
}

.top-bar-section .top-bar-bottom-section {
    height: calc(15vh - 6rem);
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-bar-section .top-bar-bottom-section button {
    background: #F2BB2B;
    border: 1px solid #F2BB2B;
    padding: .75rem;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: .5rem;
    text-align: center;
}

/* Member Level Page Styles */
.level-page-container {
    padding: 1rem 0 2rem;
    min-height: 100vh;
}

.level-page-container .page-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    position: relative;
}

.level-page-container .page-header .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
    transition: all 0.3s ease;
    z-index: 10;
}

.level-page-container .page-header .back-btn:hover {
    background: rgba(242, 187, 43, 0.2);
    border-color: #F2BB2B;
    color: #F2BB2B;
    transform: translateX(-3px);
}

.level-page-container .page-header .header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.current-level-status {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.6) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(242, 187, 43, 0.3);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(25px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(242, 187, 43, 0.1);
}

.current-level-status::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(242, 187, 43, 0.05), transparent 70%);
    pointer-events: none;
}

.current-level-status .status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #F2BB2B;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
}

.current-level-status .status-level-name {
    font-size: 2.25rem;
    font-weight: 950;
    background: linear-gradient(to right, #FFFFFF, #F2BB2B);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1;
    letter-spacing: -1px;
}

.current-level-status .status-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.current-level-status .stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem;
}

.current-level-status .stat-box label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.current-level-status .stat-box span {
    font-size: 1.1rem;
    font-weight: 800;
    color: #F2BB2B;
}

.current-level-status .progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.current-level-status .progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.magazine-grid .magazine-item {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.magazine-grid .magazine-item.is-current {
    background: rgba(242, 187, 43, 0.1);
    border: 1px solid rgba(242, 187, 43, 0.6);
    box-shadow: 0 0 25px rgba(242, 187, 43, 0.15);
}

.magazine-grid .magazine-item:hover {
    border-color: rgba(242, 187, 43, 0.5);
    background: rgba(30, 64, 175, 0.25);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.magazine-grid .magazine-item.is-current:hover {
    border-color: #F2BB2B;
    box-shadow: 0 15px 35px rgba(242, 187, 43, 0.25);
}

.magazine-grid .magazine-item[data-tier="1"] { border-left: 4px solid #F2BB2B; }
.magazine-grid .magazine-item[data-tier="2"] { border-left: 4px solid #22d3ee; }
.magazine-grid .magazine-item[data-tier="3"] { border-left: 4px solid #a855f7; }
.magazine-grid .magazine-item[data-tier="4"] { border-left: 4px solid #10b981; }
.magazine-grid .magazine-item[data-tier="5"] { border-left: 4px solid #f97316; }

.magazine-grid .magazine-item .mag-content {
    position: relative;
    width: 100%;
    padding: 0 1rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: auto;
    z-index: 1;
}

.magazine-grid .magazine-item .mag-badge {
    background: #F2BB2B;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: .5rem;
    letter-spacing: 1px;
}

.magazine-grid .magazine-item .mag-rating {
    /* position: absolute; */
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.2rem 0.6rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    z-index: 2;
    width: max-content;
}

.magazine-grid .magazine-item .mag-rating i {
    color: #F2BB2B;
    font-size: 1rem;
}

.magazine-grid .magazine-item .mag-rating span {
    font-weight: 800;
    font-size: 1rem;
}

.magazine-grid .magazine-item .mag-active-tag {
    /* position: absolute; */
    top: 0.75rem;
    left: 0.75rem;
    background: #F2BB2B;
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 2;
    width: fit-content;
    box-shadow: 0 0 15px rgba(242, 187, 43, 0.4);
}

.magazine-grid .magazine-item .mag-lock-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.2rem 0.6rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.magazine-grid .magazine-item.is-locked {
    filter: grayscale(0.5) contrast(0.9);
    opacity: 0.85;
}

.magazine-grid .magazine-item.is-locked:hover {
    filter: grayscale(0.2) contrast(1);
    opacity: 1;
}

.magazine-grid .magazine-item .mag-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.1;
    margin-bottom: .25rem;
}

.magazine-grid .magazine-item .mag-perks-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.magazine-grid .magazine-item .mag-perks-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
}

.magazine-grid .magazine-item .mag-perks-list li i {
    color: #F2BB2B;
    font-size: 0.9rem;
    width: 15px;
    text-align: center;
}

.magazine-grid .magazine-item .mag-req-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.2rem;
}

.magazine-grid .magazine-item .req-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem;
}

.magazine-grid .magazine-item .req-item label {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.magazine-grid .magazine-item .req-item span {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
}

.magazine-grid .magazine-item .mag-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.6rem;
}

.magazine-grid .magazine-item .activation-box label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.magazine-grid .magazine-item .activation-box .price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #F2BB2B;
}

.magazine-grid .magazine-item .mag-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.magazine-grid .magazine-item .mag-level-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #F2BB2B;
    padding: 4px;
    background: rgba(0,0,0,0.5);
    object-fit: contain;
}

@media (max-width: 768px) {
    .magazine-grid .magazine-item .mag-title {
        font-size: 1.5rem;
    }
    .current-level-status {
        padding: 1.5rem;
    }
    .current-level-status .status-level-name {
        font-size: 2rem;
    }
    .current-level-status .status-stats-grid {
        gap: 0.75rem;
    }
}

/* Profile Page Header */
.profile-header {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.profile-header .avatar {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 50%;
    border: 3px solid #F2BB2B;
    padding: 4px;
    background-color: rgba(0,0,0,0.3);
}

.profile-header .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-header .user-info {
    flex-grow: 1;
}

.profile-header .user-info .name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 0.25rem 0;
}

.profile-header .user-info .email {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.profile-header .balance-info {
    text-align: right;
}

.profile-header .balance-info .balance-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-header .balance-info .balance-amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: #F2BB2B;
    line-height: 1.2;
}

/* Profile Page Feature Grid */
.profile-page-container {
    padding: 1rem 0 2rem;
    min-height: 100vh;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.2) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: #FFFFFF;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(242, 187, 43, 0.2) 0%, rgba(30, 64, 175, 0.4) 100%);
    border-color: rgba(242, 187, 43, 0.5);
    box-shadow: 0 8px 25px rgba(242, 187, 43, 0.2);
}

.feature-card .profile-feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.5rem;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.feature-card:hover .profile-feature-icon {
    transform: scale(1.1);
}

.feature-card .feature-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9)
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid #F2BB2B;
}

@media (min-width: 576px) {
    .modal-dialog {
        width: calc(var(--bs-modal-width) - 30px) !important;
        max-width: calc(var(--bs-modal-width) - 30px) !important;
    }
}

@media (max-width: 767.98px) {
  .modal-fullscreen-md-down {
    width: calc(100vw - 30px);
    max-height: calc(100vh - 30px);
    margin: 15px auto;
    min-height: calc(100vh - 30px);
  }
  
  .modal-dialog {
    margin: 15px auto !important;
    width: calc(100vw - 30px) !important;
    max-width: calc(100vw - 30px) !important;
  }
}