/* Telegram-style Bottom Sheet - Modern Minimalist */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-sheet-overlay.show {
    opacity: 1;
}

.bottom-sheet {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--tg-midnight-blue, #191f2d);
    border-radius: 14px 14px 0 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
}

.bottom-sheet.success-mode {
    top: auto;
    padding-top: 0;
    border-radius: 14px 14px 0 0;
}

.bottom-sheet.show {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 36px;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin: 10px auto 6px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.bottom-sheet:hover .bottom-sheet-handle {
    background: rgba(255, 255, 255, 0.35);
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 12px;
    background: var(--tg-midnight-blue, #191f2d);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.bottom-sheet-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--tg-text, #FFFFFF);
    margin: 0;
    letter-spacing: -0.2px;
    text-align: center;
}

.close-btn {
    display: none;
}

.bottom-sheet-content {
    overflow-y: auto;
    padding: 0 0 120px 0;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Remove extra padding and scrolling when in success mode */
.bottom-sheet.success-mode .bottom-sheet-content {
    padding: 0;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
}

/* Hide handle in success mode */
.bottom-sheet.success-mode .bottom-sheet-handle {
    display: none;
}

.bottom-sheet-content::-webkit-scrollbar {
    width: 4px;
}

.bottom-sheet-content::-webkit-scrollbar-track {
    background: transparent;
}

.bottom-sheet-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.bottom-sheet-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Telegram UI Components - Minimalist */
.tg-section {
    margin: 0;
}

.tg-section:first-child {
    margin-top: 0;
}

.tg-section-header {
    padding: 12px 16px 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tg-text-secondary, #8e9499);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tg-cell {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: transparent;
    border-top: 0.5px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.tg-cell:active {
    background: rgba(255, 255, 255, 0.03);
}

.tg-cell-before {
    margin-right: 14px;
    flex-shrink: 0;
}

.tg-cell-content {
    flex: 1;
}

.tg-cell-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--tg-text, #FFFFFF);
    margin-bottom: 3px;
    letter-spacing: -0.2px;
}

.tg-cell-subtitle {
    font-size: 14px;
    color: var(--tg-text-secondary, #8e9499);
    letter-spacing: -0.1px;
}

/* Telegram Input Styles - Clean & Modern */
.tg-input-wrapper {
    padding: 0 16px;
    margin-bottom: 12px;
}

.tg-input-wrapper:last-child {
    margin-bottom: 12px;
}

.tg-input-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--tg-text-secondary, #8e9499);
    margin-bottom: 8px;
    letter-spacing: -0.1px;
}

.tg-input,
.tg-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    background: #222a3e;
    color: var(--tg-text, #FFFFFF);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tg-input:focus,
.tg-textarea:focus {
    outline: none;
    background: #2a3448;
    box-shadow: 0 0 0 2px rgba(51, 144, 236, 0.2);
}

.tg-input::placeholder,
.tg-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.tg-textarea {
    resize: vertical;
    min-height: 88px;
    line-height: 1.5;
}

/* Telegram Button Styles - Modern */
.tg-button {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 14px 20px;
    border-radius: 10px;
    border: none;
    background: var(--tg-accent, #3390ec);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 12px rgba(51, 144, 236, 0.25);
    letter-spacing: -0.2px;
}

.tg-button:hover {
    background: #2c82d9;
    box-shadow: 0 4px 16px rgba(51, 144, 236, 0.35);
}

.tg-button:active {
    transform: scale(0.98);
}

.tg-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.tg-button-large {
    padding: 15px 20px;
    font-size: 17px;
}

.publish-fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: var(--tg-midnight-blue, #191f2d);
    z-index: 1001;
}

.publish-fixed-bottom.keyboard-open {
    display: none;
}

.add-buttons-row {
    display: flex;
    gap: 10px;
    padding: 0 16px;
}

.tg-button-outline {
    width: auto;
    margin: 0;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    background: #222a3e;
    color: var(--tg-accent, #3390ec);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tg-button-outline:hover {
    background: #2a3448;
}

.tg-button-outline:active {
    transform: scale(0.98);
}

/* Channel and Link Items - Clean List */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 12px;
}

#channelsList {
    margin-bottom: 12px;
}

#linksList {
    min-height: 0;
}

#linksList:not(:empty) {
    margin-bottom: 12px;
}

.items-list:empty {
    min-height: 0;
    margin-bottom: 0;
}

.channel-item,
.link-item,
.x-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #222a3e;
    border-radius: 12px;
}

.input-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    margin: 0 2px;
}

