* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
    width: 100%;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #207ae4;
    --tg-theme-button-color: #3390ec;
    --tg-theme-button-text-color: #ffffff;
    --tg-theme-secondary-bg-color: #f0f0f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0-11.2 */
}

.container {
    width: 100%;
    max-width: 100%;
}

.screen {
    padding: 40px 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.screen::-webkit-scrollbar {
    display: none;
}

.screen.hidden {
    display: none;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--tg-theme-secondary-bg-color);
    border-top: 4px solid var(--tg-theme-button-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    margin-top: 20px;
    color: var(--tg-theme-text-color);
    font-size: 16px;
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
}

.welcome-logo {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    margin-bottom: 30px;
    object-fit: cover;
}

.welcome-content h1 {
    color: var(--tg-theme-text-color);
    font-size: 28px;
    margin-bottom: 10px;
}

.welcome-content p {
    color: var(--tg-theme-hint-color);
    font-size: 16px;
    margin-bottom: 30px;
}

.btn-primary {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    opacity: 0.8;
}

/* Profile Screen */
.profile-content {
    width: 100%;
    padding-bottom: 20px;
}

#main-screen {
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    padding-bottom: calc(70px + constant(safe-area-inset-bottom)); /* iOS 11.0-11.2 */
    position: relative;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#main-screen::-webkit-scrollbar {
    display: none;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    width: 100%;
    margin-top: 0;
    padding-top: 0;
}

.profile-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
}

.profile-header h2 {
    color: var(--tg-theme-text-color);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.profile-header .username {
    color: var(--tg-theme-hint-color);
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

.profile-info .coins-display {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    margin: 0;
    margin-top: 4px;
    font-weight: 400;
}

.nft-section {
    margin-top: 30px;
    width: 100%;
}

.nft-content {
    background: var(--tg-theme-secondary-bg-color);
    padding: 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.nft-empty {
    color: var(--tg-theme-hint-color);
    font-size: 16px;
    text-align: center;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.nfts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

#profile-nfts.nfts-grid,
#modal-nfts.nfts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

#profile-nfts .nft-card {
    min-height: auto;
}

#profile-nfts .nft-card-image,
#modal-nfts .nft-card-image {
    width: 80px;
    height: 80px;
    margin: 12px auto;
    border-radius: 8px;
}

#profile-nfts .nft-card-info,
#modal-nfts .nft-card-info {
    padding: 0 8px 8px 8px;
}

#profile-nfts .nft-card-name,
#modal-nfts .nft-card-name {
    font-size: 18px;
}

#profile-nfts .nft-card-description,
#modal-nfts .nft-card-description {
    font-size: 14px;
    padding-bottom: 8px;
    margin: 0 0 0 0;
}

#profile-nfts .nft-card-price,
#modal-nfts .nft-card-price {
    font-size: 1px;
}

.nfts-grid.hidden {
    display: none;
}

.nft-empty.hidden {
    display: none;
}

.nft-card {
    background: var(--tg-theme-secondary-bg-color);
    border: 3px solid;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.nft-card[data-has-gradient] {
    border-color: rgba(255, 255, 255, 0.2);
}

.nft-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.15), 
        transparent
    );
    animation: glint 5s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes glint {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.nft-card:hover {
    transform: translateY(-2px);
}

.nft-card:hover::before {
    animation-duration: 3s;
}

.nft-card-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: transparent;
    margin: 20px auto;
    display: block;
    border-radius: 12px;
}

.nft-card-info {
    padding: 12px;
}

