.tg-accounts-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.tg-accounts-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.tg-accounts-container {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s;
}

.tg-accounts-modal.hidden .tg-accounts-container {
    transform: translateY(-20px);
}

.tg-accounts-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 1;
}

.tg-accounts-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.tg-accounts-close {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.tg-accounts-close:hover {
    background-color: var(--hover-color);
}

.tg-accounts-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tg-account-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.tg-account-item:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

.tg-account-item.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.tg-account-item.active .tg-account-username,
.tg-account-item.active .tg-account-name {
    color: var(--text-primary);
}

.tg-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.tg-account-item.active .tg-account-avatar {
    border-color: var(--text-primary);
}

.tg-account-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.tg-account-username {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-account-name {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tg-account-switch {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.tg-account-switch:hover {
    background-color: var(--hover-color);
    transform: scale(1.1);
}

.tg-account-item.active .tg-account-switch {
    color: var(--text-primary);
}

.tg-add-account-btn {
    width: calc(100% - 32px);
    padding: 12px;
    margin: 16px;
    background-color: var(--accent-color);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.tg-add-account-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.tg-add-account-btn i {
    font-size: 14px;
}

.tg-add-account-form {
    padding: 16px;
}

.tg-form-group {
    margin-bottom: 16px;
}

.tg-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tg-form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
}

.tg-form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.2);
}

.tg-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.tg-btn {
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tg-btn-primary {
    background-color: var(--accent-color);
    color: var(--text-primary);
    border: none;
}

.tg-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.tg-btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.tg-btn-secondary:hover {
    background-color: var(--hover-color);
    transform: translateY(-1px);
}

/* Mobile styles */
@media (max-width: 300px) {
    .tg-accounts-container {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 0;
    }

    .tg-accounts-header {
        padding: 12px;
    }

    .tg-accounts-title {
        font-size: 16px;
    }

    .tg-accounts-close {
        width: 28px;
        height: 28px;
    }

    .tg-accounts-list {
        padding: 12px;
    }

    .tg-account-item {
        padding: 12px;
    }

    .tg-account-avatar {
        width: 40px;
        height: 40px;
    }

    .tg-account-username {
        font-size: 14px;
    }

    .tg-account-name {
        font-size: 12px;
    }

    .tg-add-account-btn {
        width: calc(100% - 24px);
        padding: 12px;
        margin: 12px;
        font-size: 14px;
    }

    .tg-form-group {
        margin-bottom: 12px;
    }

    .tg-form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .tg-form-group input {
        padding: 10px;
        font-size: 14px;
    }

    .tg-form-actions {
        margin-top: 12px;
    }

    .tg-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
} 