.channel-item input,
.link-item input,
.x-item input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--tg-text, #FFFFFF);
    font-size: 14px;
    padding: 0;
    min-width: 0;
}

.channel-item input::placeholder,
.link-item input::placeholder,
.x-item input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.channel-item input:focus,
.link-item input:focus,
.x-item input:focus {
    outline: none;
}

.item-name-input {
    flex: 1;
    font-size: 14px !important;
    color: var(--tg-text, #FFFFFF) !important;
}

.item-url-input {
    flex: 1;
}

.clear-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
    opacity: 0.7;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.clear-btn:active {
    transform: scale(0.92);
}

.add-link-btn {
    width: calc(100% - 32px);
    margin: 0 16px 8px;
    padding: 12px 16px;
    background: #222a3e;
    border: none;
    border-radius: 12px;
    color: var(--tg-text, #FFFFFF);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.add-link-btn:hover {
    background: #2a3448;
}

.add-link-btn:active {
    transform: scale(0.98);
}

/* Publish Message - Modern Feedback */
.publish-message {
    margin: 12px 16px 0;
    padding: 14px 16px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.1px;
}

.publish-message.success {
    background: rgba(52, 199, 89, 0.12);
    color: var(--tg-success, #34C759);
}

.publish-message.error {
    background: rgba(255, 59, 48, 0.12);
    color: var(--tg-error, #ff3b30);
}

/* Account Preview Card */
.account-preview-card {
    margin: 0 16px 0;
    padding: 24px;
    background: #000000;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

#formAvatar {
    margin-bottom: -4px;
}

.account-preview-card::before {
    content: '';
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(30px);
    animation: lightDrift 12s ease-in-out infinite;
    z-index: 0;
}

.account-preview-card > * {
    position: relative;
    z-index: 1;
}

@keyframes lightDrift {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.6;
    }
    25% {
        transform: translateX(-40%) translateY(-10px);
        opacity: 0.8;
    }
    50% {
        transform: translateX(-55%) translateY(5px);
        opacity: 0.5;
    }
    75% {
        transform: translateX(-45%) translateY(-5px);
        opacity: 0.7;
    }
}

/* Emoji Pattern Background */
.emoji-pattern-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.emoji-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0.1;
    user-select: none;
    animation: emojiFloat 25s ease-in-out infinite;
}

/* Staggered positions for 6 emojis (3 left, 3 right) around logo */
.emoji-decoration:nth-child(1) { top: 25%; left: 18%; animation-delay: 0s; }
.emoji-decoration:nth-child(2) { top: 42%; left: 10%; animation-delay: 6s; }
.emoji-decoration:nth-child(3) { top: 58%; left: 18%; animation-delay: 12s; }
.emoji-decoration:nth-child(4) { top: 28%; right: 18%; animation-delay: 3s; }
.emoji-decoration:nth-child(5) { top: 45%; right: 10%; animation-delay: 9s; }
.emoji-decoration:nth-child(6) { top: 62%; right: 18%; animation-delay: 15s; }

@keyframes emojiFloat {
    0%, 100% {
        transform: translateY(0px) rotate(-5deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
        opacity: 0.08;
    }
}

/* Color Presets Bar */
.color-presets-bar {
    margin: 0 16px 0;
    padding: 16px;
    background: #222a3e;
    border-radius: 0;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Add Icon Button */
.add-icon-btn {
    margin: 0 16px 12px;
    padding: 14px 20px;
    background: #222a3e;
    border: none;
    border-radius: 0 0 12px 12px;
    color: var(--tg-text, #FFFFFF);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    transition: all 0.2s ease;
}

.add-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.add-icon-btn:active {
    transform: scale(0.98);
}

.add-icon-btn.active {
    background: #10141d;
    border-radius: 0;
}

/* Emoji Picker */
.emoji-picker {
    margin: -10px 16px 0;
    padding: 8px;
    background: #10141d;
    border-radius: 0 0 12px 12px;
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
}

.emoji-picker-grid {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
}

.emoji-item {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.emoji-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.emoji-item:active {
    transform: scale(0.95);
}

#formAvatar {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#formAvatar img,
#formAvatar > div {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

#formName {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-text, #FFFFFF);
    text-align: center;
}

#formUsername {
    font-size: 14px;
    color: var(--tg-text-secondary, #8e9499);
    text-align: center;
}

/* SVG Icons Styling */
.tg-button-outline svg,
.close-btn svg,
.remove-btn svg {
    flex-shrink: 0;
    pointer-events: none;
}

.tg-button-outline svg {
    stroke-width: 2;
    transition: transform 0.2s ease;
}

.tg-button-outline:hover svg {
    transform: scale(1.05);
}

.close-btn svg {
    stroke-width: 2.5;
}

.remove-btn svg {
    stroke-width: 2;
}

/* Smooth animations for list items */
.channel-item,
.link-item {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for inputs */
.channel-item input:focus,
.link-item input:focus {
    color: var(--tg-text, #FFFFFF);
}

/* Color Picker Styles */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.color-input {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
}

.color-input::-webkit-color-swatch {
    border-radius: 50%;
    border: none;
}

.color-input::-moz-color-swatch {
    border-radius: 50%;
    border: none;
}

.color-preview {
    flex: 1;
    height: 40px;
    border-radius: 8px;
    background: var(--tg-midnight-blue, #191f2d);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-preset {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.color-preset:hover {
    transform: scale(1.1);
}

.color-preset:active {
    transform: scale(0.95);
}

.color-preset.active {
    box-shadow: 0 0 0 3px var(--tg-accent, #3390ec);
}

/* Mobile touch optimizations */
@media (hover: none) and (pointer: coarse) {
    .close-btn:hover,
    .tg-button:hover,
    .tg-button-outline:hover,
    .remove-btn:hover {
        transform: none;
    }

    .close-btn:active,
    .tg-button:active,
    .tg-button-outline:active,
    .remove-btn:active {
        transform: scale(0.95);
    }
}

/* Success State */
.publish-success-card {
    padding: 32px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Success Header */
.tg-success-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    text-align: center;
}

.tg-success-gif {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 12px;
}

.tg-success-checkmark {
    color: #3390ec;
    flex-shrink: 0;
}

.tg-success-title {
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: -0.4px;
}

/* List Container */
.tg-list {
    background: var(--tg-dark-blue, #222a3e);
    border-radius: 12px;
    margin: 0 16px 2px;
    overflow: hidden;
}

/* BagID Item */
.tg-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}

.tg-list-content {
    flex: 1;
    min-width: 0;
}

.tg-list-label {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 4px;
}

.tg-bagid-code {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #8e9499;
    word-break: break-all;
    display: block;
    line-height: 1.4;
}

.tg-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #3390ec;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.tg-icon-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

/* Action Rows */
.tg-action-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.tg-action-row:active {
    background: #10141d;
}

.tg-action-icon {
    color: #3390ec;
    flex-shrink: 0;
}

.tg-action-text {
    flex: 1;
    font-size: 17px;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: -0.4px;
}

.tg-action-chevron {
    color: #8e9499;
    flex-shrink: 0;
}

/* Divider */
.tg-divider {
    height: 0.5px;
    background: rgba(142, 148, 153, 0.2);
    margin: 0 16px;
}

/* Propagation Notice */
.tg-propagation-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin-top: 4px;
    text-align: center;
}

.tg-notice-icon {
    color: #8e9499;
    flex-shrink: 0;
    opacity: 0.7;
}

.tg-notice-text {
    font-size: 12px;
    color: #8e9499;
    line-height: 1.3;
}

/* TON Domain Guide */
.tg-guide-container {
    margin: 0 16px 2px;
    background: var(--tg-dark-blue, #222a3e);
    border-radius: 12px;
    overflow: hidden;
}

.tg-guide-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tg-guide-toggle:active {
    background: rgba(255, 255, 255, 0.05);
}

.tg-guide-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.tg-guide-toggle-text {
    flex: 1;
    text-align: left;
}

.tg-guide-chevron {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tg-guide-toggle.active .tg-guide-chevron {
    transform: rotate(180deg);
}

.tg-guide-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tg-guide-content.show {
    max-height: 500px;
}

.tg-guide-text {
    padding: 0 16px 10px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

.tg-guide-step {
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.5;
    margin: 6px 0;
}

.tg-guide-step:first-child {
    margin-top: 10px;
}

.tg-guide-step strong {
    color: #3390ec;
    font-weight: 600;
}

.tg-guide-link {
    color: #3390ec;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.tg-guide-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.tg-guide-inline-link {
    color: #3390ec;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    float: right;
    transition: opacity 0.2s ease;
}

.tg-guide-inline-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Toast */
.success-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    backdrop-filter: blur(10px);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.success-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Profile Page Site Actions */
.profile-site-actions {
    margin: 8px 10px;
    border-radius: 22px;
}

/* Bag Display Row */
.bag-display-row {
    cursor: default;
}

.bag-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bag-label {
    font-size: 13px;
    color: #ffffff;
}

.bag-id {
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #8e9499;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-copy-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #3390ec;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tg-copy-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

.tg-icon-box.ton-icon {
    background: #3390ec;
}

.tg-icon-box.ton-icon img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Icon Box - Blue rounded square */
.tg-icon-box {
    width: 28px;
    height: 28px;
    background: #3390ec;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tg-icon-box svg {
    width: 18px;
    height: 18px;
    color: white;
    stroke: white;
}


.tg-icon-box.red {
    background: #e53935;
}

.tg-icon-box.blue {
    background: #3390ec;
}

.tg-icon-box.green {
    background: #43a047;
}

.tg-icon-box.orange {
    background: #ff9800;
}

/* ===== Edit Badge (Glassmorphism) ===== */
.modify-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modify-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.modify-badge:active {
    transform: scale(0.98);
}

.modify-badge svg {
    flex-shrink: 0;
}

/* ===== Customize Profile Bottom Sheet Content ===== */
.customize-content {
    padding-bottom: 100px; /* Space for fixed button */
}

.customize-section {
    margin-bottom: 20px;
    padding: 0 20px;
}

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

.customize-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #8b95a1;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Avatar Options */
.avatar-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: #1e2936;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-option:hover {
    background: #252f3d;
    transform: translateY(-1px);
}

.avatar-option.active {
    border-color: #2AABEE;
    background: rgba(42, 171, 238, 0.1);
}

.avatar-option-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252f3d;
    border: 2px solid #2b3847;
}

.avatar-option-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-option-preview.upload-zone,
.avatar-option-preview.emoji-zone {
    color: #8b95a1;
}

.avatar-option-label {
    font-size: 11px;
    font-weight: 500;
    color: #8b95a1;
    text-align: center;
}

.avatar-option.active .avatar-option-label {
    color: #2AABEE;
}

/* Custom Name Input */
.customize-input {
    width: 100%;
    padding: 14px 16px;
    background: #1e2936;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
}

.customize-input:focus {
    outline: none;
    background: #252f3d;
    border-color: #2AABEE;
}

.customize-input::placeholder {
    color: #8b95a1;
}

.customize-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #8b95a1;
}

/* Customize Footer - Fixed button */
.customize-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

/* Account Preview Card - Add Position Relative */
.account-preview-card {
    position: relative;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .customize-modal-content {
        max-width: 95%;
        max-height: 90vh;
    }

    .avatar-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .avatar-option {
        padding: 12px 8px;
    }

    .avatar-option-preview {
        width: 50px;
        height: 50px;
    }
}

/* Publishing Progress Bar */
.publish-progress-container {
    margin: 0 16px 2px;
    padding: 12px 16px;
    background: var(--tg-dark-blue, #222a3e);
    border-radius: 12px;
    overflow: hidden;
}

.publish-progress-text {
    font-size: 13px;
    color: #8e9499;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
}

.publish-progress-bar {
    width: 100%;
    height: 16px;
}

.publish-progress-bar svg {
    width: 100% !important;
    height: 16px !important;
}

/* Disabled state for action buttons during publishing */
.tg-action-row.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
