:root {
    --tg-primary-transparent: #1e88e573;
    --tg-primary: #1e88e5;
    --tg-primary-dark: #1565c0;
    --tg-primary-light: #42a5f5;
    --tg-bg-primary: #0b171e;
    --tg-bg-secondary: #0b171e;
    --tg-bg-tertiary: #0d1d25;
    --tg-bg-chat: #0b171e;
    --tg-text-primary: #ffffff;
    --tg-text-secondary: #e0e0e0;
    --tg-text-muted: #b0b0b0;
    --tg-border: #2a4a5a;
    --tg-hover: #1e3a4a;
    --tg-success: #4caf50;
    --tg-danger: #f44336;
    --tg-warning: #ff9800;
    --tg-online: #4caf50;
    --tg-message-out: #1e88e5;
    --tg-message-in: #0b171e;
    --tg-input-bg: #0b171e;
    --tg-scrollbar: #2a4a5a;
    --tg-gradiant-primary: #183242;
    --tg-gradiant-secondary: #0b171e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    color: var(--tg-text-primary);
    overflow: hidden;
    height: 100vh;
    font-family: 'Roboto', sans-serif;
}

.Anonium-app {
    height: 100vh;
    width: 100vw;
    position: relative;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--tg-gradiant-primary) 0%, var(--tg-gradiant-secondary) 100%);    
    padding: 20px;
}