.nft-card-name {
    color: var(--tg-theme-text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.nft-card-description {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.nft-card-price {
    color: var(--tg-theme-button-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.nft-card-owned {
    opacity: 0.9;
}

.nft-buy-button {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nft-buy-button:hover {
    opacity: 0.9;
}

.nft-buy-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message-section {
    background: transparent;
    padding: 20px 0;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.info-message {
    color: var(--tg-theme-text-color);
    font-size: 16px;
    line-height: 1.5;
}

/* App Pages */
.app-page {
    display: none;
    width: 100%;
    min-height: calc(100vh - 70px);
}

.app-page.active {
    display: block;
}

.page-content {
    width: 100%;
    padding-bottom: 20px;
}

.page-title {
    color: var(--tg-theme-text-color);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 30px 0;
}

.coins-display-large {
    background: var(--tg-theme-secondary-bg-color);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.coins-count-large {
    font-size: 28px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
}

.coins-label-large {
    font-size: 18px;
    color: var(--tg-theme-hint-color);
}

.quests-section {
    margin-top: 30px;
    width: 100%;
}

.quests-title {
    color: var(--tg-theme-text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quest-item {
    background: var(--tg-theme-secondary-bg-color);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.quest-title {
    color: var(--tg-theme-text-color);
    font-size: 16px;
    font-weight: 500;
    flex: 1;
    margin: 0;
}

.quest-link {
    color: var(--tg-theme-link-color);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.quest-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.quest-reward {
    color: var(--tg-theme-button-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.quest-completed {
    color: var(--tg-theme-hint-color);
    font-size: 20px;
    margin: 0;
}

.empty-message {
    color: var(--tg-theme-hint-color);
    font-size: 16px;
    text-align: center;
    margin-top: 40px;
}

.code-section {
    margin-top: 30px;
    width: 100%;
}

.code-title {
    color: var(--tg-theme-text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.code-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.code-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--tg-theme-secondary-bg-color);
    border-radius: 8px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.code-input:focus {
    border-color: var(--tg-theme-button-color);
}

.code-button {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.code-button:hover {
    opacity: 0.9;
}

.code-button:active {
    opacity: 0.8;
}

.code-message {
    min-height: 24px;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

.code-message.success {
    color: #4caf50;
}

.code-message.error {
    color: #f44336;
}

.leaders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.leader-item {
    background: var(--tg-theme-secondary-bg-color);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.3s ease;
}

.leader-item:hover {
    background-color: var(--tg-theme-secondary-bg-color);
    opacity: 0.8;
}

.leader-rank {
    color: var(--tg-theme-text-color);
    font-size: 18px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.leader-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--tg-theme-bg-color);
}

.leader-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leader-name {
    color: var(--tg-theme-text-color);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.leader-username {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
    margin: 0;
}

.leader-coins {
    color: var(--tg-theme-button-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.leaders-spacer {
    height: calc(70px + env(safe-area-inset-bottom));
    height: calc(70px + constant(safe-area-inset-bottom)); /* iOS 11.0-11.2 */
    flex-shrink: 0;
}

/* Admin Panel */
.admin-panel {
    margin-top: 30px;
    width: 100%;
}

.admin-panel.hidden {
    display: none;
}

.admin-section {
    width: 100%;
}

.admin-title {
    color: var(--tg-theme-text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.admin-block {
    background: var(--tg-theme-secondary-bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.admin-subtitle {
    color: var(--tg-theme-text-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.admin-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--tg-theme-secondary-bg-color);
    border-radius: 8px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.admin-input:focus {
    border-color: var(--tg-theme-button-color);
}

.admin-button {
    width: 100%;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.admin-button:hover:not(:disabled) {
    opacity: 0.9;
}

.admin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-message {
    min-height: 20px;
    font-size: 12px;
    margin-top: 10px;
    text-align: center;
}

.admin-message.success {
    color: #4caf50;
}

.admin-message.error {
    color: #f44336;
}

.admin-users-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.admin-user-item {
    background: var(--tg-theme-bg-color);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-user-item:hover {
    background: var(--tg-theme-secondary-bg-color);
}

.admin-user-item.selected {
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.admin-user-username {
    font-size: 12px;
    opacity: 0.8;
    margin: 2px 0 0 0;
}

.admin-user-coins {
    font-size: 14px;
    font-weight: 600;
}

/* Codes List */
.admin-codes-list-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--tg-theme-secondary-bg-color);
}

.admin-codes-list-title {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.admin-codes-list {
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-code-item {
    background: var(--tg-theme-bg-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.admin-code-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-code-name {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.admin-code-reward {
    color: var(--tg-theme-hint-color);
    font-size: 12px;
    margin: 0;
}

.admin-code-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.admin-code-activations {
    color: var(--tg-theme-button-color);
    font-size: 12px;
    font-weight: 600;
}

/* Admin Lists (Quests and NFTs) */
.admin-list-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--tg-theme-secondary-bg-color);
}

.admin-list-title {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.admin-list {
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.admin-list-item {
    background: var(--tg-theme-bg-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.admin-list-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-list-item-name {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.admin-list-item-details {
    color: var(--tg-theme-hint-color);
    font-size: 12px;
    margin: 0;
}

.admin-list-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-delete-button {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.admin-delete-button:hover {
    opacity: 0.9;
}

/* Gradient Settings */
.admin-gradient-section {
    margin-top: 15px;
    padding: 15px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 8px;
}

.admin-gradient-title {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.admin-gradient-type {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.admin-gradient-type-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--tg-theme-text-color);
    font-size: 14px;
}

.admin-gradient-type-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.admin-gradient-label {
    display: block;
    color: var(--tg-theme-text-color);
    font-size: 12px;
    font-weight: 500;
    margin: 12px 0 6px 0;
}

.admin-gradient-slider {
    width: 100%;
    margin: 8px 0;
    cursor: pointer;
}

.admin-gradient-value {
    display: inline-block;
    color: var(--tg-theme-hint-color);
    font-size: 12px;
    margin-left: 8px;
    min-width: 40px;
}

.admin-gradient-color-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.admin-gradient-color {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.admin-gradient-color-text {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--tg-theme-secondary-bg-color);
    border-radius: 6px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    font-size: 14px;
}

.admin-gradient-preview {
    margin-top: 15px;
    padding: 12px;
    background: var(--tg-theme-bg-color);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-gradient-preview-box {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    border: 1px solid var(--tg-theme-secondary-bg-color);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    background: var(--tg-theme-bg-color);
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom); /* iOS 11.0-11.2 */
}

.nav-item {
    background: none;
    border: none;
    color: var(--tg-theme-hint-color);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    margin: 7px;
    justify-content: center;
    align-items: center;
}

.nav-item.active {
    color: var(--tg-theme-button-color);
    background: var(--tg-theme-secondary-bg-color);
}

.nav-item:hover {
    background: var(--tg-theme-secondary-bg-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    color: inherit;
}

.nav-icon[fill="currentColor"] {
    fill: currentColor;
}

.nav-label {
    display: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--tg-theme-bg-color);
    border-radius: 16px;
    max-width: 90%;
    max-height: 90vh;
    width: 100%;
    max-width: 500px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--tg-theme-secondary-bg-color);
}

.modal-title {
    color: var(--tg-theme-text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--tg-theme-text-color);
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

@media (max-width: 480px) {
    .screen {
        padding: 30px 16px;
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
        padding-bottom: calc(30px + constant(safe-area-inset-bottom)); /* iOS 11.0-11.2 */
    }
    
    #main-screen {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
        padding-bottom: calc(70px + constant(safe-area-inset-bottom)); /* iOS 11.0-11.2 */
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
}

/* Profile Footer */
.profile-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--tg-theme-secondary-bg-color);
    text-align: center;
    width: 100%;
}

.profile-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tg-theme-link-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 8px;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    background: var(--tg-theme-secondary-bg-color);
}

.profile-footer-link:hover {
    opacity: 0.8;
    background: var(--tg-theme-secondary-bg-color);
}

.profile-footer-link:active {
    opacity: 0.6;
}

.profile-footer-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Referral Section */
.referral-section {
    margin-top: 40px;
    padding: 20px;
    background: var(--tg-theme-secondary-bg-color);
    border-radius: 12px;
    width: 100%;
}

.referral-title {
    color: var(--tg-theme-text-color);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
    text-align: center;
}

.referral-description {
    color: var(--tg-theme-hint-color);
    font-size: 14px;
    margin: 0 0 16px 0;
    text-align: center;
}

.referral-link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.referral-link-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--tg-theme-secondary-bg-color);
    border-radius: 8px;
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
    font-size: 14px;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
}

.referral-copy-button {
    padding: 12px;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.referral-copy-button:hover {
    opacity: 0.8;
}

.referral-copy-button:active {
    opacity: 0.6;
}

.referral-copy-icon {
    width: 20px;
    height: 20px;
}

.referral-stats {
    color: var(--tg-theme-text-color);
    font-size: 14px;
    text-align: center;
    margin: 0;
    font-weight: 500;
}