.auth-form {
    /*background: linear-gradient(145deg, var(--tg-bg-secondary), var(--tg-bg-tertiary));*/
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    /*box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);*/
    display: none;
    animation: slideInUp 0.3s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.Anonium-logo {
    width: 150px;
    height: 150px;
    background-image: url('./logo icon trans.png');
    background-size: contain; /* <- key change */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: transparent;
    box-shadow: 0 2px 12px rgba(30, 136, 229, 0.2);
    overflow: hidden;
}


.Anonium-logo i {
    display: none;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tg-text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-header p {
    color: var(--tg-text-secondary);
    font-size: 14px;
}

.input-group-custom {
    margin-bottom: 20px;
}

.input-group-custom label {
    display: block;
    margin-bottom: 8px;
    color: var(--tg-text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--tg-text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.word-input{
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--tg-text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: var(--tg-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

.form-input::placeholder {
    color: var(--tg-text-muted);
}

/* Native <option> lists render on the OS's default (light) background, so the
   app's light select text was white-on-white — unreadable until the blue hover
   highlight. Give every app dropdown an explicit dark list with light text. */
.form-input option,
.currency-select option {
    background-color: #1e293b;
    color: #e8eef5;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--tg-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--tg-text-primary);
}
.wlc-container{
    position: relative;
    top: -50px;
    display: none;
}
.wlc-container.active {
    display: block;
}

.wlc-img{
    width: 320px;
    height: 320px; 
    margin: 0 auto 0;
    object-fit: contain;
    background-size: contain;
    object-fit: cover;
    display: block;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    overflow: hidden;
    
}
.wlc-title{
    margin: 51px auto 0;
    color: #f2f2f2 !important;
    padding: 0;
    word-wrap: break-word;
    position: relative;
    display: flex;
    justify-content: center;
}

.wlc-subtitle{
    max-width: 401px;
    margin: 10px auto 0;
    padding: 0;
    word-wrap: break-word;
    position: relative;
    font-size: 1.125rem;
    line-height: 1.2;
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: 400;
    display: flex;
    justify-content: center;
}

.btn-primary-custom {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--tg-primary-light), var(--tg-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.btn-success-custom {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--tg-success), var(--tg-online));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}


.btn-success-custom:hover {
    background: linear-gradient(135deg, var(--tg-online), var(--tg-success));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    color: var(--tg-text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--tg-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: var(--tg-primary-light);
}

.main-container {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
}

.sidebar {
    width: 420px;
    background: linear-gradient(180deg, var(--tg-bg-secondary) 0%, var(--tg-bg-tertiary) 100%);
    border-right: 1px solid var(--tg-border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--tg-border);
    background: rgba(255, 255, 255, 0.02);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    position: relative;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar-placeholder-group {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--tg-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info p {
    font-size: 14px;
    color: var(--tg-text-secondary);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 4px;
}

.header-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--tg-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
}

.header-btn:hover {
    background: var(--tg-hover);
    color: var(--tg-text-primary);
    transform: scale(1.05);
}

/* Search Container 
.search-container {
    margin-top: 16px;
}*/

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 90%;
}

.search-input-wrapper i {
    color: var(--tg-text-muted);
    margin-right: 12px;
    width: fit-content;
}

.search-input-wrapper form {
    display: flex;
    width: 100%;
}

.search-input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    color: var(--tg-text-primary);
    font-size: 14px;
    outline: none;
    width: 100%;
}

.search-input-wrapper input::placeholder {
    color: var(--tg-text-muted);
}

.search-close {
    background: none;
    border: none;
    color: var(--tg-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.search-close:hover {
    color: var(--tg-text-primary);
    background: var(--tg-hover);
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    position: relative;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background: rgba(30, 136, 229, 0.1);
    border-left-color: var(--tg-primary);
}

.new-group-option {
    transition: background-color 0.2s ease !important;
}

.new-group-option:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.new-group-option:active {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.chat-avatar {
    width: 54px !important;
    height: 54px !important;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}

.chat-avatar img {
    width: 54px !important;
    height: 54px !important;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: var(--tg-online);
    border: 2px solid var(--tg-bg-secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

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

.chat-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--tg-text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 13px;
    color: var(--tg-text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

.chat-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-last-message {
    font-size: 14px;
    color: var(--tg-text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.chat-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.unread-count {
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.message-status {
    color: var(--tg-text-muted);
    font-size: 14px;
}

.message-status.read {
    color: var(--tg-success);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--tg-border);
    background: rgba(255, 255, 255, 0.02);
}

.footer-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--tg-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--tg-text-primary);
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    position: relative;
}

/* Empty State */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
}

.empty-content {
    text-align: center;
    max-width: 400px;
}

.empty-icon {
    font-size: 80px;
    color: var(--tg-text-muted);
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-content h2 {
    font-size: 24px;
    font-weight: 400;
    color: var(--tg-text-primary);
    margin-bottom: 12px;
}

.empty-content p {
    font-size: 16px;
    color: var(--tg-text-secondary);
    line-height: 1.4;
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(180deg, var(--tg-bg-secondary) 0%, var(--tg-bg-tertiary) 100%);
    border-bottom: 1px solid var(--tg-border);
    min-height: 70px;
    backdrop-filter: blur(10px);
}

.mobile-back-btn {
    background: none;
    border: none;
    color: var(--tg-text-primary);
    font-size: 20px;
    margin-right: 12px;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-back-btn:hover {
    background: var(--tg-hover);
    transform: scale(1.05);
}

.chat-info {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
    cursor: pointer;
}

.chat-info .chat-avatar {
    width: 42px;
    height: 42px;
    position: relative;
}

.chat-details h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--tg-text-primary);
    margin: 0;
}

.chat-details p {
    font-size: 14px;
    color: var(--tg-text-secondary);
    margin: 0;
}

.chat-actions {
    display: flex;
    gap: 4px;
}

.chat-action-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--tg-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
}

.chat-action-btn:hover {
    background: var(--tg-hover);
    color: var(--tg-text-primary);
    transform: scale(1.05);
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(30, 136, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(30, 136, 229, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(30, 136, 229, 0.03) 0%, transparent 50%);
}

.messages-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: auto;
}

/* Message Bubbles */
.message {
    display: flex;
    margin-bottom: 4px;
    animation: messageSlideIn 0.3s ease-out;
    position: relative;
}

.message.outgoing {
    justify-content: flex-end;
}

.message.incoming {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    min-width: 90px;
}

.message.outgoing .message-bubble {
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
}

.message.incoming .message-bubble {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tg-text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.system {
    justify-content: center;
}

.message.system .message-bubble {
    max-width: 60%;
    background: linear-gradient(135deg, rgba(49, 162, 76, 0.18), rgba(33, 150, 243, 0.16));
    border: 1px solid rgba(98, 182, 250, 0.25);
    color: var(--tg-text-primary);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(14px);
}

.new-contact-prompt {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    margin: 0 auto 10px;
    max-width: 78%;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
}

.new-contact-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.new-contact-prompt-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--tg-text-primary);
}

.new-contact-prompt-subtitle {
    margin: 4px 0 0;
    color: var(--tg-text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.new-contact-prompt-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.new-contact-btn {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.new-contact-btn:hover {
    transform: translateY(-1px);
}

.new-contact-btn.add {
    background: var(--tg-primary);
    color: #fff;
}

.new-contact-btn.ignore {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tg-text-primary);
    border-color: rgba(255, 255, 255, 0.16);
}

.new-contact-btn.block {
    background: rgba(244, 67, 54, 0.12);
    color: var(--tg-danger);
    border-color: rgba(244, 67, 54, 0.24);
}

@media (max-width: 640px) {
    .new-contact-prompt-actions {
        flex-direction: column;
    }
}

.message.system .message-text {
    font-size: 13px;
    color: #d7e4ff;
    margin: 0;
}

.message.system .message-footer {
    justify-content: center;
    opacity: 0.7;
    margin-top: 6px;
}

.message.system .message-time {
    font-size: 10px;
}

.message-text {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.8;
}

.message-time {
    font-size: 11px;
}

.message-status-icon {
    font-size: 12px;
}

.message.outgoing .message-status-icon.read {
    color: #90caf9;
}

/* Typing Indicator */
.typing-indicator {
    margin-bottom: 12px;
}

.typing-bubble {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
    max-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--tg-text-muted);
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* Message Input */
.message-input-container {
    padding: 20px;
    background: linear-gradient(180deg, var(--tg-bg-secondary) 0%, var(--tg-bg-tertiary) 100%);
    border-top: 1px solid var(--tg-border);
    backdrop-filter: blur(10px);
}

.message-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.input-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--tg-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    flex-shrink: 0;
}

.input-btn:hover {
    background: var(--tg-hover);
    color: var(--tg-text-primary);
    transform: scale(1.05);
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.input-field {
    flex: 1;
    min-height: 24px;
    max-height: 120px;
    padding: 8px 40px 8px 12px;
    background: none;
    border: none;
    color: var(--tg-text-primary);
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    overflow-y: auto;
    resize: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    outline: none;
}

.input-field:empty:before {
    content: attr(data-placeholder);
    color: var(--tg-text-muted);
    pointer-events: none;
}

.emoji-btn {
    position: absolute;
    right: 4px;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.send-btn:hover {
    background: linear-gradient(135deg, var(--tg-primary-light), var(--tg-primary));
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(30, 136, 229, 0.4);
}

.voice-btn {
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.voice-btn:hover {
    background: linear-gradient(135deg, var(--tg-primary-light), var(--tg-primary));
    transform: scale(1.1);
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(5px);
}

.settings-content {
    background: linear-gradient(145deg, var(--tg-bg-secondary), var(--tg-bg-tertiary));
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.settings-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--tg-border);
    background: rgba(255, 255, 255, 0.02);
}

.settings-close {
    background: none;
    border: none;
    color: var(--tg-text-secondary);
    font-size: 24px;
    cursor: pointer;
    margin-right: 16px;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.settings-close:hover {
    background: var(--tg-hover);
    color: var(--tg-text-primary);
    transform: scale(1.1);
}

.settings-header h2 {
    font-size: 20px;
    font-weight: 500;
    color: var(--tg-text-primary);
    margin: 0;
}

.settings-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.settings-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    position: relative;
}

.profile-avatar img,
.profile-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.avatar-edit {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: var(--tg-primary);
    border: 2px solid var(--tg-bg-secondary);
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.avatar-edit:hover {
    background: var(--tg-primary-dark);
}

.profile-info h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--tg-text-primary);
    margin: 0 0 4px 0;
}

.profile-info p {
    font-size: 14px;
    color: var(--tg-text-secondary);
    margin: 0;
}

.settings-menu {
    display: flex;
    flex-direction: column;
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.settings-item:hover {
    background: var(--tg-hover);
}

.settings-item i:first-child {
    width: 24px;
    font-size: 18px;
    color: var(--tg-text-secondary);
    margin-right: 16px;
}

.settings-item span {
    flex: 1;
    font-size: 16px;
    color: var(--tg-text-primary);
}

.settings-item i:last-child {
    color: var(--tg-text-muted);
    font-size: 14px;
}

.settings-item.logout {
    color: var(--tg-warning);
}

.settings-item.logout i,
.settings-item.logout span {
    color: var(--tg-warning);
}

.settings-item.removedevice {
    color: var(--tg-danger);
}

.settings-item.removedevice i,
.settings-item.removedevice span {
    color: var(--tg-danger);
}

.settings-divider {
    height: 1px;
    background: var(--tg-border);
    margin: 12px 0;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: var(--tg-bg-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    min-width: 160px;
    animation: fadeIn 0.2s ease-out;
}

.context-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.context-item:hover {
    background: var(--tg-hover);
}

.context-item:first-child {
    border-radius: 8px 8px 0 0;
}

.context-item:last-child {
    border-radius: 0 0 8px 8px;
}

.context-item i {
    margin-right: 12px;
    width: 16px;
    color: var(--tg-text-secondary);
}

.context-item span {
    color: var(--tg-text-primary);
}

.context-item.delete {
    color: var(--tg-danger);
}

.context-item.delete i,
.context-item.delete span {
    color: var(--tg-danger);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 320px;
    height: 400px;
    background: var(--tg-bg-secondary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideInUp 0.3s ease-out;
    overflow: hidden;
}

.emoji-header {
    padding: 12px;
    border-bottom: 1px solid var(--tg-border);
}

.emoji-categories {
    display: flex;
    gap: 4px;
}

.emoji-category {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--tg-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
}

.emoji-category:hover,
.emoji-category.active {
    background: var(--tg-hover);
    color: var(--tg-text-primary);
}

.emoji-content {
    padding: 12px;
    height: calc(100% - 56px);
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    height: fit-content;
}

.emoji-item {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background-color 0.2s ease;
}

.emoji-item:hover {
    background: var(--tg-hover);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingAnimation {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
/* Recovery Phrase Mobile Styles */
    #recoveryPhraseForm {
        max-width: 95%;
        padding: 20px;
    }

    .phrase-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .word-row {
        position: relative;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        gap: 8px;
    }

    .word-item {
        background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-height: 50px;
    backdrop-filter: blur(5px);
    flex: 1;
    justify-content: space-between;
        padding: 12px 15px;
        flex-wrap: wrap;
    }

    .word-item:hover {
        border-color: var(--tg-primary);
    background: rgba(30, 136, 229, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

    .word-number {
    font-size: 12px;
    color: var(--tg-text-muted);
    font-weight: 500;
    min-width: 20px;
}


    .word-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-text-primary);
    flex: 1;
}

    .word-item {
        justify-content: space-between;
        padding: 12px 15px;
    }

    .word-row {
        position: relative;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
        gap: 8px;
    }
        .settings-content {
        width: 95%;
        margin: 20px;
    }

    

    .action-buttons {
        
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-content: center;
        justify-content: center;
        position: relative;
        max-width: 600px;
        align-items: center;
        align-self: center;
        padding-top: 10px;
    }
    .action-buttons-container{
        display: flex;
        flex-direction: row;
        align-content: center;
        justify-content: center;
        position: relative;
        align-items: center;
        align-self: center;
    }

    .recovery-header .Anonium-logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .recovery-header h1 {
        font-size: 20px;
    }

    .recovery-subtitle {
        font-size: 13px;
    }


/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
[contenteditable]:focus-visible {
    /*outline: 2px solid var(--tg-primary);
    outline-offset: 2px;*/
    outline: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--tg-scrollbar);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a5a6a;
}
.hidden {
    display: none !important;
}

/* Error toast animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* Mobile Responsive */


.fab-new-chat {
    position: fixed;
    bottom: 80px;
    right: 10px;
    z-index: 1050;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tg-primary), var(--tg-primary-dark));
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.fab-new-chat:hover {
    background: linear-gradient(135deg, #3098f3, #2b7dd9);
}
.fab-new-chat i {
    font-size: 2rem;
}

/* Compact WhatsApp-style sidebar footer */
/* Anonium App Sidebar Footer */
/* Modern Glassy Footer */
.anonium-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--tg-bg-tertiary);
    backdrop-filter: blur(8px);
    border-top: 1.5px solid #223046;
    min-height: 54px;
    box-shadow: 0 -2px 16px rgba(30, 136, 229, 0.08);
    padding: 0 2px;
    z-index: 10;
}

.anonium-footer-btn {
    flex: 1 1 0;
    background: none;
    border: none;
    color: #b0c4de;
    font-size: 0.93rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
    padding-right: 0px;
    padding-bottom: 5px;
    padding-left: 0px;
    min-width: 0;
    transition: color 0.18s, background 0.18s;
    border-radius: 12px 12px 0 0;
    position: relative;
    outline: none;
    gap: 4px;
}

.anonium-footer-btn i {
    font-size: 1.35rem;
    margin-bottom: 0px;
    line-height: 1;
    transition: color 0.18s;
}

.anonium-footer-btn span {
    font-size: 0.81rem;
    margin-top: 0px;
    line-height: 1;
    letter-spacing: 0.01em;
    transition: color 0.18s;
}

.anonium-footer-btn:hover,
.anonium-footer-btn:focus {
    color: #25d366;
    background: rgba(48, 152, 243, 0.08);
}

.anonium-footer-btn.active {
    color: #3098f3;
    background: rgba(48, 152, 243, 0.13);
}

.anonium-footer-btn.active::after {
    content: "";
    display: block;
    position: absolute;
    left: 30%;
    right: 30%;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tg-message-out) 0%, #3098f3 100%);
    border-radius: 2px 2px 0 0;
}

.screen-loader-overlay {
    position: fixed;
    z-index: 99999;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 28, 38, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: opacity 0.2s;
}
.screen-loader-overlay.d-none {
    display: none !important;
}
.screen-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.loader-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.loader-dots span {
    width: 16px;
    height: 16px;
    background: #3098f3;
    border-radius: 50%;
    display: inline-block;
    animation: loader-bounce 1s infinite alternate;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes loader-bounce {
    0% { transform: translateY(0); opacity: 0.7; }
    100% { transform: translateY(-18px); opacity: 1; }
}
.loader-img {
    width: 48px;
    height: 48px;
    animation: loader-spin 1.2s linear infinite;
    margin-bottom: 16px;
}
@keyframes loader-spin {
    100% { transform: rotate(360deg); }
}
.loader-text {
    color: #b0c4de;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    margin-top: 4px;
}
/* Modern Wallet Sidebar */
.wallet-sidebar {
    background: var(--tg-bg-primary);
    color: #e3eaf3;
    min-width: 280px;    
    box-shadow: 2px 0 12px rgba(30,40,60,0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.wallet-sidebar-wrapper{
    padding-top: 24px;
    padding-right: 18px;   
    padding-left: 18px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wallet-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wallet-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3098f3;
}
.wallet-address-box {
    display: flex;
    align-items: flex-start;
    background: #1e293b;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.98rem;
    gap: 8px;
    word-break: break-all;
}
/* One clean row per chain: [badge] [truncated address] ........ [copy][QR][↗].
   The parent (#walletAddressContainer) stacks these vertically. */
.wallet-address-box #walletAddressContainer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.wallet-addr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.wallet-chain-badge {
    flex: 0 0 auto;
    min-width: 42px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #cde3ff;
    background: #223046;
    border: 1px solid #2f4a6b;
    border-radius: 6px;
    padding: 2px 8px;
}
.wallet-addr-row .wallet-address {
    flex: 1 1 auto;
    font-family: monospace;
    font-size: 0.9rem;
    color: #b0c4de;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wallet-addr-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.addr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}
.addr-icon-btn:hover {
    background: #223046;
}
.wallet-address {
    font-family: monospace;
    color: #b0c4de;
}

/* Block-explorer dropdown: a button in the send/swap family that reveals the
   per-chain explorer links, tucking those "leaves-the-app" links out of the way. */
.wallet-explorer-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.wallet-explorer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cde3ff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
.wallet-explorer-item:hover {
    background: rgba(48, 152, 243, 0.14);
    border-color: rgba(48, 152, 243, 0.4);
}
.copy-btn {
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.copy-btn:hover {
    background: #223046;
}
.wallet-balance-card {
    background: linear-gradient(135deg, #223046 60%, #3098f3 100%);
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 2px 12px rgba(30,40,60,0.10);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.balance-label {
    font-size: 0.98rem;
    color: #b0c4de;
}
.balance-amount {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.balance-currency {
    font-size: 1.1rem;
    color: #b0c4de;
}
.wallet-assets {
    margin-top: 10px;
    height: 100%;
}
.wallet-assets h5 {
    font-size: 1.08rem;
    margin-bottom: 8px;
    color: #3098f3;
}
.assets-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.assets-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #223046;
    font-size: 1rem;
}
.asset-name {
    display: flex;
    align-items: center;
    gap: 7px;
}
.asset-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
}
.asset-amount {
    font-family: monospace;
    color: #b0c4de;
}

/* Simple Modal */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(20,28,38,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal.d-none { display: none; }
.modal-content {
    background: var(--tg-bg-tertiary) !important;
    color: var(--tg-text-primary);
    border-radius: 12px;
    padding: 32px 24px 24px 24px;
    min-width: 320px;
    box-shadow: 0 4px 32px rgba(30,40,60,0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.btn-secondary-custom {
    background: none;
    color: var(--tg-text-muted);
    border: 1.5px solid var(--tg-border);
    border-radius: 8px;
    padding: 7px 18px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-secondary-custom:hover {
    background: var(--tg-hover);
    color: var(--tg-text-primary);
}
/* Improved Send Money Modal */
#sendMoneyModal.modal {
    position: absolute; /* stays inside parent .messages-wrapper or .chat-area */
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(20,28,38,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#sendMoneyModal .modal-content {
    background: var(--tg-bg-tertiary, #16202b);
    color: var(--tg-text-primary, #fff);
    border-radius: 18px;
    padding: 32px 28px 24px 28px;
    min-width: 260px;
    max-width: 98vw;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 32px rgba(30,40,60,0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1.5px solid var(--tg-border, #2a4a5a);
    animation: modal-pop 0.18s cubic-bezier(.4,1.4,.6,1) both;
}

@keyframes modal-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

#sendMoneyModal h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tg-primary, #3098f3);
    text-align: center;
}

#sendMoneyModal label {
    font-size: 0.98rem;
    color: var(--tg-text-secondary, #b0c4de);
    margin-bottom: 4px;
}

#sendMoneyModal .form-input {
    background: rgba(255,255,255,0.06);
    border: 1.5px solid var(--tg-border, #2a4a5a);
    color: var(--tg-text-primary, #fff);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 1.08rem;
    margin-bottom: 10px;
    transition: border 0.15s;
}
#sendMoneyModal .form-input:focus {
    border-color: var(--tg-primary, #3098f3);
    outline: none;
}

#sendMoneyModal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

#sendMoneyModal .btn-primary-custom {
    background: linear-gradient(135deg, var(--tg-primary, #3098f3), var(--tg-primary-dark, #1565c0));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}
#sendMoneyModal .btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--tg-primary-light, #42a5f5), var(--tg-primary, #3098f3));
}

#sendMoneyModal .btn-secondary-custom {
    background: none;
    color: var(--tg-text-muted, #b0c4de);
    border: 1.5px solid var(--tg-border, #2a4a5a);
    border-radius: 8px;
    padding: 8px 22px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
#sendMoneyModal .btn-secondary-custom:hover {
    background: var(--tg-hover, #1e3a4a);
    color: var(--tg-text-primary, #fff);
}

/* Send Money Modal: Amount + Currency Row */
#sendMoneyModal .send-money-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

#sendMoneyModal .currency-select {
    max-width: 110px;
    min-width: 80px;
    padding: 10px 12px;
    font-size: 1.08rem;
    border-radius: 8px;
    border: 1.5px solid var(--tg-border, #2a4a5a);
    background: rgba(255,255,255,0.06);
    color: var(--tg-text-primary, #fff);
    transition: border 0.15s;
    appearance: none;
    outline: none;
    cursor: pointer;
}
#sendMoneyModal .currency-select:focus {
    border-color: var(--tg-primary, #3098f3);
}

#sendMoneyModal .currency-select {
    max-width: 110px;
    min-width: 80px;
    padding: 10px 12px;
    font-size: 1.08rem;
    border-radius: 8px;
    border: 1.5px solid var(--tg-border, #2a4a5a);
    background: var(--tg-bg-tertiary, #16202b); /* Use your dark background */
    color: var(--tg-text-primary, #fff);
    transition: border 0.15s;
    appearance: none;
    outline: none;
    cursor: pointer;
}
#sendMoneyModal .currency-select:focus {
    border-color: var(--tg-primary, #3098f3);
}

.message-input-field{
    max-width: 30vw;
}
/* Money Request Message Bubble */
.money-request-message {
    background: linear-gradient(135deg, #223046 60%, #3098f3 100%);
    border-radius: 12px;
    padding: 16px 18px 12px 18px;
    margin: 8px 0;
    color: #fff;
    box-shadow: 0 2px 8px rgba(30,40,60,0.10);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
    max-width: 340px;
    word-break: break-word;
}

.money-amount {
    font-size: 1.13rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.money-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    width: 100%;
    justify-content: flex-end;
    flex-direction: column;
}
.money-button-success{
    max-height: 30px;
}
.money-button-danger{
    max-height: 30px;
}

.money-button-success {
    background: linear-gradient(135deg, #25d366, #3098f3 80%);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(48,152,243,0.08);
}
.money-button-success:hover {
    background: linear-gradient(135deg, #3098f3, #25d366 80%);
}

.btn-danger-custom {
    background: linear-gradient(135deg, #f44336, #e57373 80%);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(244,67,54,0.08);
}
.btn-danger-custom:hover {
    background: linear-gradient(135deg, #e57373, #f44336 80%);
}

.btn-secondary-custom {
    background: none;
    color: #b0c4de;
    border: 1.5px solid #2a4a5a;
    border-radius: 7px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-secondary-custom:hover {
    background: #223046;
    color: #fff;
}

.money-status.accepted {
    color: #25d366;
    font-weight: 600;
    margin-top: 10px;
}
.money-status.rejected {
    color: #f44336;
    font-weight: 600;
    margin-top: 10px;
}
.money-status.cancelled {
    color: #b0c4de;
    font-weight: 600;
    margin-top: 10px;
    opacity: 0.7;
}

.qr-btn {
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1.15rem;
    margin-left: 4px;
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 6px;
    transition: background 0.15s;
}
.qr-btn:hover {
    background: #223046;
}

.send-wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 1rem;
    padding: 10px 0;
    border-radius: 8px;
    margin-bottom: 8px;
}

.send-wallet-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

#sendWalletModal .qr-btn {
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 4px;
    padding: 4px 6px;
    transition: background 0.15s;
}
#sendWalletModal .qr-btn:hover {
    background: #223046;
}
.available-balance {
    font-size: 0.97rem;
    color: var(--tg-text-muted, #b0c4de);
    margin-left: 2px;
    user-select: none;
}
.available-balance:hover {
    text-decoration: underline;
    color: var(--tg-primary, #3098f3);
    cursor: pointer;
}
#qr-reader {
    border-radius: 10px;
    overflow: hidden;
    background: #16202b;
}

.activitys-sidebar-wrapper {
    padding: 24px 18px;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    color: #e3eaf3;
    min-width: 280px;    
    height: 100%;
    top: 0px;
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.activitys-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #3098f3;
    display: flex;
    align-items: center;
    gap: 8px;
}
.activitys-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.activitys-list li {
    background: #223046;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1rem;
    box-shadow: 0 1px 4px rgba(30,40,60,0.08);
}
.activity-amount {
    font-weight: 600;
    color: #25d366;
}
.activity-type.sent .activity-amount {
    color: #f44336;
}
.activity-type.received .activity-amount {
    color: #25d366;
}
.activity-date {
    font-size: 0.93rem;
    color: #b0c4de;
}
.activity-status {
    font-size: 0.93rem;
    color: #b0c4de;
}
.truncate {
    max-width: 160px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.icon-badge-wrapper {
    position: relative;
    display: inline-block;
}

.badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #f44336;
    color: #fff;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: 0.75em;
    min-width: 18px;
    text-align: center;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    pointer-events: none;
    display: inline-block;
}
.refresh-btn {
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1.18rem;
    cursor: pointer;
    border-radius: 5px;
    padding: 4px 7px;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
}
.refresh-btn:hover {
    background: #223046;
}

#transactionSuccessModal .modal-content {
    animation: popIn 0.3s;
}

.blockchain-suffix {
    display: inline-block;
    background: #1a2533;
    color: #b0c4de;
    font-size: 0.78em;
    font-weight: 600;
    border-radius: 5px;
    padding: 2px 7px;
    margin-left: 7px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

.help-tooltip-btn {
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1.1em;
    margin-left: 4px;
    cursor: pointer;
    vertical-align: middle;
    padding: 0 2px;
    transition: color 0.15s;
}
.help-tooltip-btn:hover {
    color: #223046;
}
.settings-back {
    background: none;
    border: none;
    color: #3098f3;
    font-size: 1.5rem;
    position: absolute;
    left: 10px;
    top: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.settings-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
}
.settings-header h2 {
    margin: 0 auto;
}
.settings-section {
    padding: 32px 18px;
    min-height: 220px;
}
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0;
    font-size: 1.05em;
}
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #b0c4de;
    transition: .3s;
    border-radius: 22px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background-color: #fff;
    transition: .3s;
    border-radius: 50%;
}
.switch input:checked + .slider {
    background-color: #3098f3;
}
.switch input:checked + .slider:before {
    transform: translateX(16px);
}
.chat-context-menu {
    position: absolute;
    top: 56px; /* adjust as needed */
    right: 16px;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    min-width: 180px;
    z-index: 1002;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.18s;
}
.chat-context-menu .context-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: #e3eaf3;
    font-size: 1.05em;
    cursor: pointer;
    transition: background 0.13s;
}
.chat-context-menu .context-item:hover {
    background: #223046;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px);}
    to { opacity: 1; transform: translateY(0);}
}
/* Channels Sidebar Wrapper */
.channels-sidebar-wrapper {
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.channels-header {
    padding: 24px 24px 12px 24px;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    border-bottom: 1px solid #223046;
    display: flex;
    align-items: center;
    gap: 12px;
}

.channels-header h4 {
    color: #e3eaf3;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.channels-list {
    flex: 1;
    padding: 32px 24px;
    color: #b0c4de;
    font-size: 1.08rem;
}

.channels-list .disabled-feature {
    background: #223046;
    color: #b0c4de;
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 18px;
    font-size: 1em;
    text-align: center;
    opacity: 0.7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Example: Channel Card (for future use) */
.channel-card {
    background: #1a2533;
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.15s;
    cursor: pointer;
}
.channel-card:hover {
    background: #223046;
}
.channel-card .channel-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #3098f3;
}
.channel-card .channel-info {
    flex: 1;
}
.channel-card .channel-title {
    color: #e3eaf3;
    font-weight: 600;
    font-size: 1.08em;
}
.channel-card .channel-desc {
    color: #b0c4de;
    font-size: 0.97em;
    margin-top: 2px;
}

.disabled-feature {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(0.3);
    cursor: not-allowed;
}
.calls-sidebar-wrapper {
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.calls-header {
    padding: 24px 24px 12px 24px;
    background: linear-gradient(135deg, var(--tg-bg-primary) 0%, var(--tg-bg-secondary) 100%);
    border-bottom: 1px solid #223046;
    display: flex;
    align-items: center;
    gap: 12px;
}
.calls-header h4 {
    color: #e3eaf3;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.calls-list {
    flex: 1;
    padding: 32px 24px;
    color: #b0c4de;
    font-size: 1.08rem;
}
.wallet-last-updated {
    color: #b0c4de;
    font-size: 0.93em;
    margin-top: 2px;
    margin-bottom: 6px;
    text-align: right;
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.mobile-only {
    display: none !important;
}


@media (max-width: 768px) {

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 100vw;
    }

    .sidebar.show {
        transform: translateX(0);
    }
    


    .chat-area {
        width: 100%;
    }

    .auth-form {
        padding: 30px 20px;
        margin: 10px;
    }

    .Anonium-logo {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .message-bubble {
        max-width: 85%;
    }

    .emoji-picker {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }

    .settings-content {
        width: 95%;
        margin: 20px;
    }  

    .action-buttons {
        flex-wrap: wrap;
    }

    .recovery-header .Anonium-logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .recovery-header h1 {
        font-size: 20px;
    }

    .recovery-subtitle {
        font-size: 13px;
    }
    .form-input{
        font-size: 12px;
    }
    .word-input{
        font-size: 12px !important;
        width: 100%;
        padding: 3px 6px;
        background: rgba(255, 255, 255, 0.05);
        border: 2px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: var(--tg-text-primary);
        font-size: 16px;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }
}

/* Add media queries */
@media (max-width: 600px) {
    .mobile-only {
        display: inline-block !important;
    }
    .sidebar {
        width: 100vw;
    }
    .phrase-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    .btn-primary-custom{
    font-size: 10px;
    }
    .btn-success-custom{
    font-size: 10px;
    }
    .btn-danger-custom{
    font-size: 10px;
    }
    .btn-secondary-custom{
    font-size: 10px;
    }
    .phrase-item {
    padding: 0.1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
    }
    .phrase-text{
    font-size: 12px;
    }
    .phrase-number {
    font-size: 12px;
    display: flex;
    }
    .warning-text{
    font-size: small;
    }
    .recovery-subtitle{
    font-size: small;
    }
    .word-item {
    padding: 0.1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
    }
    .word-text{
    font-size: 12px;
    }
    .word-number {
    font-size: 12px;
    display: flex;
    justify-content: center;
    }
    .security-tips{
        display: none;
    }

    .fab-new-chat {
        width: 50px;
        height: 50px;
        bottom: 70px;
        right: 8px;
    }
    .fab-new-chat i {
        font-size: 1.5rem;
    }
    .message-input-field{
        max-width: 180px !important;
    }
}

@media (max-width: 480px) {
    .mobile-only {
        display: inline-block !important;
    }
    .sidebar {
        width: 100vw;
    }

    .message-bubble {
        max-width: 90%;
    }

    .chat-header {
        padding: 8px 16px;
    }

    .messages-container {
        padding: 16px;
    }

    .message-input-container {
        padding: 16px;
    }

        /* Recovery Phrase Small Mobile */
    .phrase-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }



    .word-number {
        font-size: 14px;
        display: flex;
        justify-content: center;
    }

    .word-text {
        font-size: 15px;
    }

    .security-tips {
        padding: 15px;
    }

    .security-tips h3 {
        font-size: 14px;
    }

    .security-tips li {
        font-size: 13px;
    }
}

.disapearing-messages-messagebox {
    border-color: var(--tg-primary);
    border-style: dashed; 
    border-width: 2px; 
}

.no-select {
    /* Prevent text selection styling */
    -webkit-user-select: none; /* Safari, iOS, Chrome mobile */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+ */
    user-select: none;         /* Standard syntax */
    
    /* Disable the default mobile context menu popup (iOS/Android) */
    -webkit-touch-callout: none; 
}

.slected-chat-background{
    background-color: var(--tg-primary-transparent) !important;
    border-radius: 5px !important;
}

